:root {
  color-scheme: dark;
  --bg: #030604;
  --panel: rgba(9, 17, 13, 0.92);
  --panel-soft: rgba(13, 24, 18, 0.78);
  --line: rgba(154, 212, 0, 0.28);
  --line-strong: rgba(154, 212, 0, 0.55);
  --acid: #9ad400;
  --acid-2: #c8ff00;
  --muted: #9aa39a;
  --text: #f0f2ed;
  --dim: #636b65;
  --violet: #4321d9;
  --red: #db2735;
  --cyan: #33bad2;
  --amber: #f2c24e;
  --radius: 8px;
  --transition: 190ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 130ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Айдентика базы знаний: монохром · стекло · металл.
     Совпадает с documentation/css/styles.css — один язык на весь продукт. */
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-line: rgba(255, 255, 255, 0.09);
  --glass-top: rgba(255, 255, 255, 0.10);
  --metal-grad: linear-gradient(135deg, #5a5a63 0%, #23232a 30%, #8b8b94 50%, #23232a 70%, #5a5a63 100%);
  --metal-face: linear-gradient(180deg, #e8e8ec 0%, #b9b9c2 45%, #8f8f9a 55%, #c9c9d2 100%);
  --metal-ink: #f2f2f4;
  --metal-muted: #8b8b94;
  --metal-muted-2: #a9a9b2;
}

/* ---------- Шрифты базы знаний (самохост, офлайн) ---------- */
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/inter-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/inter-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/inter-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/inter-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/inter-cyrillic-800.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/jbmono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/jbmono-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/jbmono-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("documentation/assets/fonts/jbmono-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* DZENDEX command center */
.dzendex-command-page {
  --dzx: #ff3bd2;
  --dzx-strong: #ff0f8c;
  --dzx-soft: rgba(255, 31, 143, 0.12);
  --dzx-line: rgba(255, 31, 143, 0.34);
  --dzx-panel: rgba(9, 9, 10, 0.88);
  --dzx-panel-strong: rgba(15, 10, 14, 0.96);
  --dzx-muted: #a99ca6;
  background:
    linear-gradient(90deg, rgba(255, 31, 143, 0.04) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(255, 31, 143, 0.03) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 72% 16%, rgba(255, 31, 143, 0.12), transparent 34%),
    #050506;
  overflow-x: hidden;
}

.dzendex-command-page .topbar {
  border-bottom-color: rgba(255, 31, 143, 0.22);
  background: rgba(5, 5, 6, 0.9);
}

/* Вордмарк теперь единая металлическая отливка без внутреннего span —
   у страницы остаётся своя подсветка навигации. */
.dzendex-command-page .main-nav a.active,
.dzendex-command-page .main-nav a:hover {
  color: var(--dzx);
}

.dzendex-command-page .primary-action {
  border: 1px solid rgba(255, 31, 143, 0.62);
  background: linear-gradient(135deg, rgba(255, 31, 143, 0.2), rgba(255, 15, 140, 0.55));
  box-shadow: 0 0 28px rgba(255, 31, 143, 0.22);
}

.dzendex-command-page .login-btn:hover,
.dzendex-command-page .login-btn:focus-visible {
  color: var(--dzx);
}

.dzendex-command-page .login-btn:hover .login-mark,
.dzendex-command-page .login-btn:focus-visible .login-mark {
  border-color: var(--dzx);
  box-shadow: 0 0 14px rgba(255, 31, 143, 0.18);
}

.dzendex-command-stage {
  padding: 12px 18px 14px;
  overflow-x: hidden;
}

.dzendex-command-content {
  min-width: 0;
}

.dzendex-command-grid {
  display: grid;
  grid-template-columns: 300px minmax(520px, 1fr) 360px;
  gap: 14px;
  align-items: stretch;
}

.dzendex-left,
.dzendex-side {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.dzendex-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 31, 143, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 44%),
    linear-gradient(145deg, rgba(255, 31, 143, 0.075), transparent 55%),
    var(--dzx-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 18px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.dzendex-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 31, 143, 0.04) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, transparent, rgba(255, 31, 143, 0.055), transparent) 0 0 / 160px 100%;
  opacity: 0.55;
}

.dzendex-card > * {
  position: relative;
}

.dzendex-card h2 {
  margin: 0;
  color: var(--dzx);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.dzendex-card p {
  margin: 9px 0 0;
  color: #d3c6d0;
  font-size: 12px;
  line-height: 1.6;
}

.dzendex-nav-card {
  display: grid;
  gap: 14px;
  min-height: 610px;
  padding: 20px 18px 18px;
}

.dzendex-nav-list {
  display: grid;
  gap: 6px;
}

.dzendex-nav-list a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #eee7ed;
}

.dzendex-nav-list a.active,
.dzendex-nav-list a:hover {
  border-color: var(--dzx-line);
  background: rgba(255, 31, 143, 0.12);
  color: #fff;
}

.dzendex-nav-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--dzx);
  font-size: 18px;
}

.dzendex-nav-list strong,
.dzendex-nav-list small {
  display: block;
}

.dzendex-nav-list strong {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dzendex-nav-list small {
  margin-top: 2px;
  color: #a997a5;
  font-size: 10px;
  line-height: 1.25;
}

.dzendex-graffiti {
  align-self: end;
  min-height: 110px;
  color: rgba(255, 31, 143, 0.9);
  font-family: var(--font-sans);
  font-size: clamp(42px, 4vw, 66px);
  line-height: 0.8;
  text-transform: uppercase;
  transform: rotate(-7deg);
  text-shadow: 0 0 22px rgba(255, 31, 143, 0.28);
}

.dzendex-network-card {
  padding: 18px;
}

.dzendex-network-map {
  position: relative;
  height: 170px;
  margin-top: 14px;
  border: 1px solid rgba(255, 31, 143, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 31, 143, 0.08) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(0deg, rgba(255, 31, 143, 0.06) 1px, transparent 1px) 0 0 / 38px 38px,
    rgba(0, 0, 0, 0.32);
}

.dzendex-network-map::before {
  content: "";
  position: absolute;
  inset: 20% 13% 18% 12%;
  border: 1px dashed rgba(255, 31, 143, 0.35);
  transform: skew(-12deg);
}

.dzendex-network-map span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dzx);
  box-shadow: 0 0 12px rgba(255, 31, 143, 0.85);
}

.dzendex-network-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #b8f6bd;
  font-size: 11px;
  text-transform: uppercase;
}

.dzendex-console {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto auto;
  gap: 12px;
  min-height: calc(100vh - 148px);
  padding: 26px 26px 18px;
}

.dzendex-console-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
}

.dzendex-console-head h1 {
  margin: 5px 0 8px;
  color: var(--dzx-strong);
  font-family: var(--font-sans);
  font-size: clamp(68px, 7vw, 116px);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(255, 31, 143, 0.18);
}

.dzendex-console-head p {
  margin: 0;
  color: #bfb2bc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dzendex-status {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 8px;
  min-width: 92px;
  min-height: 32px;
  color: var(--dzx);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dzx);
  box-shadow: 0 0 16px rgba(255, 31, 143, 0.85);
}

.dzendex-chat-log {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 420px;
  max-height: calc(100vh - 330px);
  padding: 2px 8px 2px 0;
  overflow: auto;
  scrollbar-color: rgba(255, 31, 143, 0.42) transparent;
}

.dzendex-message {
  width: min(820px, 88%);
  padding: 16px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(255, 255, 255, 0.035);
}

.dzendex-message-user {
  justify-self: end;
  border-color: rgba(255, 31, 143, 0.45);
  background: rgba(255, 31, 143, 0.11);
}

.dzendex-message strong {
  display: block;
  margin-bottom: 9px;
  color: var(--dzx);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.dzendex-message p {
  margin: 0;
  color: #f2eaf0;
  font-size: 13px;
  line-height: 1.6;
}

.dzendex-message time {
  display: block;
  margin-top: 10px;
  color: rgba(242, 234, 240, 0.52);
  text-align: right;
  font-size: 11px;
}

.dzendex-confirmation {
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--dzx-line);
  border-radius: 7px;
  background: rgba(255, 31, 143, 0.08);
}

.dzendex-confirmation[hidden] {
  display: none;
}

.dzendex-confirmation strong {
  color: var(--dzx);
  text-transform: uppercase;
}

.dzendex-confirmation div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dzendex-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 54px;
  min-height: 56px;
  border: 1px solid rgba(255, 31, 143, 0.28);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.dzendex-input-row input,
.dzendex-role-panel select,
.dzendex-llm-panel select,
.dzendex-llm-panel input {
  width: 100%;
  border: 1px solid rgba(255, 31, 143, 0.26);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font: inherit;
}

.dzendex-input-row input {
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  background: transparent;
}

.dzendex-input-row button,
.dzendex-confirmation button,
.dzendex-llm-panel button {
  border: 0;
  border-left: 1px solid rgba(255, 31, 143, 0.3);
  background: rgba(255, 31, 143, 0.1);
  color: var(--dzx);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.dzendex-input-row button {
  font-size: 22px;
}

.dzendex-send {
  background: linear-gradient(135deg, rgba(255, 31, 143, 0.22), rgba(255, 31, 143, 0.42)) !important;
}

.dzendex-confirmation button,
.dzendex-llm-panel button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 31, 143, 0.32);
  border-radius: 6px;
}

.dzendex-input-row button:hover,
.dzendex-confirmation button:hover,
.dzendex-llm-panel button:hover {
  color: #fff;
  background: rgba(255, 31, 143, 0.2);
}

.dzendex-role-panel,
.dzendex-llm-panel,
.dzendex-memory-panel,
.dzendex-system-panel {
  padding: 18px;
}

.dzendex-role-panel label,
.dzendex-llm-panel label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.dzendex-role-panel label span,
.dzendex-llm-panel label span {
  color: var(--dzx-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.dzendex-role-panel select,
.dzendex-llm-panel select,
.dzendex-llm-panel input {
  min-height: 38px;
  padding: 0 11px;
}

.dzendex-llm-panel {
  display: grid;
  gap: 9px;
}

.dzendex-llm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.dzendex-llm-panel button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.dzendex-memory-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 14px;
  align-items: center;
}

.dzendex-memory-ring {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--dzx);
  font-size: 18px;
  font-weight: 900;
  background:
    radial-gradient(circle at center, #060607 48%, transparent 50%),
    conic-gradient(var(--dzx) 0 78%, rgba(255, 255, 255, 0.1) 78% 100%);
  box-shadow: 0 0 24px rgba(255, 31, 143, 0.2);
}

.dzendex-system-panel strong {
  display: block;
  margin-top: 6px;
  color: var(--dzx);
  font-size: 12px;
  text-transform: uppercase;
}

.dzendex-sparkline {
  width: 100%;
  height: 70px;
  margin: 8px 0 10px;
  color: var(--dzx);
  opacity: 0.85;
}

.dzendex-sparkline circle {
  fill: var(--dzx);
}

.dzendex-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 31, 143, 0.2);
  border-radius: 7px;
  overflow: hidden;
}

.dzendex-quick-grid a {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 8px 5px;
  border-right: 1px solid rgba(255, 31, 143, 0.16);
  color: #f5edf3;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.dzendex-quick-grid a:last-child {
  border-right: 0;
}

.dzendex-system-feed {
  margin-top: 10px;
}

.dzendex-muted {
  color: #d9cbd8;
  line-height: 1.55;
}

.dzendex-action-record {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 31, 143, 0.16);
}

.dzendex-action-record strong {
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
}

.dzendex-action-record span {
  color: var(--dzx-muted);
  font-size: 11px;
}

.dzendex-bottom-bar {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(280px, 1fr) 210px;
  gap: 26px;
  align-items: center;
  min-height: 62px;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid rgba(255, 31, 143, 0.18);
  border-radius: 8px;
  background: rgba(7, 7, 8, 0.86);
  color: #b8aeb6;
  font-size: 12px;
  text-transform: uppercase;
}

.dzendex-bottom-bar strong {
  margin-left: 8px;
  color: #fff;
}

.dzendex-bottom-bar em {
  margin-left: 6px;
  font-style: normal;
}

.dzendex-bottom-bar .up {
  color: #39ff75;
}

.dzendex-bottom-bar .down {
  color: #ff3b54;
}

.dzendex-bottom-bar b {
  justify-self: end;
  color: var(--dzx);
  font-size: 16px;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 31, 143, 0.32);
}

.dzendex-bottom-bar i {
  height: 34px;
  border: 1px solid rgba(255, 31, 143, 0.18);
  background: repeating-linear-gradient(90deg, var(--dzx) 0 2px, transparent 2px 7px);
  opacity: 0.7;
}

@media (max-width: 1340px) {
  .dzendex-command-grid {
    grid-template-columns: 260px minmax(420px, 1fr) 320px;
  }

  .dzendex-console {
    padding: 22px 20px 16px;
  }

  .dzendex-bottom-bar {
    grid-template-columns: repeat(3, auto) 1fr;
  }

  .dzendex-bottom-bar i {
    display: none;
  }
}

@media (max-width: 1120px) {
  .dzendex-command-grid {
    grid-template-columns: 1fr;
  }

  .dzendex-nav-card {
    min-height: auto;
  }

  .dzendex-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dzendex-console {
    min-height: auto;
  }

  .dzendex-bottom-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .dzendex-bottom-bar b {
    justify-self: start;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.04) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(154, 212, 0, 0.035) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 78% 72%, rgba(67, 33, 217, 0.07), transparent 30%),
    radial-gradient(circle at 50% 20%, rgba(90, 128, 25, 0.2), transparent 40%),
    #030604;
  font-family: var(--font-sans);
}

html.alterego-sync-loading body {
  overflow: hidden;
}

html.alterego-sync-loading .page-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.alterego-sync-loading body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  background:
    linear-gradient(rgba(166, 255, 0, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 255, 0, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(166, 255, 0, 0.14), transparent 34%),
    #020700;
  background-size: 48px 48px, 48px 48px, auto, auto;
}

html.alterego-sync-loading body::after {
  content: "СИНХРОНИЗАЦИЯ ALTERE:GO";
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 9999;
  transform: translate(-50%, -50%);
  padding: 14px 22px;
  border: 1px solid var(--acid);
  border-radius: 5px;
  background: rgba(8, 19, 8, 0.92);
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 0 32px rgba(166, 255, 0, 0.28), inset 0 0 18px rgba(154, 212, 0, 0.06);
  animation: syncPulse 1.6s ease-in-out infinite;
}

@keyframes syncPulse {
  0%, 100% { box-shadow: 0 0 32px rgba(166, 255, 0, 0.28), inset 0 0 18px rgba(154, 212, 0, 0.06); }
  50% { box-shadow: 0 0 48px rgba(166, 255, 0, 0.44), inset 0 0 28px rgba(154, 212, 0, 0.1); }
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.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;
}

[data-editable="true"] {
  min-width: 1ch;
  border-radius: 4px;
  cursor: text;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: background 160ms ease, outline-color 160ms ease, box-shadow 160ms ease;
  user-select: text;
}

[data-editable="true"]:hover {
  background: rgba(154, 212, 0, 0.07);
  outline-color: rgba(154, 212, 0, 0.24);
}

[data-editable="true"]:focus {
  background: rgba(154, 212, 0, 0.12);
  box-shadow: 0 0 18px rgba(154, 212, 0, 0.12);
  outline-color: rgba(200, 255, 0, 0.72);
}

[data-editable="true"]:empty::before {
  content: attr(data-placeholder);
  color: rgba(240, 242, 237, 0.36);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: linear-gradient(rgba(255, 255, 255, 0.025) 50%, transparent 50%) 0 0 / 100% 4px;
  mix-blend-mode: screen;
  opacity: 0.18;
}

.page-shell {
  width: min(1920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 0 18px 0 22px;
  /* Стекло: полупрозрачная плита с размытием — сквозь неё читается карта */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.012) 42%, rgba(0, 0, 0, 0.12) 100%),
    rgba(9, 10, 13, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow:
    inset 0 1px 0 var(--glass-top),
    0 10px 34px rgba(0, 0, 0, 0.55);
}

/* Шлифованный металл — тонкая вертикальная фактура поверх стекла */
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px);
  opacity: 0.55;
  mix-blend-mode: overlay;
  pointer-events: none;
  /* Ниже текста: фактура ложится на стекло, а не поверх надписей */
  z-index: -1;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 139, 148, 0.12) 8%,
    rgba(169, 169, 178, 0.42) 28%,
    rgba(233, 233, 238, 0.62) 50%,
    rgba(169, 169, 178, 0.42) 72%,
    rgba(139, 139, 148, 0.12) 92%,
    transparent 100%
  );
  pointer-events: none;
}

@keyframes topbarGlowPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  /* min-width: 0 убран намеренно: он разрешал колонке сжиматься ниже
     min-content, а при background-clip: text вылезшие буквы не обрезаются,
     а становятся невидимыми — вордмарк превращался в «ALTE». */
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Cube logo animations — float + glow pulse */
@keyframes cubeFloat {
  0%   { transform: translateY(0px)  rotate(0deg); }
  25%  { transform: translateY(-7px) rotate(0.8deg); }
  50%  { transform: translateY(-11px) rotate(0deg); }
  75%  { transform: translateY(-5px) rotate(-0.8deg); }
  100% { transform: translateY(0px)  rotate(0deg); }
}

@keyframes cubeGlow {
  0%, 100% {
    filter:
      drop-shadow(0 6px 18px rgba(0,0,0,0.7))
      drop-shadow(0 0 0px rgba(154,212,0,0));
  }
  50% {
    filter:
      drop-shadow(0 12px 32px rgba(0,0,0,0.6))
      drop-shadow(0 0 28px rgba(154,212,0,0.30))
      drop-shadow(0 0 60px rgba(154,212,0,0.12));
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ALTERE:GO — одна отливка: двоеточие входит в вордмарк, разбивки на span нет,
   поэтому градиент металла идёт сквозь всё слово без стыка. */
.brand-title {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  /* Крупный кегль сам держит форму — разрядку убавляем, слово читается плотнее */
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  /* Полированный металл: блик сверху, узкая тёмная полоса «горизонта», блик снизу.
     Средний тон намеренно светлый — на стекле важна читаемость, а не глубина. */
  background: linear-gradient(180deg, #ffffff 6%, #ececf1 30%, #a6a6b0 56%, #dcdce3 78%, #ffffff 98%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--metal-muted-2);
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* Один рычаг на отступ и на подчёркивание — в адаптиве они не разъедутся */
  --nav-pad: 20px;
  padding: 0 var(--nav-pad);
  min-height: 78px;
  font-family: var(--font-mono);
  font-size: 15px;
  /* JetBrains Mono самохостится в 400/700 — берём 700, промежуточные веса
     браузер бы синтезировал и замылил штрих */
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--metal-muted-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s ease;
}

/* // prefix — hidden at rest, slides in on hover/active */
.main-nav a::before {
  content: '//';
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--metal-muted-2);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  line-height: 1;
}

/* glowing underline — scales in from left */
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--nav-pad);
  right: var(--nav-pad);
  height: 2px;
  /* Полированная фаска: блик по центру, затухание к краям */
  background: linear-gradient(90deg, rgba(139, 139, 148, 0.25) 0%, #ffffff 50%, rgba(139, 139, 148, 0.25) 100%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35), 0 1px 0 rgba(0, 0, 0, 0.5);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--metal-ink);
}

.main-nav a:hover::before,
.main-nav a.active::before {
  opacity: 1;
  transform: translateX(0);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active {
  color: #fff;
  font-weight: 700;
}

.main-nav a.active::before {
  color: #ffffff;
}

/* ============================================================
   Действия шапки — «В меню» (стекло) и «Документация» (металл)
   Врезаются в третью колонку сетки .topbar (бейдж скрыт).
   ============================================================ */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease, transform 0.14s ease;
}

.topbar-btn:active { transform: translateY(1px); }

.topbar-btn-ico {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

/* Стекло — вторичное действие «В меню» */
.topbar-btn--glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-top);
  color: #e6e6ea;
}

.topbar-btn--glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Металл — основное действие «Документация» */
.topbar-btn--metal {
  background: var(--metal-face);
  border: 0;
  color: #0a0a0c;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 10px rgba(0, 0, 0, 0.6);
}

.topbar-btn--metal:hover { filter: brightness(1.08); }

/* Навигация ужимается раньше кнопок: сначала кегль и отступы, потом подписи.
   --nav-pad тянет за собой и подчёркивание, поэтому оно всегда по тексту. */
@media (max-width: 1400px) {
  .main-nav a { --nav-pad: 15px; font-size: 14px; letter-spacing: 0.08em; }
}

@media (max-width: 1180px) {
  .main-nav a { --nav-pad: 11px; font-size: 13px; letter-spacing: 0.06em; }
  .main-nav a::before { font-size: 9px; }
}

/* Узкие экраны: металлическая кнопка остаётся, стеклянная сжимается до иконки */
@media (max-width: 1180px) {
  .topbar-btn { padding: 9px 12px; letter-spacing: 0.1em; }
  .topbar-btn--glass .topbar-btn-label { display: none; }
}

@media (max-width: 860px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .topbar-btn--metal .topbar-btn-label { display: none; }
}

/* universe badge — hidden, logo moved to .brand */
.nav-universe-badge {
  display: none !important;
}

/* kept for legacy reference */
._nav-universe-badge-unused {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 10px;
  border: 1px solid rgba(154, 212, 0, 0.18);
  border-left: 2px solid rgba(154, 212, 0, 0.6);
  background: rgba(154, 212, 0, 0.028);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background 200ms, border-color 200ms;
}

.nav-universe-badge:hover {
  background: rgba(154, 212, 0, 0.07);
  border-left-color: rgba(154, 212, 0, 0.9);
}

.nav-universe-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  animation: cubeFloat 5s ease-in-out infinite, cubeGlow 5s ease-in-out infinite;
}

/* corner accent — top-right */
.nav-universe-badge::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(154, 212, 0, 0.55);
  border-right: 2px solid rgba(154, 212, 0, 0.55);
  pointer-events: none;
}

/* corner accent — bottom-left tick */
.nav-universe-badge::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  width: 18px;
  height: 2px;
  background: rgba(154, 212, 0, 0.35);
  pointer-events: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.login-btn,
.primary-action,
.outline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 5px;
  border: 1px solid transparent;
  color: #fff;
  background: transparent;
  text-transform: uppercase;
}

.login-btn {
  gap: 10px;
  min-height: 34px;
  color: #eef3eb;
  font-size: 13px;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #f0f3ea;
  border-radius: 50%;
}

.login-btn:hover,
.login-btn:focus-visible,
.login-btn.active {
  color: var(--acid-2);
  outline: none;
}

.login-btn:hover .login-mark,
.login-btn:focus-visible .login-mark,
.login-btn.active .login-mark {
  border-color: var(--acid-2);
  box-shadow: 0 0 14px rgba(200, 255, 0, 0.18);
}

.primary-action {
  min-width: 172px;
  padding: 0 22px;
  background: linear-gradient(135deg, #3917ce, #5322f0);
  box-shadow: 0 0 26px rgba(67, 33, 217, 0.34);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: box-shadow var(--transition), transform var(--transition);
}

.primary-action:hover,
.primary-action:focus-visible {
  box-shadow: 0 0 42px rgba(67, 33, 217, 0.58), 0 4px 16px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
  outline: none;
}

.layout {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr) 300px;
  gap: 12px;
  padding: 14px 18px 16px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 520px);
  gap: 14px;
  align-items: stretch;
  padding: 48px 18px 18px;
}

.login-hero,
.login-card {
  min-width: 0;
}

.login-hero {
  display: grid;
  align-content: center;
  min-height: 620px;
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(circle at 78% 20%, rgba(154, 212, 0, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(154, 212, 0, 0.12), transparent 50%),
    var(--panel);
}

.login-hero h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(70px, 11vw, 156px);
  line-height: 0.82;
  text-transform: uppercase;
}

.login-hero > p:last-of-type {
  max-width: 680px;
  margin: 0;
  color: #d6dfd1;
  font-size: 16px;
  line-height: 1.7;
}

.login-warning {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin-top: 32px;
  padding: 16px;
  border: 1px solid rgba(200, 255, 0, 0.34);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.52);
}

.login-warning strong {
  color: var(--acid-2);
  font-size: 12px;
  text-transform: uppercase;
}

.login-warning span {
  color: #dce5d8;
  font-size: 13px;
  line-height: 1.55;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 620px;
  padding: clamp(18px, 3vw, 34px);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.54);
}

.auth-mode-toggle button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #dce5d8;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-mode-toggle button:hover,
.auth-mode-toggle button:focus-visible,
.auth-mode-toggle button.is-active {
  border-color: rgba(200, 255, 0, 0.58);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.12);
  outline: none;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span {
  color: var(--acid-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 6px;
  color: var(--text);
  background: rgba(1, 4, 2, 0.76);
  font: inherit;
  font-size: 14px;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--acid-2);
  box-shadow: 0 0 18px rgba(154, 212, 0, 0.16);
  outline: none;
}

.auth-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  min-height: 42px;
  text-decoration: none;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.auth-actions .primary-action,
.auth-actions .outline-action {
  width: 100%;
  min-width: 0;
}

.auth-status {
  min-height: 42px;
  padding: 12px;
  border: 1px solid rgba(154, 212, 0, 0.22);
  border-radius: 6px;
  color: #d8e2d2;
  background: rgba(1, 4, 2, 0.46);
  font-size: 12px;
  line-height: 1.45;
}

.auth-status[data-status="success"] {
  border-color: rgba(200, 255, 0, 0.54);
  color: var(--acid-2);
}

.auth-status[data-status="error"] {
  border-color: rgba(255, 90, 90, 0.58);
  color: #ff8d8d;
}

.auth-profile {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(200, 255, 0, 0.36);
  border-radius: 7px;
  background: rgba(154, 212, 0, 0.08);
}

.auth-profile[hidden] {
  display: none;
}

.auth-profile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-profile strong {
  color: var(--acid-2);
  font-size: 22px;
  text-transform: uppercase;
}

.auth-profile code {
  overflow-wrap: anywhere;
  color: #eef5ea;
  font-family: var(--font-mono);
  font-size: 12px;
}

.auth-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  text-decoration: none;
}

.admin-layout {
  display: grid;
  gap: 14px;
  padding: 28px 18px 18px;
}

.admin-hero {
  min-height: 300px;
  padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(circle at 78% 20%, rgba(154, 212, 0, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(154, 212, 0, 0.12), transparent 50%),
    var(--panel);
}

.admin-hero h1 {
  max-width: 860px;
  margin: 10px 0 14px;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(54px, 8vw, 116px);
  line-height: 0.9;
  text-transform: uppercase;
}

.admin-hero > p:last-child {
  max-width: 760px;
  margin: 0;
  color: #d6dfd1;
  font-size: 15px;
  line-height: 1.65;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-form,
.admin-roster {
  padding: 18px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form h2 {
  margin-bottom: 2px;
}

.admin-form label {
  display: grid;
  gap: 7px;
}

.admin-form label span {
  color: var(--acid-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-form input,
.admin-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 6px;
  color: var(--text);
  background: rgba(1, 4, 2, 0.76);
  font: inherit;
  font-size: 14px;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: var(--acid-2);
  box-shadow: 0 0 18px rgba(154, 212, 0, 0.16);
  outline: none;
}

.admin-character-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-character-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(154, 212, 0, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.08), transparent 58%),
    rgba(3, 7, 4, 0.74);
}

.admin-character-card.is-active {
  border-color: rgba(200, 255, 0, 0.64);
  box-shadow: inset 0 0 24px rgba(154, 212, 0, 0.08);
}

.admin-character-card > span {
  color: var(--acid-2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-character-card h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}

.admin-character-card p {
  margin: 0;
  color: #cdd6c8;
  font-size: 12px;
  line-height: 1.45;
}

.admin-character-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.admin-character-card div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.admin-character-card dt {
  color: #9ba69a;
  font-size: 10px;
  text-transform: uppercase;
}

.admin-character-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.admin-market {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.admin-market .panel-title-row {
  align-items: flex-start;
}

.admin-market-note {
  max-width: 760px;
  margin: 8px 0 0;
  color: #cbd4c8;
  font-size: 13px;
  line-height: 1.55;
}

.admin-market-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-market-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-token-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(154, 212, 0, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(154, 212, 0, 0.1), transparent 52%),
    rgba(4, 9, 5, 0.78);
}

.admin-token-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-token-card header span {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--acid-2);
  font-size: 12px;
  font-weight: 900;
}

.admin-token-card h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}

.admin-coin-editor {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(154, 212, 0, 0.24);
  border-radius: 8px;
  background: rgba(1, 4, 2, 0.42);
}

.admin-coin-preview {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.72), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(154, 212, 0, 0.44), rgba(3, 7, 4, 0.95) 74%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.44), 0 0 18px rgba(154, 212, 0, 0.18);
}

.admin-coin-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-coin-preview span {
  color: var(--acid-2);
  font-size: 24px;
  font-weight: 900;
}

.admin-coin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-coin-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-coin-actions label,
.admin-coin-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(154, 212, 0, 0.52);
  border-radius: 6px;
  color: #fff;
  background: rgba(154, 212, 0, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-coin-actions input:disabled + label,
.admin-coin-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.admin-token-card label {
  display: grid;
  gap: 7px;
}

.admin-token-card label span {
  color: var(--acid-2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-token-card input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(154, 212, 0, 0.38);
  border-radius: 6px;
  color: #fff;
  background: rgba(1, 4, 2, 0.7);
  font: inherit;
}

.admin-token-card input:disabled {
  color: rgba(240, 242, 237, 0.5);
  cursor: not-allowed;
  opacity: 0.68;
}

.admin-token-card .admin-coin-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.admin-market-form > .primary-action {
  grid-column: 1 / -1;
}

.content-sync-panel {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1200;
  display: grid;
  gap: 8px;
  width: min(300px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(200, 255, 0, 0.34);
  border-radius: 7px;
  color: #e8f1e4;
  background:
    linear-gradient(180deg, rgba(154, 212, 0, 0.11), transparent),
    rgba(1, 5, 3, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

.content-sync-panel strong {
  color: var(--acid-2);
  font-size: 12px;
  text-transform: uppercase;
}

.content-sync-panel span,
.content-sync-panel small {
  color: #dbe7d5;
  font-size: 11px;
  line-height: 1.45;
}

.content-sync-panel small:empty {
  display: none;
}

.content-sync-panel small.is-error {
  color: #ff8d8d;
}

.content-sync-panel button {
  min-height: 34px;
  border: 1px solid rgba(200, 255, 0, 0.42);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.content-sync-panel button:hover,
.content-sync-panel button:focus-visible {
  border-color: var(--acid-2);
  background: rgba(154, 212, 0, 0.16);
  outline: none;
}

.content-sync-panel,
.world-state-inspector {
  display: none !important;
}

.client-layout,
.client-locked {
  padding: 18px;
}

.client-locked {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 96px);
  margin: 18px;
  padding: clamp(28px, 6vw, 72px);
}

.client-locked[hidden],
.client-layout[hidden],
.client-character-panel[hidden] {
  display: none;
}

.client-locked h1 {
  max-width: 720px;
  margin: 12px 0 14px;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(62px, 10vw, 128px);
  line-height: 0.84;
  text-transform: uppercase;
}

.client-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 20px;
  text-decoration: none;
}

.client-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: stretch;
  padding: clamp(20px, 3vw, 34px);
}

.client-hero h1 {
  max-width: 940px;
  margin: 10px 0 14px;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(54px, 8vw, 118px);
  line-height: 0.84;
  text-transform: uppercase;
}

.client-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #dfe9da;
  font-size: 15px;
  line-height: 1.65;
}

.client-identity {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(154, 212, 0, 0.34);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(154, 212, 0, 0.1), transparent),
    rgba(1, 4, 2, 0.52);
}

.client-identity > span {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(200, 255, 0, 0.5);
  border-radius: 999px;
  color: var(--acid-2);
  font-size: 11px;
  font-weight: 900;
}

.client-identity dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.client-identity div {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.16);
}

.client-identity div:last-child {
  border-bottom: 0;
}

.client-identity dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.client-identity dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.client-status {
  display: block;
  margin: 12px 0;
}

.client-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 12px;
}

.client-grid .panel {
  min-width: 0;
  padding: 18px;
}

.client-balance-panel,
.client-character-panel {
  grid-row: span 2;
}

.client-routes-panel {
  grid-column: span 2;
}

.client-balance-grid {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.client-balance-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 14px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.52);
}

.client-balance-card span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(200, 255, 0, 0.48);
  border-radius: 50%;
  color: var(--acid-2);
  font-size: 11px;
  font-weight: 900;
}

.client-balance-card strong {
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.client-wallet-panel {
  display: grid;
  gap: 14px;
  grid-column: span 2;
  overflow: hidden;
  border-color: rgba(255, 210, 76, 0.38);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 210, 76, 0.18), transparent 30%),
    radial-gradient(circle at 18% 74%, rgba(200, 255, 0, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(255, 210, 76, 0.075), transparent 52%),
    rgba(4, 8, 3, 0.9);
}

.client-wallet-panel .panel-title-row {
  align-items: start;
}

.client-wallet-panel .panel-title-row p {
  margin: 7px 0 0;
  color: #dfe7d6;
  font-size: 12px;
  line-height: 1.45;
}

.client-wallet-panel .panel-title-row > span {
  width: fit-content;
  justify-self: end;
  padding: 7px 10px;
  border: 1px solid rgba(255, 210, 76, 0.48);
  border-radius: 999px;
  color: #ffd24c;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-wallet-address,
.client-wallet-total,
.client-wallet-asset {
  border: 1px solid rgba(255, 210, 76, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 210, 76, 0.07), transparent 52%),
    rgba(1, 4, 2, 0.55);
}

.client-wallet-address {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.client-wallet-address span,
.client-wallet-total span,
.client-wallet-asset dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-wallet-address strong {
  color: #fff7d2;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.client-wallet-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: end;
  padding: 18px;
}

.client-wallet-total strong {
  grid-column: 1;
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.92;
  letter-spacing: 0;
}

.client-wallet-total em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #ffd24c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.client-wallet-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.client-wallet-asset {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.client-wallet-asset > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.client-wallet-asset > div span {
  color: #ffd24c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-wallet-asset > div strong {
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.client-wallet-asset dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.client-wallet-asset dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 210, 76, 0.16);
}

.client-wallet-asset dd {
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.client-wallet-asset .positive {
  color: #54ff9d;
}

.client-wallet-asset .negative {
  color: #ff5959;
}

.client-wallet-asset .neutral {
  color: #ffd24c;
}

.admin-wallet-panel {
  grid-column: 1 / -1;
}

.client-wide-action {
  width: 100%;
}

.client-action-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.client-action-stack div,
.client-action-card,
.client-ledger {
  border: 1px solid rgba(154, 212, 0, 0.24);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.48);
}

.client-action-stack div {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.client-action-stack strong,
.client-action-card strong,
.client-ledger strong {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
}

.client-action-stack span,
.client-action-card p,
.client-ledger span,
.client-ledger p {
  margin: 0;
  color: #d7e1d2;
  font-size: 12px;
  line-height: 1.5;
}

.client-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.client-action-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
}

.client-action-card > span {
  color: var(--acid-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-action-card .outline-action {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  margin-top: 2px;
}

.client-ledger {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
}

.client-ledger div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.15);
}

.client-ledger div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.character-console-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.character-console-stats div {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(154, 212, 0, 0.3);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.52);
}

.character-console-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.character-console-stats strong {
  color: var(--acid-2);
  font-size: 28px;
}

.client-character .client-identity,
.client-character .client-action-card,
.client-character .client-ledger,
.client-character .client-action-stack div {
  border-color: rgba(255, 44, 183, 0.36);
}

.client-character .client-identity > span,
.client-character .client-action-card > span,
.client-character .character-console-stats strong {
  color: #ff4fc7;
}

.left-rail,
.right-rail,
.content {
  min-width: 0;
}

.left-rail,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
}

.top-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  min-width: 0;
}

.center-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.panel,
.hero-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.055), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 45%),
    var(--panel);
  box-shadow: inset 0 0 28px rgba(154, 212, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.18), 0 24px 56px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  transition: box-shadow 240ms ease, border-color 240ms ease;
}

.panel::before,
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(154, 212, 0, 0.04), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(154, 212, 0, 0.05) 1px, transparent 1px) 0 0 / 100% 28px;
  opacity: 0.45;
}

.panel > *,
.hero-card > * {
  position: relative;
}

.panel h2,
.hero-card h2 {
  margin: 0;
  color: var(--acid-2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel p {
  margin: 10px 0 0;
  color: #c1c7bd;
  font-size: 13px;
  line-height: 1.65;
}

.nav-panel {
  padding: 18px 18px 14px;
}

.nav-panel.compact {
  padding-top: 16px;
}

.menu-list,
.feature-list,
.social-list,
.event-list,
.stat-list {
  display: grid;
  gap: 2px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.menu-list li,
.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 5px;
  color: #cbd0c8;
  font-size: 13px;
}

.menu-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
}

.menu-list li.selected {
  color: #fff;
  background: linear-gradient(90deg, rgba(154, 212, 0, 0.48), rgba(154, 212, 0, 0.1));
}

.universal-menu-list a {
  align-items: flex-start;
  padding: 6px 0;
}

.universal-menu-list a > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.universal-menu-list strong {
  color: inherit;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.universal-menu-list em {
  color: #b8c0b4;
  font-size: 10.5px;
  font-style: normal;
  line-height: 1.35;
}

.universal-menu-list li.selected em {
  color: rgba(255, 255, 255, 0.78);
}

.menu-list svg,
.feature-list svg,
.outline-action svg,
.panel-title-row svg,
.social-list svg,
.stat-list svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--acid-2);
}

.cta-panel,
.coin-panel,
.rent-card,
.owner-card,
.nft-card {
  padding: 18px;
}

.outline-action {
  width: 100%;
  gap: 12px;
  margin-top: 18px;
  padding: 0 16px;
  border-color: rgba(154, 212, 0, 0.56);
  color: #f0f4ea;
  background: linear-gradient(90deg, rgba(154, 212, 0, 0.09), rgba(154, 212, 0, 0.02));
  font-size: 13px;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.outline-action:hover {
  border-color: var(--acid-2);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.13);
  box-shadow: 0 0 20px rgba(154, 212, 0, 0.13);
}

.outline-action.muted {
  margin-top: 14px;
}

.coin-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.coin {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 5px solid #8a5d14;
  border-radius: 50%;
  color: #fdf4c3;
  background:
    radial-gradient(circle at 35% 30%, #fff1a2, transparent 18%),
    repeating-conic-gradient(from 0deg, #c0831f 0deg 12deg, #f6ce59 12deg 19deg),
    radial-gradient(circle, #b36f14, #4a2d09);
  box-shadow: 0 0 26px rgba(242, 194, 78, 0.38);
  font-family: var(--font-sans);
  font-size: 36px;
}

.coin-row strong {
  display: block;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.coin-row span {
  color: #c5cbc2;
  font-size: 13px;
}

.left-footer {
  margin-top: auto;
  padding: 18px 18px 8px;
  color: #8d958f;
  font-size: 12px;
}

.social-mini {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  color: #a0a8a0;
  font-size: 17px;
}

.left-footer p {
  margin: 0;
  line-height: 1.55;
}

.hero-card {
  container-type: inline-size;
  min-height: 800px;
}

.breadcrumb {
  padding: 14px 18px 0;
  color: #a8afaa;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(430px, 50%) minmax(300px, 1fr);
  min-height: 780px;
}

.portrait-stage {
  position: relative;
  min-height: 780px;
  overflow: hidden;
}

.portrait-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.16), transparent 28%, transparent),
    radial-gradient(circle at 55% 35%, rgba(154, 212, 0, 0.24), transparent 42%);
  mix-blend-mode: screen;
}

.portrait-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(3, 6, 4, 0.76));
}

.matrix-field {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(154, 212, 0, 0.22) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(154, 212, 0, 0.14) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 40%, rgba(154, 212, 0, 0.16), transparent 60%);
  mask-image: linear-gradient(90deg, #000 68%, transparent 100%);
  opacity: 0.38;
}

.matrix-field::after {
  content: "101001 ALTG 0101 CORE 2067 NEURAL NODE CODE";
  position: absolute;
  inset: 20px 14px auto;
  color: rgba(154, 212, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  word-spacing: 16px;
}

.matrix-field span {
  position: absolute;
  color: rgba(154, 212, 0, 0.5);
  font-family: var(--font-mono);
  font-size: 10px;
  text-shadow: 0 0 8px rgba(154, 212, 0, 0.42);
  animation: matrixPulse 3.8s ease-in-out infinite;
}

.photo-layer {
  position: absolute;
  top: 44px;
  left: 8px;
  right: auto;
  bottom: auto;
  z-index: 3;
  width: min(360px, calc(100% - 16px));
  aspect-ratio: 9 / 16;
  max-height: none;
  border: 1px solid rgba(154, 212, 0, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(154, 212, 0, 0.09), transparent 58%),
    #050805;
  box-shadow: 0 0 24px rgba(154, 212, 0, 0.2), inset 0 0 28px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.photo-layer--full {
  inset: 0;
  width: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.photo-layer--full .hero-photo {
  object-fit: cover;
  object-position: center top;
}

.photo-layer::before,
.photo-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.photo-layer::before {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.1), transparent 20%, transparent 80%, rgba(154, 212, 0, 0.08)),
    linear-gradient(0deg, rgba(3, 6, 4, 0.28), transparent 24%, transparent 76%, rgba(3, 6, 4, 0.24));
  mix-blend-mode: screen;
  opacity: 0.55;
}

.photo-layer::after {
  z-index: 2;
  background: linear-gradient(rgba(255, 255, 255, 0.035) 50%, transparent 50%) 0 0 / 100% 4px;
  opacity: 0.18;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #050805;
  filter: none;
  image-rendering: auto;
}

.photo-controls {
  position: absolute;
  top: 10px;
  left: 8px;
  right: 8px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-add,
.photo-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(154, 212, 0, 0.62);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(7, 15, 10, 0.78);
  box-shadow: inset 0 0 18px rgba(154, 212, 0, 0.06);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.photo-add {
  cursor: pointer;
}

.photo-add::before {
  content: "+";
  margin-right: 7px;
  font-size: 17px;
  line-height: 1;
}

.photo-clear {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.photo-add:hover,
.photo-clear:hover,
.photo-add:focus-visible,
.photo-clear:focus-visible {
  border-color: var(--acid-2);
  color: #fff;
  background: rgba(154, 212, 0, 0.14);
  outline: none;
}

.photo-thumbs {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  z-index: 6;
  display: flex;
  gap: 8px;
  min-height: 72px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 212, 0, 0.6) transparent;
}

.photo-thumbs:empty {
  display: none;
}

.photo-thumb {
  flex: 0 0 auto;
  width: 41px;
  height: 72px;
  padding: 0;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 5px;
  background: rgba(7, 15, 10, 0.86);
  overflow: hidden;
}

.photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050805;
  image-rendering: auto;
}

.photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(154, 212, 0, 0.46), 0 0 16px rgba(154, 212, 0, 0.34);
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(200, 255, 0, 0.72); opacity: 1; }
  50% { box-shadow: 0 0 18px rgba(200, 255, 0, 0.9), 0 0 32px rgba(200, 255, 0, 0.32); opacity: 0.7; }
}

@keyframes matrixPulse {
  0%,
  100% {
    opacity: 0.18;
    transform: translateY(0);
  }

  50% {
    opacity: 0.78;
    transform: translateY(-6px);
  }
}

@container (max-width: 560px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    min-height: 720px;
  }

  .hero-copy {
    padding: 12px 20px 26px;
  }
}

@container (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    min-height: 780px;
  }
}

.architect-svg {
  position: absolute;
  left: 50%;
  bottom: -8px;
  z-index: 1;
  width: min(128%, 610px);
  height: auto;
  transform: translateX(-50%);
  color: var(--acid);
  filter: drop-shadow(0 0 24px rgba(154, 212, 0, 0.34));
  transition: opacity 180ms ease, transform 180ms ease;
}

.portrait-stage.has-photo .architect-svg {
  opacity: 0;
  transform: translateX(-50%) scale(0.98);
  pointer-events: none;
}

.architect-svg .line {
  fill: none;
  stroke: rgba(12, 15, 13, 0.92);
  stroke-width: 7;
  stroke-linecap: round;
}

.architect-svg .line.thin {
  stroke-width: 3;
  opacity: 0.72;
}

.architect-svg .line.accent {
  stroke: rgba(154, 212, 0, 0.92);
  stroke-width: 2;
}

.architect-svg .line.dark {
  stroke: rgba(0, 0, 0, 0.52);
  stroke-width: 5;
}

.veil-edge {
  fill: rgba(14, 17, 15, 0.88);
  stroke: rgba(154, 212, 0, 0.72);
  stroke-width: 3;
}

.digital-noise circle {
  fill: var(--acid-2);
  opacity: 0.9;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  min-height: 100%;
  padding: clamp(54px, 8%, 84px) clamp(34px, 6%, 58px) 58px clamp(24px, 5%, 48px);
  position: relative;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: clamp(16px, 4%, 36px);
  top: 48px;
  bottom: 54px;
  width: 1px;
  background: linear-gradient(transparent, rgba(154, 212, 0, 0.55), transparent);
  opacity: 0.6;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 8px;
  padding: 5px 9px;
  border: 1px solid rgba(154, 212, 0, 0.32);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.08);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 560px;
  margin: 0;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(64px, 6.5vw, 92px);
  line-height: 0.88;
  text-transform: uppercase;
  text-shadow: 0 0 32px rgba(154, 212, 0, 0.44), 0 0 64px rgba(154, 212, 0, 0.18);
}

.hero-copy blockquote {
  position: relative;
  max-width: 470px;
  margin: 32px 0 0;
  padding: 18px 22px 18px 44px;
  border: 1px solid rgba(154, 212, 0, 0.22);
  border-left-color: rgba(200, 255, 0, 0.72);
  border-radius: 8px;
  color: #e3e7df;
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.09), transparent 72%),
    rgba(5, 12, 8, 0.58);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.52;
  text-transform: uppercase;
}

.hero-copy blockquote span {
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: 46px;
  line-height: 0;
}

.hero-copy blockquote span:first-child {
  position: absolute;
  left: 13px;
  top: 31px;
}

.hero-copy blockquote span:last-child {
  display: inline-block;
  margin-left: 8px;
  transform: translateY(15px);
}

.meta-grid {
  display: grid;
  grid-template-columns: minmax(138px, 0.72fr) minmax(160px, 1fr);
  gap: 0;
  width: min(520px, 100%);
  margin: 10px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(154, 212, 0, 0.08), rgba(154, 212, 0, 0.025)),
    rgba(5, 12, 8, 0.68);
  font-size: 12px;
  text-transform: uppercase;
}

.meta-grid div {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  min-height: 33px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.12);
}

.meta-grid div:last-child {
  border-bottom: 0;
}

.meta-grid dt {
  color: #aeb6af;
  padding-right: 16px;
}

.meta-grid dd {
  min-width: 0;
  margin: 0;
  color: #e8ede6;
}

.meta-grid dd:not(.live) {
  color: #f0f2ed;
}

.meta-grid .live {
  color: var(--acid-2);
}

.meta-grid .live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--acid-2);
  vertical-align: 1px;
}

.character-tabs {
  padding-top: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-height: 43px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-width: 0;
  border: 0;
  border-right: 1px solid rgba(154, 212, 0, 0.14);
  color: #c6ccc4;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.tab:hover {
  color: #e4ebe0;
  background: rgba(154, 212, 0, 0.06);
}

.tab.active {
  color: #fff;
  background: rgba(154, 212, 0, 0.1);
  box-shadow: inset 0 2px 0 var(--acid-2);
}

.tab-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.1fr);
  gap: 8px;
  padding: 8px;
}

.tab-panels .text-panel {
  grid-column: 1 / -1;
}

.tab-panels .tokenization-panel,
.tab-panels .neuro-panel {
  grid-column: 1 / -1;
}

.neuro-panel .char-chat {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(154, 212, 0, 0.18);
  box-shadow: 0 0 0 1px rgba(154, 212, 0, 0.06), 0 4px 32px rgba(154, 212, 0, 0.05), inset 0 0 40px rgba(154, 212, 0, 0.025);
}

.inner-panel {
  min-height: 190px;
  padding: 16px;
  background: rgba(8, 18, 13, 0.78);
}

.tab-panels .blaze-skills-panel {
  grid-column: 1 / -1;
}

.blaze-skills-panel {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-color: rgba(174, 255, 0, 0.58);
  background:
    linear-gradient(90deg, rgba(174, 255, 0, 0.06) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(174, 255, 0, 0.035) 1px, transparent 1px) 0 0 / 100% 28px,
    radial-gradient(circle at 38% 0, rgba(174, 255, 0, 0.15), transparent 36%),
    rgba(1, 7, 3, 0.95);
  font-family: var(--font-sans);
}

.blaze-skills-core {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 2vw, 28px);
}

.blaze-skills-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 12px 0 16px;
  border-bottom: 1px solid rgba(174, 255, 0, 0.22);
}

.blaze-skill-identity,
.blaze-skill-controls,
.blaze-skill-points {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blaze-skill-avatar {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(174, 255, 0, 0.72);
  border-radius: 50%;
  color: var(--acid-2);
  background:
    radial-gradient(circle at 46% 35%, rgba(255, 255, 255, 0.22), transparent 20%),
    repeating-radial-gradient(circle, rgba(174, 255, 0, 0.45) 0 1px, transparent 1px 8px),
    rgba(2, 11, 4, 0.9);
  box-shadow: 0 0 24px rgba(174, 255, 0, 0.24), inset 0 0 24px rgba(174, 255, 0, 0.12);
  font-family: var(--font-sans);
  font-size: 36px;
}

.blaze-skill-character h3 {
  margin: 0;
  color: var(--acid-2);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 0.92;
  text-transform: uppercase;
}

.blaze-skill-character small {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  margin-left: 8px;
  border: 1px solid rgba(174, 255, 0, 0.65);
  border-radius: 5px;
  font-size: 16px;
  line-height: 1;
}

.blaze-skill-character span,
.blaze-skill-points strong {
  display: block;
  color: #e7ede2;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-points {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(174, 255, 0, 0.26);
  border-radius: 6px;
  background: rgba(4, 14, 5, 0.74);
}

.blaze-skill-points strong {
  color: var(--acid-2);
  font-size: 14px;
}

.blaze-skill-points span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--acid-2);
  font-size: 18px;
}

.blaze-skill-reset {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(174, 255, 0, 0.44);
  border-radius: 5px;
  color: #e7ede2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(5, 9, 6, 0.82);
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-reset:hover,
.blaze-skill-reset:focus-visible {
  border-color: var(--acid-2);
  color: var(--acid-2);
  outline: none;
}

.blaze-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  align-items: stretch;
}

.blaze-skill-card {
  position: relative;
  display: flex;
  container-type: inline-size;
  min-width: 0;
  min-height: 438px;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(174, 255, 0, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 15%, rgba(174, 255, 0, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(174, 255, 0, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(19, 47, 13, 0.78), rgba(1, 7, 3, 0.9));
  box-shadow: inset 0 0 30px rgba(174, 255, 0, 0.055), 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.blaze-skill-card::before,
.blaze-skill-card::after {
  content: "";
  position: absolute;
  inset: 7px auto auto 7px;
  width: 42px;
  height: 42px;
  border-top: 1px solid rgba(174, 255, 0, 0.52);
  border-left: 1px solid rgba(174, 255, 0, 0.52);
  pointer-events: none;
}

.blaze-skill-card::after {
  inset: auto 7px 7px auto;
  border: 0;
  border-right: 1px solid rgba(174, 255, 0, 0.52);
  border-bottom: 1px solid rgba(174, 255, 0, 0.52);
}

.blaze-skill-top {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.blaze-skill-summary {
  min-width: 0;
}

.blaze-skill-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(174, 255, 0, 0.75);
  border-radius: 18px;
  background:
    repeating-radial-gradient(circle, rgba(174, 255, 0, 0.4) 0 1px, transparent 1px 10px),
    radial-gradient(circle, rgba(174, 255, 0, 0.24), rgba(1, 7, 3, 0.88) 62%);
  box-shadow: 0 0 24px rgba(174, 255, 0, 0.22), inset 0 0 26px rgba(174, 255, 0, 0.16);
}

.blaze-skill-art::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(174, 255, 0, 0.24);
  border-radius: 50%;
  pointer-events: none;
}

.blaze-skill-art > span {
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.blaze-skill-art img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: contain;
}

.blaze-skill-art.has-skill-image {
  background: rgba(2, 8, 4, 0.82);
}

.blaze-skill-art.has-skill-image::after {
  opacity: 0;
}

.blaze-skill-tools {
  position: absolute;
  left: 50%;
  bottom: 7px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.16s ease;
}

.blaze-skill-tools input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.blaze-skill-tools button {
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid rgba(174, 255, 0, 0.62);
  border-radius: 4px;
  color: var(--acid-2);
  background: rgba(3, 8, 4, 0.94);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.blaze-skill-art:hover .blaze-skill-tools,
.blaze-skill-art:focus-within .blaze-skill-tools {
  opacity: 1;
  pointer-events: auto;
}

.blaze-skill-tools button:hover,
.blaze-skill-tools button:focus-visible {
  border-color: var(--acid-2);
  background: rgba(174, 255, 0, 0.16);
  outline: none;
}

.blaze-skill-card h3 {
  margin: 0;
  color: var(--acid-2);
  font-family: var(--font-sans);
  max-width: 100%;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.14;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  word-break: normal;
  hyphens: auto;
}

.blaze-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.blaze-skill-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(174, 255, 0, 0.4);
  border-radius: 4px;
  color: var(--acid-2);
  background: rgba(174, 255, 0, 0.08);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.blaze-skill-pill.is-time {
  color: #dce2d7;
  border-color: rgba(255, 255, 255, 0.18);
}

.blaze-skill-pill.is-duration {
  color: #8cfffb;
  border-color: rgba(66, 255, 228, 0.3);
}

.blaze-skill-pill.is-energy {
  color: #ffe45c;
  border-color: rgba(255, 228, 92, 0.34);
}

.blaze-skill-desc {
  margin: 18px 0 14px;
  color: #d7ded3;
  font-size: 13px;
  line-height: 1.58;
}

.blaze-skill-effects {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.blaze-skill-effect {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 25px;
  border-bottom: 1px solid rgba(174, 255, 0, 0.12);
  color: var(--acid-2);
}

.blaze-skill-effect.is-negative {
  color: #ff553b;
  border-bottom-color: rgba(255, 85, 59, 0.16);
}

.blaze-skill-effect span,
.blaze-skill-effect strong {
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.blaze-skill-code-wrap {
  margin: 2px 0 16px;
}

.blaze-skill-code-wrap > span {
  display: block;
  margin-bottom: 8px;
  color: var(--acid-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-code {
  display: block;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid rgba(174, 255, 0, 0.3);
  border-radius: 5px;
  color: rgba(231, 237, 226, 0.76);
  background: rgba(0, 4, 2, 0.62);
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blaze-skill-runtime {
  display: grid;
  gap: 7px;
  margin: 12px 0 14px;
}

.blaze-skill-runtime button {
  min-height: 38px;
  border: 1px solid rgba(174, 255, 0, 0.64);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(174, 255, 0, 0.08);
  font: 900 12px/1 Arial, "Helvetica Neue", sans-serif;
  text-transform: uppercase;
}

.blaze-skill-runtime button:hover:not(:disabled),
.blaze-skill-runtime button:focus-visible:not(:disabled) {
  background: rgba(174, 255, 0, 0.16);
  box-shadow: 0 0 18px rgba(174, 255, 0, 0.18);
  outline: none;
}

.blaze-skill-runtime button:disabled {
  cursor: not-allowed;
  color: #93a18d;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.blaze-skill-runtime small {
  color: #aeb9aa;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-card:hover {
  border-color: rgba(174, 255, 0, 0.68);
  box-shadow: inset 0 0 36px rgba(174, 255, 0, 0.09), 0 0 24px rgba(174, 255, 0, 0.1), 0 14px 36px rgba(0, 0, 0, 0.26);
}

.blaze-skill-card.is-active {
  border-color: var(--acid-2);
  box-shadow: inset 0 0 34px rgba(174, 255, 0, 0.1), 0 0 24px rgba(174, 255, 0, 0.12);
}

.blaze-skill-card.is-active .blaze-skill-runtime small {
  color: var(--acid-2);
}

@container (max-width: 300px) {
  .blaze-skill-top {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .blaze-skill-art {
    width: 78px;
    height: 78px;
    border-radius: 15px;
  }

  .blaze-skill-art img {
    border-radius: 13px;
  }

  .blaze-skill-card h3 {
    min-height: 42px;
  }

  .blaze-skill-tags {
    margin-top: 8px;
  }
}

.blaze-skill-level {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(174, 255, 0, 0.24);
  border-radius: 5px;
  background: rgba(0, 5, 2, 0.52);
}

.blaze-skill-level-label {
  display: block;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.blaze-skill-bars span {
  height: 12px;
  border: 1px solid rgba(174, 255, 0, 0.22);
  background: rgba(174, 255, 0, 0.04);
}

.blaze-skill-bars .is-filled {
  background: linear-gradient(90deg, var(--acid-2), #74b400);
  box-shadow: 0 0 12px rgba(174, 255, 0, 0.22);
}

.blaze-skill-bonuses {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(138px, 1fr));
  gap: 12px;
  align-items: stretch;
  padding-top: 16px;
  border-top: 1px solid rgba(174, 255, 0, 0.2);
}

.blaze-skill-bonuses h2,
.blaze-skill-bonus {
  min-height: 64px;
  margin: 0;
  border: 1px solid rgba(174, 255, 0, 0.24);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(174, 255, 0, 0.08), transparent),
    rgba(3, 9, 4, 0.74);
}

.blaze-skill-bonuses h2 {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #dce2d7;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-bonus {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 11px 14px;
}

.blaze-skill-bonus span,
.blaze-skill-bonus strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blaze-skill-bonus span {
  color: rgba(174, 255, 0, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.blaze-skill-bonus strong {
  color: var(--acid-2);
  font-size: 20px;
  font-weight: 900;
}

/* ── Yellow theme overrides for DZENDEX skill cards ──────────────────── */
.theme-fuchsia .blaze-skill-card {
  border-color: rgba(255, 200, 50, 0.48);
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 200, 50, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(255, 200, 50, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(47, 35, 5, 0.82), rgba(7, 5, 1, 0.94));
  box-shadow: inset 0 0 30px rgba(255, 200, 50, 0.055), 0 10px 28px rgba(0, 0, 0, 0.22);
}
.theme-fuchsia .blaze-skill-card::before {
  border-top: 1px solid rgba(255, 200, 50, 0.52);
  border-left: 1px solid rgba(255, 200, 50, 0.52);
}
.theme-fuchsia .blaze-skill-card::after {
  border-right: 1px solid rgba(255, 200, 50, 0.52);
  border-bottom: 1px solid rgba(255, 200, 50, 0.52);
}
.theme-fuchsia .blaze-skill-card:hover {
  border-color: rgba(255, 200, 50, 0.72);
  box-shadow: inset 0 0 36px rgba(255, 200, 50, 0.09), 0 0 24px rgba(255, 200, 50, 0.12), 0 14px 36px rgba(0, 0, 0, 0.28);
}
.theme-fuchsia .blaze-skill-card.is-active {
  border-color: rgb(255, 200, 50);
  box-shadow: inset 0 0 34px rgba(255, 200, 50, 0.12), 0 0 24px rgba(255, 200, 50, 0.16);
}
.theme-fuchsia .blaze-skill-art {
  background:
    radial-gradient(circle, rgba(255, 200, 50, 0.22), rgba(7, 5, 1, 0.88) 62%);
  box-shadow: 0 0 24px rgba(255, 200, 50, 0.22), inset 0 0 26px rgba(255, 200, 50, 0.14);
}
.theme-fuchsia .blaze-skill-art::after {
  border-color: rgba(255, 200, 50, 0.28);
}
.theme-fuchsia .blaze-skill-art:hover .blaze-skill-tools,
.theme-fuchsia .blaze-skill-art:focus-within .blaze-skill-tools {
  background: rgba(255, 200, 50, 0.14);
}
.theme-fuchsia .blaze-skill-level {
  border-color: rgba(255, 200, 50, 0.26);
}
.theme-fuchsia .blaze-skill-bars span {
  border-color: rgba(255, 200, 50, 0.24);
  background: rgba(255, 200, 50, 0.05);
}
.theme-fuchsia .blaze-skill-bars .is-filled {
  background: linear-gradient(90deg, #ffc832, #e08000);
  box-shadow: 0 0 12px rgba(255, 200, 50, 0.4);
}
.theme-fuchsia .blaze-skill-bonuses {
  border-top-color: rgba(255, 200, 50, 0.22);
}
.theme-fuchsia .blaze-skill-bonuses h2,
.theme-fuchsia .blaze-skill-bonus {
  border-color: rgba(255, 200, 50, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 200, 50, 0.08), transparent),
    rgba(7, 5, 1, 0.78);
}
.theme-fuchsia .blaze-skill-bonus span {
  color: rgba(255, 200, 50, 0.82);
}
.theme-fuchsia .blaze-skill-effect {
  border-bottom-color: rgba(255, 200, 50, 0.14);
}
.theme-fuchsia .blaze-skills-panel .blaze-skill-card h3 {
  color: #ffc832;
}

@media (max-width: 1500px) {
  .blaze-skill-bonuses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blaze-skill-bonuses h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .blaze-skills-head,
  .blaze-skill-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .blaze-skill-reset,
  .blaze-skill-points {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .blaze-skills-grid,
  .blaze-skill-bonuses {
    grid-template-columns: 1fr;
  }

  .blaze-skill-top {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .blaze-skill-art {
    width: 92px;
    height: 92px;
  }
}

.tokenization-panel {
  display: grid;
  gap: 16px;
  min-height: 270px;
}

.tokenization-lead {
  max-width: 980px;
  margin: 0;
  color: #d3dbd0;
  font-size: 13px;
  line-height: 1.65;
}

.tokenization-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.tokenization-economy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tokenization-economy article {
  position: relative;
  min-width: 0;
  padding: 13px 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong), transparent 26%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--line-strong), transparent 86%), transparent 62%),
    rgba(5, 10, 8, 0.78);
}

.tokenization-economy article::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 82px;
  height: 82px;
  border: 1px solid color-mix(in srgb, var(--line-strong), transparent 50%);
  border-radius: 50%;
  opacity: 0.5;
}

.tokenization-economy span,
.tokenization-economy em {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tokenization-economy strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 8px 0 4px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(20px, 2.1vw, 34px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tokenization-economy em {
  color: var(--accent);
  font-style: normal;
}

.token-balance-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: end;
  min-width: 0;
  min-height: 118px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(154, 212, 0, 0.12), transparent 54%),
    rgba(4, 10, 6, 0.72);
}

.token-balance-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -36px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(154, 212, 0, 0.12);
  opacity: 0.58;
}

.token-balance-card span,
.token-market-row.head span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.token-card-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tokenization-coin-preview {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.62), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(154, 212, 0, 0.46), rgba(3, 7, 4, 0.95) 72%);
  box-shadow: 0 0 18px rgba(154, 212, 0, 0.16);
}

.tokenization-coin-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tokenization-coin-preview b {
  color: var(--acid-2);
  font-size: 16px;
  font-weight: 900;
}

.token-balance-card strong {
  position: relative;
  z-index: 1;
  display: block;
  align-self: end;
  max-width: 100%;
  margin-top: 12px;
  overflow: hidden;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: clamp(34px, 3.65vw, 56px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-balance-card em {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  margin-top: 10px;
  overflow: hidden;
  color: var(--acid-2);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-market-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(1, 4, 2, 0.42);
}

.token-market-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 0.5fr) minmax(90px, 0.35fr);
  gap: 16px;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.14);
}

.token-market-row:last-child {
  border-bottom: 0;
}

.token-market-row strong {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
}

.token-market-row span,
.token-market-row em {
  color: #f4f6f0;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.token-market-row .positive {
  color: #34d471;
}

.token-market-row .negative {
  color: #ff4a5d;
}

/* ══════════════════════════════════════════════════════════
   HOME SCREEN — главный экран меню ALTERE:GO
   Технологичный HUD: стекло + шлифованный металл + acid-акцент,
   единый язык с .topbar/.portrait-hud (см. выше).
   ══════════════════════════════════════════════════════════ */

.home-page {
  margin: 0;
  background: #000;
  min-height: 100vh;
}

.hm-frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Верхняя строка ─────────────────────────────────────── */
.hm-topbar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 0 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 42%, rgba(0, 0, 0, 0.14) 100%),
    rgba(9, 10, 13, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: inset 0 1px 0 var(--glass-top);
  z-index: 5;
}

.hm-topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(169, 169, 178, 0.4) 30%, rgba(233, 233, 238, 0.6) 50%, rgba(169, 169, 178, 0.4) 70%, transparent 100%);
  pointer-events: none;
}

.hm-topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.hm-topbar-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  white-space: nowrap;
}

.hm-topbar-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(198, 220, 188, 0.65);
  min-width: 0;
}

.hm-status {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: hmPulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

.hm-clock {
  font-variant-numeric: tabular-nums;
  color: rgba(240, 242, 237, 0.7);
  white-space: nowrap;
}

.hm-session {
  color: rgba(198, 220, 188, 0.4);
  white-space: nowrap;
}

.hm-topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  background: var(--glass-bg);
  color: rgba(240, 242, 237, 0.75);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.hm-icon-btn:hover,
.hm-icon-btn:focus-visible {
  color: var(--metal-ink);
  border-color: rgba(233, 233, 238, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%), var(--glass-bg);
}

.hm-icon-btn:focus-visible {
  outline: 2px solid rgba(233, 233, 238, 0.8);
  outline-offset: 2px;
}

.hm-icon-btn[aria-pressed="true"] {
  color: var(--metal-ink);
  border-color: rgba(233, 233, 238, 0.5);
}

.hm-quicklinks {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  background: rgba(13, 16, 13, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  z-index: 30;
}

.hm-quicklinks a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(198, 220, 188, 0.75);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.hm-quicklinks a svg {
  flex-shrink: 0;
  color: var(--metal-muted-2);
}

.hm-quicklinks a:hover,
.hm-quicklinks a:focus-visible {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
  color: #fff;
}

@keyframes hmPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ── Центр: куб + слоган + карточки ─────────────────────── */
.hm-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

.hm-hero-cubewrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(520px, 90vw);
  aspect-ratio: 1;
}

.hm-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hm-ring {
  position: absolute;
  border: 1px solid rgba(154, 212, 0, 0.14);
  border-radius: 50%;
}

.hm-ring--1 { width: 46%; height: 46%; }
.hm-ring--2 { width: 68%; height: 68%; border-color: rgba(154, 212, 0, 0.09); }
.hm-ring--3 { width: 92%; height: 92%; border-color: rgba(154, 212, 0, 0.05); }

.hm-tick {
  position: absolute;
  top: 50%;
  width: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(154, 212, 0, 0.3), transparent);
}

.hm-tick--l { left: -8%; }
.hm-tick--r { right: -8%; }

.hm-cube-img {
  position: relative;
  z-index: 1;
  width: min(300px, 62%);
  height: auto;
  animation: cubeFloat 5s ease-in-out infinite, cubeGlow 5s ease-in-out infinite;
  will-change: transform, filter;
}

.hm-tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(210, 230, 200, 0.72);
}

.hm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
  width: min(1180px, 100%);
  margin-top: 8px;
}

.hm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px 22px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(9, 12, 9, 0.5);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.hm-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hm-card-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition), filter var(--transition);
}

.hm-card-title {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.hm-card-arrow {
  display: inline-flex;
  color: rgba(198, 220, 188, 0.45);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.hm-card:hover,
.hm-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(233, 233, 238, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(9, 12, 9, 0.5);
}

.hm-card:focus-visible {
  outline: 2px solid rgba(233, 233, 238, 0.8);
  outline-offset: 3px;
}

.hm-card:hover .hm-card-icon,
.hm-card:focus-visible .hm-card-icon {
  border-color: rgba(233, 233, 238, 0.55);
  box-shadow: 0 0 18px rgba(233, 233, 238, 0.16);
}

.hm-card:hover .hm-card-icon img,
.hm-card:focus-visible .hm-card-icon img {
  transform: scale(1.06);
  filter: brightness(1.15);
}

.hm-card:hover .hm-card-arrow,
.hm-card:focus-visible .hm-card-arrow {
  color: var(--metal-ink);
  transform: translateX(4px);
}

/* ── Нижняя строка: системные индикаторы ────────────────── */
.hm-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 20px;
  border-top: 1px solid rgba(154, 212, 0, 0.14);
  background: rgba(154, 212, 0, 0.02);
}

.hm-statusbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hm-statusbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: rgba(198, 220, 188, 0.4);
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.hm-statusbar-icon:hover,
.hm-statusbar-icon:focus-visible {
  color: var(--metal-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.hm-statusbar-icon--active {
  color: var(--metal-ink);
}

.hm-statusbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.hm-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(198, 220, 188, 0.4);
}

.hm-stat-value {
  color: rgba(240, 242, 237, 0.7);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
}

.hm-stat-graph {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.hm-stat-graph i {
  display: block;
  width: 2px;
  height: 40%;
  background: rgba(154, 212, 0, 0.45);
  border-radius: 1px;
  animation: hmBar 2.1s ease-in-out infinite;
}

.hm-stat-graph i:nth-child(1) { animation-delay: -1.9s; }
.hm-stat-graph i:nth-child(2) { animation-delay: -1.6s; }
.hm-stat-graph i:nth-child(3) { animation-delay: -1.3s; }
.hm-stat-graph i:nth-child(4) { animation-delay: -1.0s; }
.hm-stat-graph i:nth-child(5) { animation-delay: -0.7s; }
.hm-stat-graph i:nth-child(6) { animation-delay: -0.4s; }
.hm-stat-graph i:nth-child(7) { animation-delay: -0.1s; }
.hm-stat-graph i:nth-child(8) { animation-delay: -1.55s; }

@keyframes hmBar {
  0%, 100% { height: 20%; }
  50%      { height: 90%; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-status-dot,
  .hm-cube-img,
  .hm-stat-graph i {
    animation: none;
  }
}

@media (max-width: 760px) {
  .hm-topbar-mid {
    display: none;
  }
  .hm-statusbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hm-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .hm-cards {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   HOME GATE — кодовая фраза перед входом в ALTERE:GO
   Тот же гейт, что documentation/index.html (гейт → загрузка →
   приветствие персонажа), но по успеху открывает меню на этой же
   странице. Список фраз/хэшей — assets/home-gate.js, должен
   совпадать с CHARACTERS в documentation/js/site.js.
   ══════════════════════════════════════════════════════════ */

.hm-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 0;
  background: #030303;
  transition: opacity 320ms ease;
}

.hm-gate-overlay[hidden] {
  display: none;
}

.hm-gate-overlay--leaving {
  opacity: 0;
  pointer-events: none;
}

.hm-gate-overlay::before,
.hm-gate-overlay::after {
  content: "";
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 65%);
  pointer-events: none;
}
.hm-gate-overlay::before { top: -160px; right: 6%; }
.hm-gate-overlay::after { bottom: -220px; left: -100px; }

.hm-gate-stage {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  text-align: center;
  padding: 48px 36px;
  border-radius: 10px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-top), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hm-gate-state { display: none; }
.hm-gate-state.on { display: block; animation: hmGateStateIn 0.45s ease both; }

@keyframes hmGateStateIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- Кодовая фраза --- */
.hm-gate-cube { width: 86px; height: 86px; color: #d9d9df; margin: 0 auto 22px; }

.hm-gate-brand {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 7px;
  margin: 0 0 6px;
  color: #fff;
}

.hm-gate-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--metal-muted);
  text-transform: uppercase;
  margin: 0 0 34px;
}

.hm-pwa-guide {
  max-width: 400px;
  margin: -10px auto 28px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
}

.hm-pwa-guide h2 {
  margin: 0 0 9px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.25;
}

.hm-pwa-guide ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #d7d7dc;
  font-size: 12px;
  line-height: 1.4;
}

.hm-pwa-guide strong { color: #fff; }

.hm-pwa-guide p {
  margin: 10px 0 0;
  color: var(--metal-muted-2);
  font-size: 11px;
  line-height: 1.4;
}

/* --- Входы ALTERE:GO / Ранговые битвы --- */
.hm-entry-carousel {
  max-width: 440px;
  margin: 0 auto;
}

.hm-entry-viewport {
  overflow: hidden;
  touch-action: pan-y;
  border-radius: 8px;
}

.hm-entry-track {
  display: flex;
  align-items: stretch;
  transition: transform 360ms cubic-bezier(0.22, 0.75, 0.24, 1);
  will-change: transform;
}

.hm-entry-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 1px 0;
}

.hm-entry-slide[aria-hidden="true"] {
  visibility: hidden;
}

.hm-entry-slide--ranked {
  padding: 20px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  text-align: left;
}

.hm-entry-kicker {
  margin: 0 0 14px;
  color: #f0444c;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
}

.hm-entry-title {
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 25px;
  line-height: 1.12;
}

.hm-entry-copy,
.hm-entry-note {
  color: #d7d7dc;
  font-size: 13px;
  line-height: 1.5;
}

.hm-entry-copy { margin: 0 0 24px; }
.hm-entry-note { margin: 18px 0 0; color: var(--metal-muted-2); font-size: 11px; }

.hm-entry-label {
  display: block;
  margin: 0 0 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hm-entry-ranked-submit {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 13px 16px;
  border: 1px solid #f0444c;
  border-radius: 4px;
  background: #f0444c;
  color: #09090b;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-align: center;
  text-decoration: none;
}

.hm-entry-ranked-submit:hover,
.hm-entry-ranked-submit:focus-visible { background: #ff656c; }
.hm-entry-ranked-submit:disabled { cursor: wait; opacity: 0.6; }

.hm-entry-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 18px;
}

.hm-entry-arrow {
  width: 34px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.hm-entry-arrow:hover,
.hm-entry-arrow:focus-visible { border-color: #fff; }

.hm-entry-dots { display: flex; align-items: center; gap: 8px; }
.hm-entry-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #5b5c62;
  cursor: pointer;
}
.hm-entry-dot.is-active { width: 24px; border-radius: 99px; background: #f0444c; }

.hm-entry-swipe-hint {
  margin: 11px 0 0;
  color: var(--metal-muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-align: center;
}

@media (max-width: 560px) {
  .hm-entry-slide--ranked { padding-inline: 14px; }
  .hm-entry-title { font-size: 22px; }
}

.hm-gate-phrase-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--metal-muted);
  padding-bottom: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.hm-gate-prompt {
  font-family: var(--font-mono);
  color: var(--metal-muted-2);
  font-size: 15px;
}

.hm-gate-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 1px;
  caret-color: #fff;
}

.hm-gate-error {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--metal-muted-2);
  text-transform: uppercase;
  min-height: 20px;
  margin-top: 16px;
  visibility: hidden;
}
.hm-gate-error.show { visibility: visible; }

.hm-gate-state.gate.shake { animation: hmGateShake 0.4s ease; }
@keyframes hmGateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.hm-gate-lang {
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--metal-muted-2);
}
.hm-gate-lang a { text-decoration: none; color: var(--metal-muted-2); transition: color 0.2s; }
.hm-gate-lang a:hover,
.hm-gate-lang a.active { color: #fff; }

/* --- Загрузка: сборка куба + терминальный протокол --- */
.hm-gate-loader-cube { width: 96px; height: 96px; margin: 0 auto 26px; color: #e6e6ea; }
.hm-gate-loader-cube .hm-gate-seg { opacity: 0; }
.hm-gate-state.loading.run .hm-gate-seg-1 { animation: hmGateSegIn 0.7s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hm-gate-state.loading.run .hm-gate-seg-2 { animation: hmGateSegIn 0.7s 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hm-gate-state.loading.run .hm-gate-seg-3 { animation: hmGateSegIn 0.7s 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes hmGateSegIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.hm-gate-progress-track {
  width: min(300px, 70vw);
  height: 2px;
  background: #26262c;
  margin: 0 auto 26px;
  overflow: hidden;
}
.hm-gate-progress-fill {
  height: 100%;
  width: 0;
  background: #fff;
}
.hm-gate-state.loading.run .hm-gate-progress-fill { animation: hmGateFill 3.8s cubic-bezier(0.3, 0.6, 0.4, 1) both; }
@keyframes hmGateFill { from { width: 0; } to { width: 100%; } }

.hm-gate-boot-log {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: var(--metal-muted-2);
  text-align: left;
  max-width: 360px;
  margin: 0 auto;
  min-height: 208px;
}
.hm-gate-boot-log .hm-gate-line { opacity: 0; }
.hm-gate-boot-log .hm-gate-line.on { animation: hmGateLineIn 0.25s ease both; }
@keyframes hmGateLineIn { from { opacity: 0; } to { opacity: 1; } }
.hm-gate-boot-log .hm-gate-line.final { color: #fff; }

.hm-gate-cursor { animation: hmGateBlink 1s steps(1) infinite; }
@keyframes hmGateBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* --- Приветствие --- */
.hm-gate-welcome-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--metal-muted);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hm-gate-welcome-name {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #fff;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hm-gate-welcome-epigraph {
  font-style: italic;
  color: var(--metal-muted-2);
  font-size: 16px;
  margin: 0 auto 36px;
  max-width: 380px;
}

.hm-gate-welcome-enter {
  display: inline-block;
  background: var(--metal-face);
  color: #0a0a0c;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 11px 22px;
  border: 0;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  transition: filter 0.2s ease, transform 0.15s ease;
}
.hm-gate-welcome-enter:hover { filter: brightness(1.08); }
.hm-gate-welcome-enter:active { transform: translateY(1px); }

.hm-gate-welcome-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--metal-muted);
  text-transform: uppercase;
  margin-top: 22px;
}

@media (max-width: 480px) {
  .hm-gate-stage { padding: 40px 22px; }
  .hm-gate-welcome-name { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-gate-state.on,
  .hm-gate-state.gate.shake,
  .hm-gate-state.loading.run .hm-gate-seg-1,
  .hm-gate-state.loading.run .hm-gate-seg-2,
  .hm-gate-state.loading.run .hm-gate-seg-3,
  .hm-gate-state.loading.run .hm-gate-progress-fill,
  .hm-gate-boot-log .hm-gate-line,
  .hm-gate-cursor {
    animation: none;
  }
  .hm-gate-loader-cube .hm-gate-seg { opacity: 1; }
  .hm-gate-boot-log .hm-gate-line { opacity: 1; }
  .hm-gate-progress-fill { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   MATCH LAUNCH — кнопка «Запустить матч» и оверлей выбора
   персонажа на главном меню. Оверлей переиспользует визуальные
   классы гейта выше (.hm-gate-overlay/-stage/-state/-loader-cube/
   -progress/-boot-log) через общую разметку; здесь — только
   элементы, специфичные для этого потока. См.
   assets/home-match-launch.js.
   ══════════════════════════════════════════════════════════ */

.hm-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hm-launch-btn svg { color: #fff; }

.hm-launch-btn:hover,
.hm-launch-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.1);
}

.hm-launch-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hm-launch-btn:active { transform: translateY(0); }

.hm-match-overlay { z-index: 210; }

.hm-match-stage {
  width: min(880px, 96vw);
  padding: 44px 40px;
}

.hm-match-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.hm-match-picker-head h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.hm-match-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--metal-muted-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.hm-match-close:hover,
.hm-match-close:focus-visible { color: #fff; border-color: rgba(233, 233, 238, 0.5); }

.hm-match-entry-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.hm-match-entry-choice,
.hm-match-entry-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.hm-match-entry-choice .hm-gate-welcome-enter { min-width: 220px; }

.hm-match-entry-divider {
  margin: 2px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--metal-muted);
}

.hm-match-join-form {
  display: flex;
  gap: 8px;
  width: min(320px, 100%);
}

.hm-match-join-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
}

.hm-match-join-input:focus {
  outline: none;
  border-color: rgba(233, 233, 238, 0.5);
}

.hm-match-join-submit {
  padding: 11px 18px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.hm-match-join-submit:hover,
.hm-match-join-submit:focus-visible { border-color: rgba(233, 233, 238, 0.5); background: rgba(255, 255, 255, 0.08); }

.hm-match-entry-error {
  min-height: 18px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e88;
}

.hm-match-entry-code {
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 10px;
  color: #fff;
  margin: 0;
}

.hm-match-entry-hint {
  color: var(--metal-muted-2);
  font-size: 13px;
  margin: 0;
}

.hm-match-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  max-height: 38vh;
  overflow-y: auto;
  padding-right: 2px;
  text-align: left;
}

.hm-match-roster-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.hm-match-roster-card:hover { border-color: rgba(233, 233, 238, 0.3); }

.hm-match-roster-card.is-selected {
  border-color: rgba(183, 234, 61, 0.75);
  background: rgba(154, 212, 0, 0.08);
}

.hm-match-roster-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px dashed var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.hm-match-roster-photo:hover,
.hm-match-roster-photo:focus-within {
  border-color: rgba(233, 233, 238, 0.5);
}

.hm-match-roster-photo.has-photo { border-style: solid; }

.hm-match-roster-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-match-roster-photo-placeholder {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--metal-muted-2);
  pointer-events: none;
}

.hm-match-roster-photo.has-photo .hm-match-roster-photo-placeholder { display: none; }

.hm-match-roster-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.hm-match-roster-body:focus-visible { outline: 2px solid rgba(233, 233, 238, 0.8); outline-offset: 2px; border-radius: 4px; }

.hm-match-roster-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.hm-match-roster-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--metal-muted-2);
}

.hm-match-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.hm-match-player-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.hm-match-player-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.hm-match-player-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--metal-muted-2);
}

.hm-match-player-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #b7ea3d;
  min-height: 1em;
}

.hm-match-ready-btn { width: 100%; }
.hm-match-ready-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.hm-match-ready-btn.is-ready { background: #b7ea3d; }

.hm-match-style-picker {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.hm-match-style-btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--metal-muted-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.hm-match-style-btn:hover { border-color: rgba(233, 233, 238, 0.3); }

.hm-match-style-btn.is-selected {
  border-color: rgba(183, 234, 61, 0.75);
  background: rgba(154, 212, 0, 0.08);
  color: #fff;
}

.hm-match-opponent-card {
  min-height: 38vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px dashed var(--glass-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--metal-muted-2);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .hm-match-players { grid-template-columns: 1fr; }
  .hm-match-opponent-card { min-height: 80px; }
}

.hm-match-confirm-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 8px;
}

.hm-match-confirm-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hm-match-confirm-side-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--metal-muted);
}

.hm-match-confirm-vs {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--metal-muted);
}

.hm-match-confirm-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--metal-muted);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hm-match-confirm-name {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
}

.hm-match-confirm-note {
  color: var(--metal-muted-2);
  font-size: 14px;
  margin: 0 auto 30px;
  max-width: 380px;
}

@media (max-width: 480px) {
  .hm-match-stage { padding: 36px 22px; }
  .hm-match-confirm-name { font-size: 18px; }
  .hm-match-confirm-pair { flex-direction: column; gap: 10px; }
}

.hm-match-confirm-countdown {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #b7ea3d;
  margin: 0 0 22px;
  min-height: 1.4em;
}

/* ══════════════════════════════════════════════════════════
   MATCH MAP (match-map.html) — карта матча: границы районов,
   границы муниципальных округов, станции метро. Отдельная лёгкая
   страница без окружения сайта, без script.js. См.
   assets/match-map.js.
   ══════════════════════════════════════════════════════════ */

/* ============================================================
   MATCH LAUNCH HUD — Cinematic Monochrome
   ============================================================ */

body.hm-match-dialog-open {
  overflow: hidden;
}

.hm-match-overlay {
  --hud-black: #000;
  --hud-glass: rgba(9, 9, 10, 0.82);
  --hud-white: #f2f2f3;
  --hud-silver: #aaa9ad;
  --hud-muted: #5e5e63;
  --hud-line: rgba(232, 232, 234, 0.3);
  z-index: 210;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(112px, 14vh, 154px) clamp(70px, 14vw, 230px) clamp(92px, 12vh, 126px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(255, 255, 255, 0.065), transparent 43%),
    radial-gradient(circle at 84% 7%, rgba(255, 255, 255, 0.03), transparent 23%),
    linear-gradient(#000, #050505 58%, #000);
  color: var(--hud-white);
}

.hm-match-overlay[hidden] { display: none; }

.hm-match-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  width: auto;
  height: auto;
  border-radius: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.11), transparent 10%, transparent 90%, rgba(255, 255, 255, 0.11)) top 25% left / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.08)) bottom 20% left / 100% 1px no-repeat;
}

.hm-match-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  width: auto;
  height: auto;
  border-radius: 0;
  pointer-events: none;
  opacity: 0.58;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.24) 4px);
}

.hm-match-sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hm-match-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hm-match-codefield {
  position: absolute;
  inset: -18% 0 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(72px, 1fr));
  gap: clamp(14px, 2vw, 32px);
  padding: 0 clamp(20px, 4vw, 76px);
  opacity: 0.24;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 36%, transparent 64%, #000);
  mask-image: linear-gradient(90deg, #000, transparent 36%, transparent 64%, #000);
}

.hm-match-code-lane {
  color: #a9a9ad;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.75;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  white-space: nowrap;
  text-shadow: 0 0 9px rgba(255, 255, 255, 0.17);
  animation: hmMatchCodeFall var(--lane-speed, 13s) linear infinite;
  animation-delay: var(--lane-delay, 0s);
}

@keyframes hmMatchCodeFall {
  from { transform: translateY(-16%); opacity: 0.1; }
  35% { opacity: 0.72; }
  to { transform: translateY(18%); opacity: 0.08; }
}

.hm-match-network {
  position: absolute;
  inset: 4% 3% 5%;
  width: 94%;
  height: 91%;
  opacity: 0.27;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.11));
}

.hm-match-network path {
  fill: none;
  stroke: rgba(225, 225, 225, 0.28);
  stroke-width: 0.7;
  stroke-dasharray: 3 12;
  animation: hmMatchNetworkFlow 9s linear infinite;
}

.hm-match-network circle {
  fill: #eee;
  opacity: 0.7;
  animation: hmMatchNodePulse 2.8s ease-in-out infinite alternate;
}

.hm-match-network circle:nth-of-type(2n) { animation-delay: -1.4s; }

@keyframes hmMatchNetworkFlow { to { stroke-dashoffset: -120; } }

@keyframes hmMatchNodePulse {
  from { opacity: 0.18; transform: scale(0.75); transform-origin: center; }
  to { opacity: 0.9; transform: scale(1.25); transform-origin: center; }
}

.hm-match-hud-brand,
.hm-match-hud-status,
.hm-match-hud-side,
.hm-match-hud-footer {
  position: absolute;
  z-index: 2;
  font-family: var(--font-mono);
  text-transform: uppercase;
  pointer-events: none;
}

.hm-match-hud-brand {
  top: clamp(28px, 4vw, 58px);
  left: clamp(26px, 5vw, 78px);
  color: #bcbcc0;
  font-size: clamp(17px, 1.55vw, 25px);
  font-weight: 400;
  letter-spacing: 0.38em;
}

.hm-match-hud-brand strong { color: #fff; font-weight: 500; }

.hm-match-hud-status {
  top: clamp(26px, 3.6vw, 52px);
  right: clamp(26px, 5vw, 78px);
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #55555a;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.1em;
}

.hm-match-hud-status b { color: #fff; font-weight: 400; }

.hm-match-hud-side {
  top: 40%;
  color: #45454a;
  font-size: 9px;
  line-height: 2.2;
  letter-spacing: 0.16em;
}

.hm-match-hud-side::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  margin-top: 7px;
  background: #ddd;
}

.hm-match-hud-side--left { left: clamp(26px, 4vw, 64px); }
.hm-match-hud-side--right { right: clamp(26px, 4vw, 64px); text-align: right; }
.hm-match-hud-side--right::after { margin-left: auto; }

.hm-match-hud-footer {
  left: clamp(26px, 3vw, 50px);
  right: clamp(26px, 3vw, 50px);
  bottom: 38px;
  height: 1px;
  background: linear-gradient(90deg, #fff 0 1.5%, rgba(220, 220, 220, 0.16) 1.5% 41%, transparent 41% 59%, rgba(220, 220, 220, 0.16) 59% 98.5%, #fff 98.5%);
}

.hm-match-hud-footer span {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  padding: 0 22px;
  background: #000;
  color: #4c4c51;
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.25em;
  white-space: nowrap;
}

.hm-match-stage {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100vw - clamp(140px, 28vw, 460px)));
  height: min(720px, calc(100dvh - clamp(204px, 26vh, 280px)));
  min-height: 520px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(242, 242, 242, 0.5);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 32%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.018), transparent 35%),
    var(--hud-glass);
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.75), inset 0 0 90px rgba(255, 255, 255, 0.025), 0 0 34px rgba(255, 255, 255, 0.035);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.hm-match-stage::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.58;
  background:
    linear-gradient(#fff, #fff) left top / 18px 1px no-repeat,
    linear-gradient(#fff, #fff) left top / 1px 18px no-repeat,
    linear-gradient(#fff, #fff) right top / 18px 1px no-repeat,
    linear-gradient(#fff, #fff) right top / 1px 18px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 18px 1px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 1px 18px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 18px 1px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 1px 18px no-repeat;
}

.hm-match-stage::after {
  content: "";
  position: absolute;
  z-index: 5;
  left: 24%;
  right: 24%;
  top: -1px;
  height: 1px;
  pointer-events: none;
  opacity: 0.7;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.hm-match-stage > .hm-gate-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
}

.hm-match-stage > .hm-gate-state::-webkit-scrollbar { width: 6px; }
.hm-match-stage > .hm-gate-state::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); }

.hm-match-global-close {
  position: absolute;
  z-index: 10;
  top: 26px;
  right: 28px;
}

.hm-match-close {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(232, 232, 232, 0.4);
  border-radius: 0;
  background: rgba(18, 18, 18, 0.52);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 27px;
  font-weight: 300;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hm-match-close:hover,
.hm-match-close:focus-visible {
  color: #050505;
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
  outline: none;
}

.hm-match-kicker {
  margin: 0 0 18px;
  color: #707074;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.hm-match-stage > .entry.on {
  display: grid;
  place-items: center;
  padding: 70px 72px 52px;
}

.hm-match-entry-choice,
.hm-match-entry-waiting {
  width: min(660px, 100%);
  gap: 14px;
}

.hm-match-entry-title,
.hm-match-waiting-title,
.hm-match-loading-title {
  margin: 0 0 clamp(26px, 4vh, 46px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.13);
}

.hm-match-entry-title::after,
.hm-match-waiting-title::after,
.hm-match-loading-title::after {
  content: "";
  display: block;
  width: 38px;
  height: 2px;
  margin: 21px auto 0;
  background: #fff;
  box-shadow: 0 0 9px rgba(255, 255, 255, 0.52);
}

.hm-match-entry-choice .hm-gate-welcome-enter {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 0;
  border: 1px solid rgba(220, 220, 220, 0.44);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.018);
  color: #eee;
  font-size: clamp(15px, 1.25vw, 20px);
  font-weight: 500;
  letter-spacing: 0.22em;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hm-match-entry-choice .hm-gate-welcome-enter::before {
  content: "";
  width: 20px;
  height: 20px;
  justify-self: center;
  border: 1px solid currentColor;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.045);
}

.hm-match-entry-choice .hm-gate-welcome-enter::after {
  content: "›";
  justify-self: center;
  color: currentColor;
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 300;
}

.hm-match-entry-choice .hm-gate-welcome-enter:hover,
.hm-match-entry-choice .hm-gate-welcome-enter:focus-visible {
  color: #050505;
  border-color: #fff;
  background: #f1f1f2;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.12);
  filter: none;
  outline: none;
}

.hm-match-entry-choice .hm-gate-welcome-enter:active { transform: scale(0.99); }

.hm-match-entry-choice .hm-gate-welcome-enter:disabled,
.hm-match-entry-choice .hm-gate-welcome-enter.is-busy,
.hm-match-join-submit:disabled,
.hm-match-join-submit.is-busy {
  opacity: 0.44;
  cursor: wait;
  pointer-events: none;
}

.hm-match-entry-divider {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 14px 0 8px;
  color: #5f5f63;
  font-size: 11px;
  letter-spacing: 0.28em;
}

.hm-match-entry-divider::before,
.hm-match-entry-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 230, 230, 0.2));
}

.hm-match-entry-divider::after { transform: scaleX(-1); }

.hm-match-join-form {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  width: 100%;
}

.hm-match-join-field { position: relative; display: block; min-width: 0; }

.hm-match-join-field > span {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 16px;
  color: #66666b;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
}

.hm-match-join-input {
  width: 100%;
  height: 64px;
  padding: 24px 16px 8px;
  border: 1px solid rgba(205, 205, 205, 0.24);
  border-radius: 0;
  background: rgba(4, 4, 4, 0.5);
  color: #fff;
  font-size: 17px;
  letter-spacing: 0.24em;
  text-align: left;
}

.hm-match-join-input::placeholder { color: #55555a; opacity: 1; }
.hm-match-join-input:hover { border-color: rgba(235, 235, 235, 0.45); }

.hm-match-join-input:focus {
  border-color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}

.hm-match-join-input[aria-invalid="true"] { border-style: double; border-color: #fff; }

.hm-match-join-submit {
  min-height: 64px;
  border: 1px solid rgba(245, 245, 245, 0.46);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.13em;
}

.hm-match-join-submit::after {
  content: "›";
  margin-left: 10px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 300;
}

.hm-match-join-submit:hover,
.hm-match-join-submit:focus-visible {
  color: #050505;
  border-color: #fff;
  background: #fff;
  outline: none;
}

.hm-match-entry-error {
  min-height: 20px;
  margin-top: 2px;
  color: #dadade;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.hm-match-entry-error:not(:empty)::before { content: "[ ! ] "; color: #fff; }

.hm-match-entry-code {
  margin: 2px 0 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(48px, 7vw, 82px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.16);
}

.hm-match-entry-hint {
  max-width: 460px;
  color: #98989c;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hm-match-link-pulse {
  width: min(360px, 78%);
  height: 1px;
  margin-top: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.hm-match-link-pulse span {
  display: block;
  width: 38%;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 9px rgba(255, 255, 255, 0.58);
  animation: hmMatchLinkScan 1.8s ease-in-out infinite alternate;
}

@keyframes hmMatchLinkScan {
  from { transform: translateX(-100%); }
  to { transform: translateX(263%); }
}

.hm-match-stage > .loading.on {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 64px 72px 42px;
  text-align: center;
}

.hm-match-loading-title { margin-bottom: 28px; font-size: clamp(24px, 2.1vw, 34px); }

.hm-match-stage .hm-gate-loader-cube {
  width: 112px;
  height: 112px;
  margin-bottom: 26px;
  color: #efeff0;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.09));
}

.hm-match-stage .hm-gate-progress-track {
  width: min(430px, 70vw);
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.hm-match-stage .hm-gate-progress-fill {
  background: #fff;
  box-shadow: 0 0 9px rgba(255, 255, 255, 0.5);
}

.hm-match-stage .hm-gate-boot-log {
  width: min(470px, 100%);
  max-width: 470px;
  min-height: 150px;
  color: #858589;
  font-size: 13px;
  line-height: 1.9;
}

.hm-match-stage .hm-gate-boot-log .final { color: #fff; }

.hm-match-stage > .picker.on {
  display: block;
  padding: 54px 56px 36px;
}

.hm-match-picker-head {
  margin: 0 72px 26px 0;
}

.hm-match-picker-head h2 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 400;
  letter-spacing: 0.24em;
}

.hm-match-players {
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: clamp(22px, 3vw, 42px);
  min-height: 0;
}

.hm-match-player-col { gap: 14px; }

.hm-match-player-head {
  min-height: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.hm-match-player-label,
.hm-match-player-status {
  color: #aaa9ad;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.hm-match-player-status:not(:empty) { color: #fff; }
.hm-match-player-status:not(:empty)::before { content: "●"; margin-right: 8px; font-size: 8px; }

.hm-match-roster {
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 12px;
  max-height: 430px;
  padding: 2px 7px 2px 2px;
}

.hm-match-roster-card {
  position: relative;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 225, 227, 0.28);
  border-radius: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 55%), rgba(5, 5, 5, 0.68);
}

.hm-match-roster-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.48;
  background:
    linear-gradient(#fff, #fff) left top / 10px 1px no-repeat,
    linear-gradient(#fff, #fff) left top / 1px 10px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 10px 1px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 1px 10px no-repeat;
}

.hm-match-roster-card:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.04);
}

.hm-match-roster-card.is-selected {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 0 0 18px rgba(255, 255, 255, 0.07);
}

.hm-match-roster-card.is-selected::after {
  content: "ВЫБРАН";
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.hm-match-roster-photo {
  aspect-ratio: 1 / 0.82;
  border: 0;
  border-bottom: 1px solid rgba(225, 225, 227, 0.22);
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.13), transparent 8%),
    radial-gradient(ellipse at 50% 72%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #050505;
  background-size: auto, auto, 14px 14px, 14px 14px, auto;
}

.hm-match-roster-photo:hover,
.hm-match-roster-photo:focus-within {
  border-color: rgba(255, 255, 255, 0.55);
  filter: brightness(1.08);
}

.hm-match-roster-photo-img { filter: grayscale(1) contrast(1.08); }
.hm-match-roster-photo-placeholder { color: #747478; font-size: 9px; }

.hm-match-roster-body {
  width: 100%;
  min-height: 62px;
  gap: 5px;
  padding: 10px 12px 12px;
  color: #fff;
}

.hm-match-roster-body:hover { background: rgba(255, 255, 255, 0.025); }

.hm-match-roster-body:focus-visible {
  border-radius: 0;
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.hm-match-roster-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hm-match-roster-role { color: #858589; font-size: 10px; line-height: 1.35; }

.hm-match-style-picker { gap: 10px; margin: 0; }

.hm-match-style-btn {
  min-height: 46px;
  padding: 10px;
  border: 1px solid rgba(225, 225, 227, 0.25);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.018);
  color: #99999d;
}

.hm-match-style-btn:hover,
.hm-match-style-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  outline: none;
}

.hm-match-style-btn.is-selected {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hm-match-ready-btn {
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.28em;
  box-shadow: none;
}

.hm-match-ready-btn:hover:not(:disabled),
.hm-match-ready-btn:focus-visible:not(:disabled),
.hm-match-ready-btn.is-ready {
  border-color: #fff;
  background: #fff;
  color: #050505;
  filter: none;
  outline: none;
}

.hm-match-ready-btn:disabled { opacity: 0.34; }

.hm-match-opponent-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(225, 225, 227, 0.28);
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(255, 255, 255, 0.075), transparent 36%),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.06), transparent 12%),
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    #050505;
  background-size: auto, auto, 18px 18px, 18px 18px, auto;
  color: #d8d8db;
  font-family: var(--font-mono);
  font-size: clamp(20px, 2vw, 31px);
  font-weight: 400;
  letter-spacing: 0.18em;
}

.hm-match-opponent-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  opacity: 0.48;
  background:
    linear-gradient(#fff, #fff) left top / 16px 1px no-repeat,
    linear-gradient(#fff, #fff) left top / 1px 16px no-repeat,
    linear-gradient(#fff, #fff) right top / 16px 1px no-repeat,
    linear-gradient(#fff, #fff) right top / 1px 16px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 16px 1px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 1px 16px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 16px 1px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 1px 16px no-repeat;
}

.hm-match-opponent-card.has-character {
  border-color: rgba(255, 255, 255, 0.52);
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.15);
}

.hm-match-stage > .confirm.on {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 76px 64px 46px;
  text-align: center;
}

.hm-match-confirm-label {
  margin-bottom: 34px;
  color: #fff;
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: 0.22em;
}

.hm-match-confirm-pair {
  width: min(760px, 100%);
  gap: 18px;
  margin-bottom: 24px;
}

.hm-match-confirm-side {
  flex: 1;
  min-height: 326px;
  justify-content: center;
  padding: 20px 22px 18px;
  border: 1px solid rgba(235, 235, 237, 0.28);
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.018);
}

.hm-match-confirm-side-label { color: #77777c; }
.hm-match-confirm-vs { color: #fff; font-family: var(--font-mono); font-size: 21px; font-weight: 400; }

.hm-match-confirm-coin {
  width: clamp(126px, 11vw, 168px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: #020202;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.46),
    0 12px 30px rgba(0, 0, 0, 0.72),
    0 0 22px rgba(255, 255, 255, 0.08);
}

.hm-match-confirm-coin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-match-confirm-coin img[hidden] { display: none; }

.hm-match-confirm-name {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 500;
}

.hm-match-confirm-style {
  display: grid;
  gap: 5px;
  margin: 0;
  font-family: var(--font-mono);
  text-align: center;
  text-transform: uppercase;
}

.hm-match-confirm-style span {
  color: #717176;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.hm-match-confirm-style strong {
  color: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #fff 0%, #85858a 48%, #f3f3f3 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hm-match-confirm-countdown { color: #fff; font-size: 14px; letter-spacing: 0.12em; }
.hm-match-confirm-note { color: #88888c; line-height: 1.65; }

.hm-match-confirm-note + .hm-gate-welcome-enter {
  min-width: 230px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 0;
  background: transparent;
  color: #fff;
}

.hm-match-confirm-note + .hm-gate-welcome-enter:hover,
.hm-match-confirm-note + .hm-gate-welcome-enter:focus-visible {
  background: #fff;
  color: #050505;
  filter: none;
  outline: none;
}

@media (max-width: 1100px) {
  .hm-match-overlay { padding-right: 56px; padding-left: 56px; }
  .hm-match-stage { width: calc(100vw - 112px); }
  .hm-match-hud-side { display: none; }
}

@media (max-width: 760px) {
  .hm-match-overlay {
    align-items: stretch;
    padding: 82px 14px 64px;
    overflow-y: auto;
  }

  .hm-match-hud-brand {
    top: 28px;
    left: 22px;
    font-size: 16px;
    letter-spacing: 0.25em;
  }

  .hm-match-hud-status { display: none; }

  .hm-match-hud-footer {
    right: 18px;
    bottom: 30px;
    left: 18px;
  }

  .hm-match-hud-footer span {
    padding: 0 10px;
    font-size: 7px;
    letter-spacing: 0.14em;
  }

  .hm-match-codefield { grid-template-columns: repeat(6, minmax(52px, 1fr)); }

  .hm-match-stage {
    width: 100%;
    height: calc(100dvh - 146px);
    min-height: 590px;
  }

  .hm-match-stage > .entry.on,
  .hm-match-stage > .loading.on,
  .hm-match-stage > .confirm.on {
    padding: 76px 24px 38px;
  }

  .hm-match-global-close { top: 18px; right: 18px; }
  .hm-match-close { width: 48px; height: 48px; }

  .hm-match-entry-title,
  .hm-match-waiting-title {
    font-size: clamp(26px, 8vw, 36px);
    letter-spacing: 0.16em;
  }

  .hm-match-entry-choice .hm-gate-welcome-enter {
    min-height: 62px;
    grid-template-columns: 42px 1fr 40px;
    font-size: 14px;
    letter-spacing: 0.14em;
  }

  .hm-match-join-form { grid-template-columns: 1fr; }
  .hm-match-join-submit { min-height: 58px; }
  .hm-match-entry-code { font-size: clamp(42px, 13vw, 62px); letter-spacing: 0.12em; }

  .hm-match-stage > .picker.on { padding: 76px 20px 32px; }
  .hm-match-picker-head { margin: 0 56px 24px 0; }
  .hm-match-picker-head h2 { font-size: 25px; letter-spacing: 0.13em; }
  .hm-match-players { grid-template-columns: 1fr; }
  .hm-match-roster { grid-template-columns: repeat(2, minmax(118px, 1fr)); max-height: none; }
  .hm-match-opponent-card { min-height: 180px; }
  .hm-match-confirm-pair { flex-direction: column; }
  .hm-match-confirm-vs { padding: 2px 0; }
  .hm-match-confirm-side { width: 100%; min-height: 210px; }
  .hm-match-confirm-coin { width: 96px; }
}

@media (max-width: 420px) {
  .hm-match-kicker { letter-spacing: 0.2em; }
  .hm-match-entry-title,
  .hm-match-waiting-title { font-size: 25px; letter-spacing: 0.12em; }
  .hm-match-entry-choice .hm-gate-welcome-enter { letter-spacing: 0.1em; }
  .hm-match-roster { gap: 8px; }
  .hm-match-roster-name { font-size: 12px; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .hm-match-overlay { padding-top: 72px; padding-bottom: 56px; }
  .hm-match-hud-brand,
  .hm-match-hud-status { top: 24px; }
  .hm-match-hud-footer { bottom: 24px; }

  .hm-match-stage {
    width: min(1120px, calc(100vw - 150px));
    height: calc(100dvh - 128px);
    min-height: 500px;
  }

  .hm-match-stage > .picker.on { padding-top: 46px; }
  .hm-match-roster { max-height: 330px; }
  .hm-match-opponent-card { min-height: 330px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-match-code-lane,
  .hm-match-network path,
  .hm-match-network circle,
  .hm-match-link-pulse span {
    animation: none;
  }

  .hm-match-code-lane { opacity: 0.3; }
  .hm-match-network path { stroke-dasharray: none; }
}

.mm-page {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #030303;
}

.mm-map {
  position: absolute;
  inset: 0;
}

/* World Command Map (universe.html #wmMap, assets/world-map.js) used to get
   its dark look for free from CARTO Dark's native tile colors — no CSS
   filter needed. Its primary tile source is now standard OSM (light
   background; see the comment above TILE_PRIMARY in world-map.js for why),
   so it needs the same invert()-based recipe as .spb-map-shell in universe's
   main SPb map (see the comment above --map-filter-map, ~line 16080) to
   read as a dark map again.
   Selector is #wmMap, not .wm-map: #wmMap also carries the shared .mm-map
   base class (same element as match-map.html reuses for its own map), and
   assets/match-map.css:126 has its own ".mm-map .leaflet-tile-pane" filter
   (brightness(1.5) — lightens match-map's own already-dark CARTO tiles).
   That rule loads after this file and has equal (0,2,0) specificity, so it
   silently won the cascade and washed this one out to a plain light map —
   an ID selector (1,0,0) beats it outright without touching match-map.css,
   which is Ranked Battles-owned.
   hue-rotate(180deg) matters, not just cosmetic: plain invert() flips hue
   too, so OSM forest/park fill (light green) inverted to magenta/purple and
   water (light blue) inverted to brown — reported 2026-09-20 against a
   Vyborgsky-district forest tile. Rotating 180deg after the invert puts
   green back on green and water back on a dark teal. Same fix applied to
   assets/spb-3d.js's raster-hue-rotate for the 3D view's basemap. */
#wmMap .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) grayscale(0.3) brightness(0.94) contrast(0.94);
  opacity: 0.9;
  background: #0c0e0d;
}

.mm-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mm-back {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color var(--transition-fast);
}

.mm-back:hover,
.mm-back:focus-visible { border-color: rgba(233, 233, 238, 0.5); }

.mm-code {
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--metal-muted-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mm-players {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.mm-player { color: #fff; }
.mm-player-vs { color: var(--metal-muted); text-transform: uppercase; font-size: 10px; }

.leaflet-tooltip.mm-tooltip {
  background: rgba(3, 3, 3, 0.85);
  border: 1px solid var(--glass-line);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  box-shadow: none;
}

.leaflet-tooltip.mm-tooltip::before { display: none; }

.leaflet-tooltip.mm-tooltip--district { color: #cdeb8a; }
.leaflet-tooltip.mm-tooltip--okrug { color: #9fd4f2; }
.leaflet-tooltip.mm-tooltip--metro { color: #f2a2ac; }

.mm-hq-marker {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.mm-hq-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 10px currentColor;
  flex-shrink: 0;
}

.mm-hq-marker.is-mine .mm-hq-dot { background: #b7ea3d; color: #b7ea3d; }
.mm-hq-marker.is-opponent .mm-hq-dot { background: #ff5470; color: #ff5470; }

.mm-hq-label {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(3, 3, 3, 0.8);
  border: 1px solid var(--glass-line);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.mm-king-icon .mm-hq-label { font-weight: 700; }

/* Фигурка Короля (king-crasy-blaze.png/king-3xo.png) — картинка персонажа
   вместо цветной точки, см. kingIcon() в assets/match-map.js. Подпись под
   ней — тот же .mm-hq-label, что был раньше у точки. */
.mm-king-piece-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.mm-king-piece-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.mm-king-icon-piece.is-mine .mm-king-piece-img {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 14px 4px rgba(183, 234, 61, 0.85);
}
.mm-king-icon-piece.is-opponent .mm-king-piece-img {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 14px 4px rgba(255, 84, 112, 0.85);
}

.mm-metro-icon.is-owned {
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 14px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-metro-icon.is-move-target {
  border-radius: 50%;
  box-shadow: 0 0 0 3px #ffd23f, 0 0 12px 3px rgba(255, 210, 63, 0.8);
}

/* Мост — широкий силуэт, не точка: halo прямоугольный (скруглённый), а не
   круглый, как у метро/точек-фильтров. */
.mm-bridge-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-bridge-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Rockstar Hood — нота, силуэт компактный (~0.93:1) — круглый halo, как у метро. */
.mm-rockstar-icon.is-owned {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-rockstar-icon.is-move-target {
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Музей — здание с колоннадой, не точка: прямоугольный halo, как у моста. */
.mm-museum-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-museum-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Памятник/скульптура — обелиск, своя иконка (2026-07-26), тот же halo-приём. */
.mm-monument-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-monument-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Дворец — широкий фасад, не точка: прямоугольный halo, как у моста. */
.mm-palace-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-palace-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Библиотека — здание с колоннадой, не точка: прямоугольный halo, как у музея. */
.mm-library-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-library-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Театр — маски, компактный силуэт — круглый halo, как у метро/rockstar. */
.mm-theatre-icon.is-owned {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-theatre-icon.is-move-target {
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Commerce Row — здания-витрины/стелы, не точки: прямоугольный halo, как у музея/моста. */
.mm-supermarket-icon.is-owned, .mm-shop-icon.is-owned, .mm-bank-icon.is-owned,
.mm-cafe-icon.is-owned, .mm-restaurant-icon.is-owned, .mm-hotel-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-supermarket-icon.is-move-target, .mm-shop-icon.is-move-target, .mm-bank-icon.is-move-target,
.mm-cafe-icon.is-move-target, .mm-restaurant-icon.is-move-target, .mm-hotel-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

.mm-autoservice-icon.is-owned, .mm-office-icon.is-owned, .mm-mall-icon.is-owned,
.mm-factory-icon.is-owned, .mm-warehouse-icon.is-owned, .mm-port-icon.is-owned,
.mm-realestate-icon.is-owned, .mm-market-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-autoservice-icon.is-move-target, .mm-office-icon.is-move-target, .mm-mall-icon.is-move-target,
.mm-factory-icon.is-move-target, .mm-warehouse-icon.is-move-target, .mm-port-icon.is-move-target,
.mm-realestate-icon.is-move-target, .mm-market-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Fit&Health (2026-07-27) — 17 подкатегорий, все сцены/здания-стелы, не
   точки: тот же прямоугольный halo, что у Commerce Row. */
.mm-combat-icon.is-owned, .mm-pharmacy-icon.is-owned, .mm-pool-icon.is-owned,
.mm-hospital-icon.is-owned, .mm-yoga-icon.is-owned, .mm-icearena-icon.is-owned,
.mm-sportshop-icon.is-owned, .mm-medcenter-icon.is-owned, .mm-clinic-icon.is-owned,
.mm-maternity-icon.is-owned, .mm-sanatorium-icon.is-owned, .mm-sportsground-icon.is-owned,
.mm-sportsschool-icon.is-owned, .mm-stadium-icon.is-owned, .mm-dental-icon.is-owned,
.mm-fitness-icon.is-owned, .mm-chess-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-combat-icon.is-move-target, .mm-pharmacy-icon.is-move-target, .mm-pool-icon.is-move-target,
.mm-hospital-icon.is-move-target, .mm-yoga-icon.is-move-target, .mm-icearena-icon.is-move-target,
.mm-sportshop-icon.is-move-target, .mm-medcenter-icon.is-move-target, .mm-clinic-icon.is-move-target,
.mm-maternity-icon.is-move-target, .mm-sanatorium-icon.is-move-target, .mm-sportsground-icon.is-move-target,
.mm-sportsschool-icon.is-move-target, .mm-stadium-icon.is-move-target, .mm-dental-icon.is-move-target,
.mm-fitness-icon.is-move-target, .mm-chess-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Luxury Street — общая иконка-бриллиант на все 19 подкатегорий, тот же
   halo-приём, что у остальных фильтров с иконкой вместо точки. */
.mm-luxury-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-luxury-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

/* Onboarding — 5 сгруппированных иконок (education/creativity/science/
   play/language), тот же halo-приём, что у остальных фильтров с иконкой. */
.mm-education-icon.is-owned, .mm-creativity-icon.is-owned, .mm-science-icon.is-owned,
.mm-play-icon.is-owned, .mm-language-icon.is-owned {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px 4px var(--mm-owner-color, #b7ea3d);
}

.mm-education-icon.is-move-target, .mm-creativity-icon.is-move-target, .mm-science-icon.is-move-target,
.mm-play-icon.is-move-target, .mm-language-icon.is-move-target {
  border-radius: 6px;
  box-shadow: 0 0 0 2px #ffd23f, 0 0 10px 3px rgba(255, 210, 63, 0.8);
}

.mm-filters {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 500;
  display: flex;
  gap: 6px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow-x: auto;
}

.mm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--metal-muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.mm-filter-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.mm-filter-btn.is-active {
  border-color: rgba(233, 233, 238, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (max-width: 720px) {
  .mm-filters { left: 8px; right: 8px; bottom: 8px; max-width: none; }
}

.mm-engine-hud {
  position: absolute;
  top: 70px;
  right: 16px;
  z-index: 500;
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.82);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  backdrop-filter: blur(8px) saturate(1.15);
  box-shadow: inset 0 1px 0 var(--glass-top), 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.mm-engine-hud.is-picking-target {
  border-color: rgba(255, 210, 63, 0.6);
  box-shadow: inset 0 1px 0 var(--glass-top), 0 0 0 1px rgba(255, 210, 63, 0.3), 0 0 22px rgba(255, 210, 63, 0.25);
}

.mm-engine-turn {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 15px;
}

.mm-engine-coins-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mm-engine-coins {
  color: var(--metal-muted-2);
}

.mm-find-king-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 6px;
  border: 0;
  background: var(--metal-face);
  color: #0a0a0c;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: filter var(--transition-fast);
}
.mm-find-king-btn:hover { filter: brightness(1.08); }

.mm-engine-check {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 84, 112, 0.16);
  border: 1px solid rgba(255, 84, 112, 0.5);
  color: #ff96a8;
  font-size: 13px;
}

.mm-engine-check.is-opportunity {
  background: rgba(255, 210, 63, 0.16);
  border: 1px solid rgba(255, 210, 63, 0.5);
  color: #ffd23f;
}

.mm-skill-target-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(255, 210, 63, 0.12);
  border: 1px solid rgba(255, 210, 63, 0.5);
  color: #ffd23f;
  font-size: 13px;
}

.mm-skill-target-cancel {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}
.mm-skill-target-cancel:hover { background: rgba(255, 255, 255, 0.12); }

.mm-engine-skill-btn {
  width: 100%;
  padding: 9px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.mm-engine-skill-btn:hover { border-color: rgba(233, 233, 238, 0.5); }
.mm-engine-skill-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.mm-skill-section { margin-bottom: 10px; }

.mm-skill-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--metal-muted);
  margin-bottom: 8px;
}

.mm-skill-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mm-skill-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.mm-skill-btn:hover:not(:disabled) {
  border-color: rgba(233, 233, 238, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.mm-skill-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mm-skill-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: radial-gradient(circle at 35% 30%, #232328 0%, #050505 70%);
  border: 2px solid var(--metal-muted);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 8px rgba(183, 234, 61, 0.25);
}

.mm-skill-body {
  flex: 1;
  min-width: 0;
}

.mm-skill-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--metal-ink);
}

.mm-skill-desc {
  display: block;
  font-size: 12px;
  color: var(--metal-muted-2);
  margin-top: 2px;
  line-height: 1.4;
}

.mm-skill-status {
  flex-shrink: 0;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

.mm-skill-status.is-ready { color: #8fda6a; }
.mm-skill-status.is-cooldown { color: #ff96a8; }

.mm-skill-points {
  font-size: 12px;
  color: var(--metal-muted-2);
  margin: 0 0 8px;
}

.mm-skill-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 12px 10px;
  margin-top: -4px;
  font-size: 11px;
  color: var(--metal-muted);
}

.mm-skill-levelup-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 5px;
  border: 0;
  background: var(--metal-face);
  color: #0a0a0c;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0, 0, 0, 0.5);
}
.mm-skill-levelup-btn:hover { filter: brightness(1.08); }
.mm-skill-levelup-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }

.mm-engine-log {
  max-height: 140px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.6;
  color: var(--metal-muted-2);
  border-top: 1px solid var(--glass-line);
  padding-top: 10px;
}

.mm-engine-actions {
  position: absolute;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 550;
  width: min(320px, 90vw);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-align: center;
}

.mm-engine-actions-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--metal-muted-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.mm-engine-actions-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.mm-engine-actions-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mm-engine-action-btn {
  padding: 9px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.mm-engine-action-btn:hover { border-color: rgba(233, 233, 238, 0.5); background: rgba(255, 255, 255, 0.1); }
.mm-engine-action-btn.is-move { border-color: rgba(183, 234, 61, 0.4); }
.mm-engine-action-btn.is-capture { border-color: rgba(255, 84, 112, 0.4); }
.mm-engine-action-btn.is-release { border-color: rgba(255, 210, 63, 0.4); }

.mm-engine-actions-error {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ff96a8;
  min-height: 14px;
}

.mm-engine-banner {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 900;
  padding: 24px 40px;
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .mm-engine-hud { top: auto; bottom: 130px; right: 8px; width: 180px; }
}

.mm-zoom {
  position: absolute;
  bottom: 20px;
  right: 16px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.mm-zoom-btn {
  width: 38px;
  height: 34px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mm-zoom-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.mm-zoom-btn:disabled { color: var(--metal-muted); cursor: not-allowed; }

.mm-zoom-label {
  padding: 4px 0;
  border-top: 1px solid var(--glass-line);
  border-bottom: 1px solid var(--glass-line);
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--metal-muted-2);
}

.mm-reset {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 500;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(3, 3, 3, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.mm-reset:hover { border-color: rgba(233, 233, 238, 0.5); }

.mm-passport {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 600;
  width: min(340px, 90vw);
  padding: 24px 22px;
  background: rgba(5, 5, 5, 0.9);
  border-left: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.4);
}

.mm-passport-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--metal-muted-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mm-passport-close:hover { color: #fff; border-color: rgba(233, 233, 238, 0.5); }

.mm-passport-body { margin-top: 40px; }

.mm-passport-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--metal-muted);
  margin: 0 0 8px;
}

.mm-passport-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
}

.mm-passport-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
  margin-bottom: 6px;
}

.mm-passport-line-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mm-passport-termini {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--metal-muted-2);
  margin: 0 0 20px;
}

.mm-passport-uri {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--metal-muted);
  word-break: break-all;
  margin: 0;
}

.mm-passport-loading,
.mm-passport-error {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--metal-muted-2);
}

@media (max-width: 480px) {
  .mm-zoom { bottom: 70px; right: 12px; }
  .mm-reset { top: auto; bottom: 70px; left: 8px; right: auto; }
}

/* ── Tokenization redesign v3: brushed metal terminal ───── */
.tok-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 0;
}

.tok-grid--detail {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.tok-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.055) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0%, rgba(0, 0, 0, 0.06) 100%),
    rgba(13, 21, 15, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 4px 18px rgba(0, 0, 0, 0.35);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Top metallic sheen */
.tok-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

/* Bottom edge shadow line */
.tok-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
}

.tok-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 6px 28px rgba(0, 0, 0, 0.45);
}

.tok-card--own {
  background:
    linear-gradient(158deg, rgba(154, 212, 0, 0.1) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(154, 212, 0, 0.04) 0%, rgba(0, 0, 0, 0.06) 100%),
    rgba(10, 18, 9, 0.97);
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-left: 2px solid var(--acid);
  box-shadow:
    0 1px 0 rgba(154, 212, 0, 0.14) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 4px 18px rgba(0, 0, 0, 0.35),
    -6px 0 28px rgba(154, 212, 0, 0.07);
}

.tok-card--own::before {
  background: linear-gradient(90deg, rgba(154, 212, 0, 0.3) 0%, rgba(154, 212, 0, 0.06) 50%, transparent 100%);
}

.tok-card--own:hover {
  border-color: rgba(154, 212, 0, 0.45);
  border-left-color: var(--acid);
  box-shadow:
    0 1px 0 rgba(154, 212, 0, 0.18) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 6px 28px rgba(0, 0, 0, 0.45),
    -8px 0 36px rgba(154, 212, 0, 0.12);
}

.tok-card__header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.tok-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  color: var(--muted);
}

.tok-card__icon svg {
  width: 15px;
  height: 15px;
}

.tok-card--own .tok-card__icon {
  background: linear-gradient(145deg, rgba(154, 212, 0, 0.18) 0%, rgba(154, 212, 0, 0.06) 100%);
  border-color: rgba(154, 212, 0, 0.3);
  box-shadow: 0 1px 0 rgba(154, 212, 0, 0.1) inset, 0 0 10px rgba(154, 212, 0, 0.1);
  color: var(--acid);
}

.tok-card__icon--coin {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.tok-card__icon--coin .tokenization-coin-preview {
  width: 30px;
  height: 30px;
  box-shadow: 0 0 14px rgba(154, 212, 0, 0.24);
}

.tok-card__icon--coin .tokenization-coin-preview b {
  font-size: 12px;
}

.tok-card__label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1;
}

.tok-card__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.tok-card__hint svg {
  width: 11px;
  height: 11px;
}

.tok-card__hint:hover {
  border-color: var(--acid);
  color: var(--acid);
  box-shadow: 0 0 8px rgba(154, 212, 0, 0.2);
}

.tok-card__value {
  display: block;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.025em;
}

.tok-card--own .tok-card__value {
  color: var(--acid-2);
  text-shadow: 0 0 28px rgba(200, 255, 0, 0.25);
}

.tok-card__desc {
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tok-card--own .tok-card__desc {
  border-top-color: rgba(154, 212, 0, 0.1);
}

.tok-card__tooltip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 5px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Toggle — full-width separator with label */
.tok-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  background: transparent;
  border: none;
  color: var(--dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.tok-toggle-btn::before,
.tok-toggle-btn::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  transition: background var(--transition-fast);
}

.tok-toggle-btn:hover {
  color: var(--acid);
}

.tok-toggle-btn:hover::before,
.tok-toggle-btn:hover::after {
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.tok-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.tok-toggle-btn.is-open .tok-chevron {
  transform: rotate(180deg);
}

.stats-layout {
  display: grid;
  grid-template-columns: 170px minmax(210px, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.stat-list {
  gap: 8px;
  margin: 0;
}

.stat-list li {
  display: grid;
  grid-template-columns: 24px 1fr 38px;
  align-items: center;
  color: #ccd3cc;
  font-size: 12px;
  text-transform: uppercase;
}

.stat-list strong {
  color: #fff;
  font-weight: 700;
}

.radar {
  width: 100%;
  max-width: 252px;
  justify-self: center;
  overflow: visible;
}

.radar-grid polygon,
.radar-grid line {
  fill: none;
  stroke: rgba(154, 212, 0, 0.46);
  stroke-width: 1;
}

.radar-fill {
  fill: rgba(154, 212, 0, 0.28);
}

.radar-line {
  fill: none;
  stroke: var(--acid-2);
  stroke-width: 2;
}

.radar-points circle {
  fill: var(--acid-2);
  stroke: rgba(5, 12, 8, 0.92);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 5px rgba(154, 212, 0, 0.75));
}

.radar text {
  fill: #aeb7aa;
  font-family: var(--font-sans);
  font-size: 10px;
  text-transform: uppercase;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-title-row a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--acid-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.network {
  position: relative;
  height: 210px;
  margin-top: 8px;
}

.network-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.network-lines line {
  stroke: rgba(154, 212, 0, 0.62);
  stroke-width: 1.5;
}

.node {
  position: absolute;
  display: grid;
  grid-template-columns: auto minmax(0, 120px);
  column-gap: 10px;
  align-items: center;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
}

.node span {
  grid-column: 2;
  color: #c5cbc2;
  font-size: 11px;
  text-transform: none;
}

.main-node {
  left: 50%;
  top: 50%;
  grid-template-columns: 1fr;
  justify-items: center;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 16px;
}

.main-node strong {
  margin-top: 8px;
}

.n1 { left: 21%; top: 10%; }
.n2 { left: 8%; top: 42%; }
.n3 { left: 13%; bottom: 5%; }
.n4 { right: 11%; top: 8%; }
.n5 { right: 5%; top: 42%; }
.n6 { right: 10%; bottom: 5%; }

.avatar {
  position: relative;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(154, 212, 0, 0.45);
  border-radius: 50%;
  background:
    linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.72) 47%),
    radial-gradient(circle at 50% 33%, #c3b2a0 0 16%, transparent 17%),
    linear-gradient(135deg, #222, #597006);
  box-shadow: 0 0 14px rgba(154, 212, 0, 0.18);
  overflow: hidden;
}

.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.avatar::before {
  top: 13px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #c9b5a1;
  box-shadow: inset -4px 0 0 rgba(0, 0, 0, 0.2);
}

.avatar::after {
  bottom: 7px;
  width: 36px;
  height: 23px;
  border-radius: 18px 18px 0 0;
  background: #161b18;
}

.main-node .avatar {
  width: 104px;
  height: 104px;
  background:
    linear-gradient(180deg, rgba(210, 210, 190, 0.75), rgba(15, 18, 16, 0.95) 38%),
    radial-gradient(circle at 50% 28%, #bfc0ad 0 18%, transparent 19%),
    #0a0f0c;
}

.blaze { background-color: #5b2418; }
.arut { background-color: #23404b; }
.marsy { background-color: #544026; }
.tech { background-color: #123b55; }
.master { background-color: #25303a; }
.lesha { background-color: #694323; }

.skill-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.skill-icon {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.skill-info {
  flex: 1;
  min-width: 0;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.skill-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.skill-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin-left: 12px;
}

.skill-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: var(--pct, 0%);
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--accent);
  animation: skillFillIn 0.6s ease forwards;
}

@keyframes skillFillIn {
  from { width: 0; }
  to   { width: var(--pct, 0%); }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chips span,
.chips .chip-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #e8ede6;
  background: rgba(154, 212, 0, 0.07);
  font-size: 13px;
  min-width: 1ch;
  cursor: text;
  outline-offset: 2px;
}

.chips .chip-item:hover,
.chips .chip-item:focus {
  background: rgba(154, 212, 0, 0.11);
  outline: 1px dashed rgba(154, 212, 0, 0.35);
}

.chip-rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-left: 2px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 50%;
  background: rgba(154, 212, 0, 0.08);
  color: rgba(154, 212, 0, 0.7);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.chips .chip-item:hover .chip-rm-btn,
.chips .chip-item:focus-within .chip-rm-btn {
  opacity: 1;
}

.chip-rm-btn:hover {
  background: rgba(255, 60, 60, 0.2) !important;
  border-color: rgba(255, 60, 60, 0.5);
  color: #ff6060;
}

.chip-add-btn {
  padding: 10px 14px;
  border: 1px dashed rgba(154, 212, 0, 0.3);
  border-radius: 5px;
  background: transparent;
  color: rgba(154, 212, 0, 0.5);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chip-add-btn:hover {
  border-color: rgba(154, 212, 0, 0.6);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.06);
}

/* Event list management */
.char-events-managed {
  list-style: none;
  padding: 0;
  margin: 0;
}

.char-events-managed .event-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
}

.char-events-managed .event-item strong,
.char-events-managed .event-item time {
  min-width: 1ch;
  border-radius: 3px;
  cursor: text;
  outline-offset: 2px;
}

.char-events-managed .event-item strong:hover,
.char-events-managed .event-item strong:focus,
.char-events-managed .event-item time:hover,
.char-events-managed .event-item time:focus {
  background: rgba(154, 212, 0, 0.08);
  outline: 1px dashed rgba(154, 212, 0, 0.3);
}

.event-rm-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 50%;
  background: rgba(154, 212, 0, 0.06);
  color: rgba(154, 212, 0, 0.6);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.char-events-managed .event-item:hover .event-rm-btn {
  opacity: 1;
}

.event-rm-btn:hover {
  background: rgba(255, 60, 60, 0.18) !important;
  border-color: rgba(255, 60, 60, 0.5);
  color: #ff6060;
}

.event-add-btn {
  display: block;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px dashed rgba(154, 212, 0, 0.28);
  border-radius: 5px;
  background: transparent;
  color: rgba(154, 212, 0, 0.45);
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.event-add-btn:hover {
  border-color: rgba(154, 212, 0, 0.55);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.05);
}

.text-panel p {
  max-width: 700px;
}

.music-panel .panel-title-row {
  align-items: start;
}

.music-counter {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.music-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.music-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.music-add,
.music-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(154, 212, 0, 0.62);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(7, 15, 10, 0.78);
  box-shadow: inset 0 0 18px rgba(154, 212, 0, 0.06);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.music-add::before {
  content: "+";
  margin-right: 8px;
  font-size: 18px;
  line-height: 1;
}

.music-add:hover,
.music-clear:hover,
.music-add:focus-visible,
.music-clear:focus-visible {
  border-color: var(--acid-2);
  color: #fff;
  background: rgba(154, 212, 0, 0.14);
  outline: none;
}

.music-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.music-empty {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: #9fa89f;
  background: rgba(5, 10, 8, 0.46);
  font-size: 12px;
  text-transform: uppercase;
}

.music-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.06), transparent 68%),
    rgba(5, 10, 8, 0.72);
}

.music-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.music-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--acid-2);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 900;
}

.music-card strong,
.music-card em {
  display: block;
}

.music-card strong {
  color: #f0f3ea;
  font-size: 14px;
  line-height: 1.25;
  text-transform: uppercase;
}

.music-card em {
  margin-top: 4px;
  color: #99a198;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.music-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(154, 212, 0, 0.5);
  border-radius: 50%;
  color: #fff;
  background: rgba(3, 6, 4, 0.76);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.music-remove:hover,
.music-remove:focus-visible {
  border-color: var(--acid-2);
  color: var(--acid-2);
  outline: none;
}

.music-card audio {
  width: 100%;
  height: 38px;
  accent-color: var(--acid-2);
  filter: saturate(0.8);
}

.history-article {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  color: #d7ddd5;
}

.history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #aeb7aa;
  font-size: 12px;
  text-transform: uppercase;
}

.history-date,
.history-head a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 5px;
  background: rgba(154, 212, 0, 0.06);
}

.history-head a {
  color: var(--acid-2);
}

.history-article h3 {
  margin: 0;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(154, 212, 0, 0.32);
}

.history-lead {
  max-width: 900px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(154, 212, 0, 0.24);
  border-left-color: rgba(200, 255, 0, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.1), transparent 75%),
    rgba(5, 12, 8, 0.6);
  color: #edf3e8;
  line-height: 1.65;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-grid section {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(154, 212, 0, 0.22);
  border-radius: 8px;
  background: rgba(5, 12, 8, 0.48);
}

.history-grid h4 {
  margin: 0 0 12px;
  color: var(--acid-2);
  font-size: 14px;
  text-transform: uppercase;
}

.history-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.history-list li {
  position: relative;
  padding-left: 18px;
  color: #cbd3cb;
  font-size: 13px;
  line-height: 1.55;
}

.history-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--acid-2);
  border-radius: 50%;
  transform: translateY(-50%);
}

.gallery-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.gallery-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gallery-add,
.gallery-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(154, 212, 0, 0.62);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(7, 15, 10, 0.78);
  box-shadow: inset 0 0 18px rgba(154, 212, 0, 0.06);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.gallery-add::before {
  content: "+";
  margin-right: 8px;
  font-size: 18px;
  line-height: 1;
}

.gallery-add:hover,
.gallery-clear:hover,
.gallery-add:focus-visible,
.gallery-clear:focus-visible {
  border-color: var(--acid-2);
  color: #fff;
  background: rgba(154, 212, 0, 0.14);
  outline: none;
}

.gallery-grid {
  columns: 3;
  column-gap: 10px;
  margin-top: 16px;
}

.gallery-grid:empty {
  display: none;
}

@media (max-width: 900px) { .gallery-grid { columns: 2; } }
@media (max-width: 600px) { .gallery-grid { columns: 1; } }

@keyframes galleryFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gallery-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  animation: galleryFadeIn 0.35s ease both;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #050805;
}

.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.gallery-card:hover::after {
  opacity: 1;
}

.gallery-zoom-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-zoom-icon {
  opacity: 1;
}

.gallery-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(154, 212, 0, 0.5);
  border-radius: 50%;
  color: #fff;
  background: rgba(3, 6, 4, 0.76);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease, border-color 0.18s, color 0.18s;
}

.gallery-card:hover .gallery-remove {
  opacity: 1;
}

.gallery-remove:hover,
.gallery-remove:focus-visible {
  border-color: var(--acid-2);
  color: var(--acid-2);
  outline: none;
}

/* ── Lightbox ─────────────────────────────────────── */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.gallery-lb-img-wrap {
  position: relative;
  z-index: 1;
}

.gallery-lb-img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.7);
}

.gallery-lb-close,
.gallery-lb-prev,
.gallery-lb-next {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(3, 6, 4, 0.72);
  border: 1px solid rgba(154, 212, 0, 0.35);
  border-radius: 50%;
  color: rgba(154, 212, 0, 0.8);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.gallery-lb-close:hover,
.gallery-lb-prev:hover,
.gallery-lb-next:hover,
.gallery-lb-close:focus-visible,
.gallery-lb-prev:focus-visible,
.gallery-lb-next:focus-visible {
  border-color: var(--acid-2);
  color: #fff;
  background: rgba(154, 212, 0, 0.15);
  outline: none;
}

.gallery-lb-close {
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  font-size: 20px;
}

.gallery-lb-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.gallery-lb-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.gallery-lightbox[data-single] .gallery-lb-prev,
.gallery-lightbox[data-single] .gallery-lb-next {
  display: none;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr);
  gap: 12px;
}

.locations-panel,
.events-panel {
  padding: 16px;
}

.location-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.location-card {
  min-width: 0;
  border: 1px solid rgba(154, 212, 0, 0.25);
  border-radius: 6px;
  background: rgba(5, 10, 8, 0.7);
  overflow: hidden;
}

.location-card h3 {
  margin: 8px 9px 2px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.location-card p {
  margin: 0 9px 10px;
  color: #9fa69f;
  font-size: 11px;
  line-height: 1.4;
}

.economy-location-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(8, 8, 10, 0.98);
  overflow: hidden;
}

.economy-location-card .city-art {
  height: 82px;
}

/* ── Economy location card (map-panel style) ─────────────────────────────── */

.elc-image-wrap {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 9 / 16;
  width: 100%;
  background: #0a0a0c;
  overflow: hidden;
}

.elc-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.elc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 14px 16px 18px;
}

.elc-map-btn {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 10px 16px;
  border: 1px solid rgba(154, 212, 0, 0.45);
  border-radius: 6px;
  background: rgba(154, 212, 0, 0.06);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  box-sizing: border-box;
}

.elc-map-btn:hover,
.elc-map-btn:focus-visible {
  background: rgba(154, 212, 0, 0.14);
  border-color: rgba(154, 212, 0, 0.8);
  color: #fff;
  outline: none;
}

.elc-coords {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.economy-location-empty .elc-body {
  justify-content: center;
  align-items: flex-start;
}

.economy-city-art {
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.economy-city-art.has-map-image {
  background: #050805;
}

.economy-city-art.has-map-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04) brightness(0.72);
}

.economy-city-art.has-map-image::before {
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.76)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), transparent 54%);
}

.economy-city-art.has-map-image::after {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 62%, rgba(154, 212, 0, 0.24), transparent 38%),
    linear-gradient(rgba(255, 255, 255, 0.04) 50%, transparent 50%) 0 0 / 100% 4px;
}

.economy-city-art span {
  position: relative;
  z-index: 3;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.economy-city-art-rockstar {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.78), transparent 28%, rgba(0,0,0,0.82)),
    linear-gradient(180deg, rgba(180,20,36,0.82), rgba(4,9,8,0.98));
}
.economy-city-art-rockstar span { color: #ff3248; }

.economy-city-art-commerce {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.78), transparent 28%, rgba(0,0,0,0.82)),
    linear-gradient(180deg, rgba(28,120,34,0.82), rgba(4,9,8,0.98));
}
.economy-city-art-commerce span { color: #57ff63; }

.economy-city-art-playground {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.78), transparent 28%, rgba(0,0,0,0.82)),
    linear-gradient(180deg, rgba(160,82,12,0.82), rgba(4,9,8,0.98));
}
.economy-city-art-playground span { color: #ff982e; }

.economy-city-art-civic {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.78), transparent 28%, rgba(0,0,0,0.82)),
    linear-gradient(180deg, rgba(60,90,110,0.82), rgba(4,9,8,0.98));
}
.economy-city-art-civic span { color: #d9e4ea; }

.economy-location-card p {
  display: -webkit-box;
  min-height: 42px;
  margin-bottom: 7px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.location-coordinate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 9px 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.location-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(154, 212, 0, 0.36);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.location-map-link:hover,
.location-map-link:focus-visible {
  border-color: var(--acid-2);
  color: #fff;
  outline: none;
}

.economy-location-empty {
  grid-column: 1 / -1;
}

.economy-location-empty .elc-image-wrap {
  aspect-ratio: 4 / 1;
}

.location-economy-meta {
  display: grid;
  gap: 5px;
  margin: auto 9px 10px;
}

.location-economy-meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-top: 5px;
  border-top: 1px solid rgba(154, 212, 0, 0.16);
}

.location-economy-meta dt,
.location-economy-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-economy-meta dt {
  color: var(--muted);
  text-transform: uppercase;
}

.location-economy-meta dd {
  color: #fff;
  font-weight: 900;
  text-align: right;
}

.city-art {
  position: relative;
  height: 70px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), transparent 28%, rgba(0, 0, 0, 0.8)),
    linear-gradient(180deg, rgba(18, 88, 98, 0.74), rgba(4, 9, 8, 0.98));
}

.city-art::before,
.city-art::after {
  content: "";
  position: absolute;
  inset: 0;
}

.city-art::before {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(16, 28, 28, 0.9) 12% 20%, transparent 20% 28%, rgba(9, 18, 18, 0.92) 28% 43%, transparent 43% 55%, rgba(19, 31, 35, 0.9) 55% 66%, transparent 66% 76%, rgba(9, 18, 18, 0.94) 76% 88%, transparent 88%),
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(154, 212, 0, 0.45) 9px 10px, transparent 10px 18px);
}

.city-art::after {
  background:
    linear-gradient(90deg, transparent, rgba(154, 212, 0, 0.8), transparent) 45% 0 / 2px 100% no-repeat,
    radial-gradient(circle at 50% 58%, rgba(154, 212, 0, 0.56), transparent 24%);
}

.city-art.core {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), transparent 28%, rgba(0, 0, 0, 0.82)),
    linear-gradient(180deg, rgba(65, 92, 21, 0.8), rgba(4, 9, 8, 0.98));
}

.city-art.arena {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), transparent 28%, rgba(0, 0, 0, 0.82)),
    linear-gradient(180deg, rgba(82, 51, 118, 0.85), rgba(4, 9, 8, 0.98));
}

.city-art.cathedral {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), transparent 28%, rgba(0, 0, 0, 0.82)),
    linear-gradient(180deg, rgba(39, 104, 139, 0.85), rgba(4, 9, 8, 0.98));
}

.event-list {
  gap: 8px;
  margin-top: 13px;
}

.event-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: #cdd3cb;
  font-size: 13px;
}

.event-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.event-list time {
  color: #8e968e;
  font-size: 12px;
}

.event-avatar {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(154, 212, 0, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 36%, #c2bbaa 0 20%, transparent 21%),
    linear-gradient(135deg, #334029, #101611);
}

.brief-card,
.socials-card,
.commercial-card,
.character-chat-card {
  padding: 18px;
}

.social-list {
  gap: 9px;
  margin-top: 16px;
}

.social-list li {
  display: grid;
  grid-template-columns: 22px 78px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  color: #d6dbd4;
  font-size: 12px;
}

.social-list span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.social-list strong {
  font-weight: 500;
}

.social-list em {
  min-width: 0;
  color: #cbd0c8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.social-list svg {
  width: 14px;
  height: 14px;
  color: #98a098;
}

.telegram { background: #2a9ed8; }
.youtube { background: #e51e1e; }
.insta { background: linear-gradient(135deg, #6e42d8, #ff7a1b); }
.xnet { background: #111; }
.tiktok { background: #0b0c0e; box-shadow: inset 4px 0 #15d1df, inset -4px 0 #e2265c; }

.feature-list {
  gap: 10px;
  margin-top: 14px;
}

.feature-list li {
  min-height: 32px;
  padding: 0;
}

.owner-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
}

.owner-logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(154, 212, 0, 0.78), rgba(18, 27, 18, 0.95)),
    #111;
  box-shadow: 0 0 18px rgba(154, 212, 0, 0.32);
  font-family: var(--font-sans);
  font-size: 36px;
  overflow: hidden;
}

.owner-logo.has-owner-image {
  border-width: 1px;
  background: rgba(1, 4, 2, 0.75);
}

.owner-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.owner-logo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 0.45fr);
  gap: 8px;
  margin-top: 14px;
}

.owner-logo-upload,
.owner-logo-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(200, 255, 0, 0.42);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.08);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-logo-clear[hidden] {
  display: none;
}

.owner-logo-upload:hover,
.owner-logo-upload:focus-within,
.owner-logo-clear:hover,
.owner-logo-clear:focus-visible {
  border-color: var(--acid-2);
  background: rgba(154, 212, 0, 0.16);
  outline: none;
}

.owner-row strong,
.owner-row span {
  display: block;
}

.owner-row strong {
  font-size: 15px;
}

.owner-row span {
  margin-top: 3px;
  color: #aeb7aa;
  font-size: 12px;
}

.nft-card {
  min-height: 178px;
}

.token-art {
  position: absolute;
  right: 16px;
  bottom: 52px;
  width: 92px;
  height: 86px;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 5px;
  background:
    linear-gradient(45deg, rgba(154, 212, 0, 0.18), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(154, 212, 0, 0.28) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(154, 212, 0, 0.18) 10px 11px),
    rgba(7, 13, 9, 0.9);
  transform: rotate(11deg);
}

.token-art::before {
  content: "A";
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--acid-2);
  border-radius: 50%;
  color: var(--acid-2);
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-size: 25px;
}

.nft-card p,
.nft-card h2,
.nft-card button {
  max-width: 178px;
}

.center-rail .character-currency-card {
  min-height: 206px;
}

.center-rail .character-currency-card h2,
.center-rail .character-currency-card p {
  max-width: 190px;
}

.center-rail .character-currency-card button {
  width: 100%;
  max-width: none;
  margin-top: 18px;
}

.center-rail .character-currency-card .token-art {
  right: 18px;
  bottom: 70px;
}

.character-chat-card {
  display: flex;
  min-height: 560px;
  flex-direction: column;
}

.character-chat-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.character-chat-head h2 {
  max-width: 180px;
  margin: 0;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: 26px;
  line-height: 0.92;
  text-transform: uppercase;
}

.character-chat-head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--acid-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.character-chat-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.character-chat-feed {
  display: grid;
  gap: 12px;
  max-height: 430px;
  padding-right: 3px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.character-chat-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.character-chat-message.is-user {
  grid-template-columns: minmax(0, 1fr);
  margin-left: clamp(18px, 12%, 44px);
}

.character-chat-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--acid-2);
  background:
    radial-gradient(circle at 45% 36%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(154, 212, 0, 0.18), rgba(3, 6, 4, 0.94));
  box-shadow: 0 0 18px color-mix(in srgb, var(--acid-2) 22%, transparent);
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 20px;
}

.character-chat-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-chat-bubble {
  min-width: 0;
  padding: 13px 13px 11px;
  border: 1px solid rgba(154, 212, 0, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 48%),
    rgba(13, 24, 18, 0.72);
  box-shadow: inset 0 0 24px rgba(154, 212, 0, 0.035);
}

.character-chat-message.is-user .character-chat-bubble {
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(154, 212, 0, 0.15), transparent 70%),
    rgba(18, 34, 15, 0.8);
}

.character-chat-bubble strong,
.character-chat-bubble p,
.character-chat-bubble time {
  display: block;
}

.character-chat-bubble strong {
  color: var(--acid-2);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.character-chat-bubble p {
  margin: 8px 0 0;
  color: #d9ded6;
  font-size: 13px;
  line-height: 1.48;
}

.character-chat-bubble time {
  margin-top: 8px;
  color: rgba(214, 219, 212, 0.58);
  font-size: 12px;
  text-align: right;
}

.character-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.character-chat-form input,
.character-chat-form button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--text);
  background: rgba(3, 6, 4, 0.78);
}

.character-chat-form input {
  min-width: 0;
  padding: 0 12px;
  outline: none;
}

.character-chat-form input:focus {
  border-color: var(--acid-2);
  box-shadow: 0 0 16px color-mix(in srgb, var(--acid-2) 16%, transparent);
}

.character-chat-form button {
  display: grid;
  place-items: center;
  color: var(--acid-2);
  background:
    linear-gradient(135deg, rgba(154, 212, 0, 0.2), rgba(154, 212, 0, 0.05)),
    rgba(3, 6, 4, 0.9);
}

.character-chat-form input:disabled,
.character-chat-form button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.character-chat-form button svg {
  width: 18px;
  height: 18px;
}

.registry-layout {
  display: block;
  padding: 0 18px 18px;
  max-width: 100%;
}

.registry-content {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.05), transparent 46%),
    linear-gradient(rgba(154, 212, 0, 0.035) 1px, transparent 1px) 0 0 / 100% 34px,
    rgba(5, 10, 7, 0.88);
  box-shadow: inset 0 0 38px rgba(154, 212, 0, 0.04), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.registry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}

.registry-kicker {
  margin: 0 0 4px;
  color: rgba(154, 212, 0, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.registry-hero h1 {
  margin: 0;
  color: var(--acid-2);
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
}

.registry-hero p:last-child {
  margin: 10px 0 0;
  color: #c9d1c5;
  font-size: 13px;
  line-height: 1.55;
}

.registry-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 10px;
}

.registry-search,
.registry-sort {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 5px;
  background: rgba(8, 13, 10, 0.84);
}

.registry-search {
  gap: 12px;
  padding: 0 14px;
}

.registry-search svg {
  width: 20px;
  height: 20px;
  color: var(--acid-2);
}

.registry-search input,
.registry-sort select {
  min-width: 0;
  width: 100%;
  border: 0;
  color: #f1f5ec;
  background: transparent;
  outline: 0;
}

.registry-search input {
  font-size: 13px;
}

.registry-search input::placeholder {
  color: rgba(240, 242, 237, 0.52);
}

.registry-sort {
  position: relative;
  padding: 0 12px;
}

.registry-sort span {
  position: absolute;
  inset: 5px auto auto 12px;
  color: rgba(154, 212, 0, 0.7);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.registry-sort select {
  height: 46px;
  padding-top: 8px;
  color: #f0f4ea;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  appearance: none;
}

.registry-sort::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--acid-2);
  border-bottom: 2px solid var(--acid-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.registry-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-bottom: 14px;
  border: 1px solid rgba(154, 212, 0, 0.38);
  border-radius: 5px;
  overflow-x: auto;
}

.registry-filter {
  min-height: 46px;
  border: 0;
  border-right: 1px solid rgba(154, 212, 0, 0.25);
  color: #aeb7ad;
  background: rgba(8, 13, 10, 0.6);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.registry-filter:last-child {
  border-right: 0;
}

.registry-filter:hover,
.registry-filter.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(154, 212, 0, 0.48), rgba(154, 212, 0, 0.1));
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.character-card {
  position: relative;
  min-height: 350px;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(154, 212, 0, 0.48);
  border-radius: 6px;
  background:
    radial-gradient(circle at 74% 44%, rgba(154, 212, 0, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(154, 212, 0, 0.07), transparent 52%),
    rgba(6, 12, 8, 0.93);
  box-shadow: inset 0 0 24px rgba(154, 212, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.character-card:hover {
  border-color: rgba(154, 212, 0, 0.72);
  box-shadow: inset 0 0 32px rgba(154, 212, 0, 0.09), 0 0 28px rgba(154, 212, 0, 0.1), 0 8px 28px rgba(0, 0, 0, 0.28);
}

.character-card::before,
.character-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.character-card::before {
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(rgba(154, 212, 0, 0.045) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, transparent, rgba(154, 212, 0, 0.045), transparent) -80px 0 / 170px 100%;
  opacity: 0.56;
}

.character-card::after {
  top: 8px;
  right: 8px;
  width: 11px;
  height: 11px;
  border-top: 1px solid rgba(154, 212, 0, 0.65);
  border-right: 1px solid rgba(154, 212, 0, 0.65);
}

.character-card h2 {
  margin: 0;
  color: var(--acid-2);
  font-size: 17px;
  line-height: 1.05;
  text-transform: uppercase;
}

.character-index {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 30px;
  border: 1px solid rgba(154, 212, 0, 0.65);
  border-radius: 7px;
  color: var(--acid-2);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  background: rgba(3, 7, 4, 0.72);
}

.character-meta {
  display: grid;
  gap: 14px;
  margin: 0;
}

.character-meta div {
  position: relative;
  display: grid;
  gap: 4px;
}

.character-meta div::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(154, 212, 0, 0.35), transparent);
}

.character-meta div:last-child::after {
  display: none;
}

.character-meta dt {
  color: rgba(154, 212, 0, 0.72);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.character-meta dd {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  text-transform: uppercase;
}

.status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--acid-2);
  box-shadow: 0 0 10px rgba(200, 255, 0, 0.72);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.character-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(170px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(154, 212, 0, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(154, 212, 0, 0.16) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(154, 212, 0, 0.15) 14px 15px),
    conic-gradient(from -12deg, rgba(154, 212, 0, 0.1), rgba(154, 212, 0, 0.34), rgba(154, 212, 0, 0.08), rgba(154, 212, 0, 0.26), rgba(154, 212, 0, 0.1));
  box-shadow: 0 0 24px rgba(154, 212, 0, 0.12), inset 0 0 32px rgba(154, 212, 0, 0.1);
  overflow: hidden;
}

.character-orbit::before,
.character-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

.character-orbit::before {
  inset: 14%;
  border: 1px dashed rgba(154, 212, 0, 0.4);
}

.character-orbit::after {
  inset: 26%;
  border: 1px solid rgba(154, 212, 0, 0.34);
}

.character-orbit span {
  position: relative;
  z-index: 3;
  color: rgba(200, 255, 0, 0.7);
  font-family: var(--font-sans);
  font-size: 74px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(154, 212, 0, 0.32);
}

.character-orbit img {
  position: absolute;
  inset: 5%;
  z-index: 1;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(0.82) contrast(1.08) brightness(0.92);
}

.character-orbit.has-image {
  background:
    radial-gradient(circle, rgba(154, 212, 0, 0.16), transparent 62%),
    conic-gradient(from -12deg, rgba(154, 212, 0, 0.16), rgba(154, 212, 0, 0.42), rgba(154, 212, 0, 0.12), rgba(154, 212, 0, 0.35), rgba(154, 212, 0, 0.16));
}

.character-orbit.has-image span {
  display: none;
}

.character-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 43px;
  border: 1px solid rgba(154, 212, 0, 0.48);
  border-radius: 5px;
  color: #f1f5ed;
  background: rgba(3, 7, 4, 0.36);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.character-more svg {
  width: 18px;
  height: 18px;
  color: var(--acid-2);
}

.character-more:hover {
  border-color: var(--acid-2);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.11);
  box-shadow: 0 0 18px rgba(154, 212, 0, 0.12);
}

.character-card-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.character-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  filter: saturate(0.78) contrast(1.1) brightness(0.86);
  transition: filter 0.32s, transform 0.44s;
}

.character-card:hover .character-card-photo img {
  filter: saturate(0.92) contrast(1.12) brightness(0.96);
  transform: scale(1.04);
}

.character-photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(200, 255, 0, 0.7);
  font-family: var(--font-sans);
  font-size: 74px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(154, 212, 0, 0.32);
}

.character-card-photo.has-image .character-photo-placeholder {
  display: none;
}

.character-card-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 16px;
  background: transparent;
  isolation: isolate;
  transition: background 0.28s;
}

.character-card-panel::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: -110px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4, 8, 5, 0.94) 0%, rgba(4, 8, 5, 0.7) 40%, transparent);
  transition: opacity 0.28s;
}

.character-card:hover .character-card-panel {
  background: rgba(5, 10, 6, 0.84);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.character-card:hover .character-card-panel::before {
  opacity: 0;
}

.character-panel-action {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.26s ease, margin-top 0.26s ease;
}

.character-card:hover .character-panel-action {
  max-height: 60px;
  opacity: 1;
  margin-top: 10px;
}

.character-data-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  pointer-events: none;
}

.character-card.add-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-style: dashed;
  border-color: rgba(154, 212, 0, 0.22);
  cursor: pointer;
}

.character-card.add-card:hover {
  border-color: rgba(154, 212, 0, 0.52);
  background: rgba(154, 212, 0, 0.03);
  box-shadow: none;
}

.character-card.add-card::before,
.character-card.add-card::after {
  display: none;
}

.add-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.add-card-icon {
  font-size: 52px;
  font-weight: 100;
  color: rgba(154, 212, 0, 0.3);
  line-height: 1;
  font-family: var(--font-mono);
  transition: color var(--transition);
}

.character-card.add-card:hover .add-card-icon {
  color: rgba(154, 212, 0, 0.85);
}

.add-card-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  transition: color var(--transition);
}

.character-card.add-card:hover .add-card-label {
  color: rgba(154, 212, 0, 0.6);
}

.registry-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.registry-load {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 420px;
  min-height: 48px;
  border: 1px solid rgba(154, 212, 0, 0.56);
  border-radius: 5px;
  color: #dfe7dc;
  background: rgba(8, 13, 10, 0.76);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.registry-load:hover {
  border-color: var(--acid-2);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.1);
}

.registry-load strong {
  color: var(--acid-2);
  font-size: 20px;
  line-height: 1;
}

.registry-footer p {
  margin: 0;
  color: #8d968d;
  font-size: 11px;
  text-align: right;
  text-transform: uppercase;
}

.registry-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed rgba(154, 212, 0, 0.32);
  border-radius: 6px;
  color: #c8d0c5;
  font-size: 14px;
  text-transform: uppercase;
}

.theme-fuchsia {
  --acid: #f000c8;
  --acid-2: #ff4fd8;
  --line: rgba(255, 79, 216, 0.3);
  --line-strong: rgba(255, 79, 216, 0.62);
  --violet: #7414ff;
  background:
    linear-gradient(90deg, rgba(255, 79, 216, 0.045) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(255, 79, 216, 0.035) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 55% 16%, rgba(240, 0, 200, 0.2), transparent 42%),
    #050305;
}

.theme-fuchsia .topbar {
  border-bottom-color: rgba(255, 79, 216, 0.24);
  background: rgba(5, 3, 5, 0.88);
}

.theme-fuchsia .panel,
.theme-fuchsia .hero-card {
  border-color: rgba(255, 79, 216, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 79, 216, 0.075), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 45%),
    rgba(12, 6, 12, 0.92);
  box-shadow: inset 0 0 30px rgba(255, 79, 216, 0.045), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.theme-fuchsia .panel::before,
.theme-fuchsia .hero-card::before,
.theme-fuchsia .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 79, 216, 0.055), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 79, 216, 0.055) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-fuchsia .menu-list li.selected,
.theme-fuchsia .tab.active,
.theme-fuchsia .registry-filter.is-active {
  background: linear-gradient(90deg, rgba(240, 0, 200, 0.46), rgba(255, 79, 216, 0.1));
}

.theme-fuchsia .outline-action,
.theme-fuchsia .photo-add,
.theme-fuchsia .photo-clear,
.theme-fuchsia .gallery-add,
.theme-fuchsia .gallery-clear,
.theme-fuchsia .music-add,
.theme-fuchsia .music-clear {
  border-color: rgba(255, 79, 216, 0.58);
  background: linear-gradient(90deg, rgba(255, 79, 216, 0.12), rgba(255, 79, 216, 0.025));
}

.theme-fuchsia .coin,
.theme-fuchsia .owner-logo {
  background:
    radial-gradient(circle at 35% 30%, #ffe6ff, transparent 24%),
    radial-gradient(circle at 50% 50%, #ff4fd8, #6f005f 72%);
  box-shadow: 0 0 28px rgba(255, 79, 216, 0.34);
}

.theme-fuchsia .token-art {
  border-color: rgba(255, 79, 216, 0.42);
  background:
    linear-gradient(45deg, rgba(255, 79, 216, 0.22), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 79, 216, 0.28) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255, 79, 216, 0.18) 10px 11px),
    rgba(12, 5, 12, 0.9);
}

.theme-fuchsia .architect-mini,
.theme-fuchsia .dzendex-mini {
  background:
    radial-gradient(circle at 45% 32%, #ffe8ff, #ff4fd8 34%, #23001e 72%);
}

.theme-fuchsia .portrait-stage::before {
  background:
    linear-gradient(90deg, rgba(255, 79, 216, 0.08), transparent 28%, transparent),
    radial-gradient(circle at 55% 35%, rgba(255, 79, 216, 0.12), transparent 42%);
}

.theme-fuchsia .matrix-field {
  background:
    repeating-linear-gradient(90deg, rgba(255, 79, 216, 0.16) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(255, 79, 216, 0.1) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 40%, rgba(255, 79, 216, 0.11), transparent 60%);
  opacity: 0.26;
}

.theme-fuchsia .matrix-field::after {
  color: rgba(255, 79, 216, 0.24);
}

.theme-fuchsia .matrix-field span {
  color: rgba(255, 79, 216, 0.3);
  text-shadow: 0 0 8px rgba(255, 79, 216, 0.3);
}

.theme-fuchsia .photo-layer {
  border-color: rgba(255, 79, 216, 0.56);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 79, 216, 0.08), transparent 58%),
    #070307;
  box-shadow: 0 0 24px rgba(255, 79, 216, 0.16), inset 0 0 28px rgba(0, 0, 0, 0.46);
}

.theme-fuchsia .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(255, 79, 216, 0.08), transparent 20%, transparent 80%, rgba(255, 79, 216, 0.06)),
    linear-gradient(0deg, rgba(7, 3, 7, 0.28), transparent 24%, transparent 76%, rgba(7, 3, 7, 0.24));
}

.theme-fuchsia .hero-photo,
.theme-fuchsia .photo-thumb img {
  background: #070307;
}

.theme-fuchsia .photo-add:hover,
.theme-fuchsia .photo-clear:hover,
.theme-fuchsia .photo-add:focus-visible,
.theme-fuchsia .photo-clear:focus-visible {
  background: rgba(255, 79, 216, 0.14);
}

.theme-fuchsia .photo-thumbs {
  scrollbar-color: rgba(255, 79, 216, 0.62) transparent;
}

.theme-fuchsia .photo-thumb {
  border-color: rgba(255, 79, 216, 0.44);
  background: rgba(12, 5, 12, 0.86);
}

.theme-fuchsia .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(255, 79, 216, 0.46), 0 0 16px rgba(255, 79, 216, 0.32);
}

.theme-fuchsia .hero-copy::before {
  background: linear-gradient(transparent, rgba(255, 79, 216, 0.34), transparent);
}

.theme-fuchsia .hero-copy .eyebrow {
  border-color: rgba(255, 79, 216, 0.36);
  background: rgba(255, 79, 216, 0.08);
}

.theme-fuchsia .hero-copy h1 {
  text-shadow: 0 0 28px rgba(255, 79, 216, 0.34);
}

.theme-fuchsia .hero-copy blockquote {
  border-color: rgba(255, 79, 216, 0.24);
  background:
    linear-gradient(90deg, rgba(255, 79, 216, 0.08), transparent 72%),
    rgba(12, 7, 12, 0.68);
}

.theme-fuchsia .meta-grid {
  border-color: rgba(255, 79, 216, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 79, 216, 0.07), rgba(255, 79, 216, 0.025)),
    rgba(9, 7, 9, 0.76);
}

.theme-fuchsia .meta-grid div {
  border-bottom-color: rgba(255, 79, 216, 0.14);
}

.theme-purple-metallic {
  --acid: #7f35ff;
  --acid-2: #c8a7ff;
  --line: rgba(200, 167, 255, 0.28);
  --line-strong: rgba(200, 167, 255, 0.62);
  --violet: #5d2d9b;
  background:
    linear-gradient(90deg, rgba(200, 167, 255, 0.035) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(185, 194, 214, 0.025) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 58% 14%, rgba(125, 70, 210, 0.2), transparent 42%),
    radial-gradient(circle at 20% 84%, rgba(205, 210, 224, 0.08), transparent 36%),
    #050407;
}

.theme-purple-metallic .topbar {
  border-bottom-color: rgba(200, 167, 255, 0.24);
  background: rgba(5, 4, 7, 0.9);
}

.theme-purple-metallic .panel,
.theme-purple-metallic .hero-card {
  border-color: rgba(200, 167, 255, 0.36);
  background:
    linear-gradient(118deg, rgba(235, 232, 245, 0.06), transparent 19%, rgba(126, 78, 190, 0.11) 44%, transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 45%),
    rgba(10, 7, 13, 0.93);
  box-shadow: inset 0 0 32px rgba(200, 167, 255, 0.045), 0 18px 42px rgba(0, 0, 0, 0.26);
}

.theme-purple-metallic .panel::before,
.theme-purple-metallic .hero-card::before,
.theme-purple-metallic .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(215, 208, 230, 0.055), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(200, 167, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-purple-metallic .menu-list li.selected,
.theme-purple-metallic .tab.active,
.theme-purple-metallic .registry-filter.is-active {
  background: linear-gradient(90deg, rgba(127, 53, 255, 0.48), rgba(200, 167, 255, 0.1));
}

.theme-purple-metallic .outline-action,
.theme-purple-metallic .photo-add,
.theme-purple-metallic .photo-clear,
.theme-purple-metallic .gallery-add,
.theme-purple-metallic .gallery-clear,
.theme-purple-metallic .music-add,
.theme-purple-metallic .music-clear {
  border-color: rgba(200, 167, 255, 0.58);
  background:
    linear-gradient(90deg, rgba(200, 167, 255, 0.13), rgba(255, 255, 255, 0.025)),
    rgba(8, 5, 11, 0.64);
}

.theme-purple-metallic .coin,
.theme-purple-metallic .owner-logo {
  color: #f7f2ff;
  background:
    radial-gradient(circle at 34% 28%, #ffffff, transparent 22%),
    radial-gradient(circle at 50% 50%, #c8a7ff, #5a287d 56%, #130816 78%);
  box-shadow: 0 0 28px rgba(200, 167, 255, 0.28);
}

.theme-purple-metallic .token-art {
  border-color: rgba(200, 167, 255, 0.42);
  background:
    linear-gradient(45deg, rgba(200, 167, 255, 0.2), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(224, 218, 236, 0.2) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(127, 53, 255, 0.16) 10px 11px),
    rgba(10, 6, 13, 0.9);
}

.theme-purple-metallic .architect-mini,
.theme-purple-metallic .dzendex-mini,
.theme-purple-metallic .main-node .avatar {
  background:
    linear-gradient(135deg, rgba(241, 237, 249, 0.8), rgba(92, 65, 126, 0.8) 42%, rgba(8, 5, 10, 0.96)),
    radial-gradient(circle at 46% 34%, #f0eaff, #8d6acf 34%, #120816 72%);
}

.theme-purple-metallic .portrait-stage::before {
  background:
    linear-gradient(90deg, rgba(200, 167, 255, 0.08), transparent 28%, transparent),
    radial-gradient(circle at 55% 35%, rgba(200, 167, 255, 0.12), transparent 42%);
}

.theme-purple-metallic .matrix-field {
  background:
    repeating-linear-gradient(90deg, rgba(200, 167, 255, 0.14) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(230, 226, 240, 0.08) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 40%, rgba(127, 53, 255, 0.12), transparent 60%);
  opacity: 0.27;
}

.theme-purple-metallic .matrix-field::after {
  color: rgba(200, 167, 255, 0.23);
}

.theme-purple-metallic .matrix-field span {
  color: rgba(200, 167, 255, 0.3);
  text-shadow: 0 0 8px rgba(200, 167, 255, 0.28);
}

.theme-purple-metallic .photo-layer {
  border-color: rgba(200, 167, 255, 0.56);
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 167, 255, 0.09), transparent 58%),
    #070509;
  box-shadow: 0 0 24px rgba(200, 167, 255, 0.16), inset 0 0 28px rgba(0, 0, 0, 0.48);
}

.theme-purple-metallic .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(200, 167, 255, 0.08), transparent 20%, transparent 80%, rgba(235, 232, 245, 0.05)),
    linear-gradient(0deg, rgba(7, 5, 9, 0.28), transparent 24%, transparent 76%, rgba(7, 5, 9, 0.24));
}

.theme-purple-metallic .hero-photo,
.theme-purple-metallic .photo-thumb img {
  background: #070509;
}

.theme-purple-metallic .photo-add:hover,
.theme-purple-metallic .photo-clear:hover,
.theme-purple-metallic .photo-add:focus-visible,
.theme-purple-metallic .photo-clear:focus-visible {
  background: rgba(200, 167, 255, 0.14);
}

.theme-purple-metallic .photo-thumbs {
  scrollbar-color: rgba(200, 167, 255, 0.62) transparent;
}

.theme-purple-metallic .photo-thumb {
  border-color: rgba(200, 167, 255, 0.44);
  background: rgba(11, 7, 14, 0.86);
}

.theme-purple-metallic .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(200, 167, 255, 0.48), 0 0 16px rgba(127, 53, 255, 0.3);
}

.theme-purple-metallic .hero-copy::before {
  background: linear-gradient(transparent, rgba(200, 167, 255, 0.3), transparent);
}

.theme-purple-metallic .hero-copy .eyebrow {
  border-color: rgba(200, 167, 255, 0.42);
  color: #d9ccff;
  background: rgba(200, 167, 255, 0.08);
}

.theme-purple-metallic .hero-copy h1 {
  color: #d7c6ff;
  text-shadow: 0 0 30px rgba(127, 53, 255, 0.34), 0 1px 0 rgba(255, 255, 255, 0.3);
}

.theme-purple-metallic .hero-copy blockquote {
  border-color: rgba(200, 167, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(200, 167, 255, 0.08), transparent 72%),
    rgba(12, 8, 15, 0.68);
}

.theme-purple-metallic .meta-grid {
  border-color: rgba(200, 167, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(200, 167, 255, 0.07), rgba(235, 232, 245, 0.025)),
    rgba(9, 7, 11, 0.78);
}

.theme-purple-metallic .meta-grid div {
  border-bottom-color: rgba(200, 167, 255, 0.14);
}

.theme-blue-void {
  --acid: #0b6fff;
  --acid-2: #75ccff;
  --line: rgba(117, 204, 255, 0.3);
  --line-strong: rgba(117, 204, 255, 0.64);
  --violet: #153cff;
  background:
    radial-gradient(circle at 24% 8%, rgba(54, 141, 255, 0.2), transparent 32%),
    radial-gradient(circle at 82% 28%, rgba(153, 210, 255, 0.12), transparent 28%),
    linear-gradient(135deg, #020512 0%, #020815 42%, #031a31 100%);
}

.theme-blue-void .topbar {
  border-bottom-color: rgba(117, 204, 255, 0.24);
  background: rgba(2, 6, 14, 0.9);
}

.theme-blue-void .panel,
.theme-blue-void .hero-card {
  border-color: rgba(117, 204, 255, 0.36);
  background:
    radial-gradient(circle at 82% 8%, rgba(117, 204, 255, 0.11), transparent 34%),
    linear-gradient(132deg, rgba(117, 204, 255, 0.07), transparent 22%, rgba(11, 111, 255, 0.08) 54%, transparent 84%),
    rgba(4, 9, 18, 0.93);
  box-shadow: inset 0 0 34px rgba(0, 58, 120, 0.18);
}

.theme-blue-void .panel::before,
.theme-blue-void .hero-card::before,
.theme-blue-void .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(117, 204, 255, 0.055), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(117, 204, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-blue-void .menu-list li.selected,
.theme-blue-void .tab.active,
.theme-blue-void .registry-filter.is-active {
  background: linear-gradient(90deg, rgba(11, 111, 255, 0.5), rgba(117, 204, 255, 0.1));
}

.theme-blue-void .outline-action,
.theme-blue-void .photo-add,
.theme-blue-void .photo-clear,
.theme-blue-void .gallery-add,
.theme-blue-void .gallery-clear,
.theme-blue-void .music-add,
.theme-blue-void .music-clear {
  border-color: rgba(117, 204, 255, 0.6);
  background:
    linear-gradient(90deg, rgba(117, 204, 255, 0.13), rgba(255, 255, 255, 0.025)),
    rgba(4, 8, 16, 0.66);
}

.theme-blue-void .coin,
.theme-blue-void .owner-logo {
  color: #effaff;
  background:
    radial-gradient(circle at 35% 28%, #ffffff, transparent 23%),
    radial-gradient(circle at 50% 50%, #75ccff, #0b6fff 54%, #020713 78%);
  box-shadow: 0 0 28px rgba(117, 204, 255, 0.3);
}

.theme-blue-void .token-art {
  border-color: rgba(117, 204, 255, 0.44);
  background:
    linear-gradient(45deg, rgba(117, 204, 255, 0.2), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(117, 204, 255, 0.22) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(11, 111, 255, 0.16) 10px 11px),
    rgba(3, 9, 18, 0.9);
}

.theme-blue-void .architect-mini,
.theme-blue-void .dzendex-mini,
.theme-blue-void .x3o-mini,
.theme-blue-void .main-node .avatar {
  background:
    radial-gradient(circle at 46% 34%, #eaf8ff, #75ccff 34%, #021127 72%),
    linear-gradient(135deg, rgba(117, 204, 255, 0.75), rgba(3, 23, 52, 0.95));
}

.theme-blue-void .portrait-stage::before {
  background:
    linear-gradient(90deg, rgba(117, 204, 255, 0.08), transparent 28%, transparent),
    radial-gradient(circle at 55% 35%, rgba(117, 204, 255, 0.12), transparent 42%);
}

.theme-blue-void .matrix-field {
  background:
    radial-gradient(circle at 24% 15%, rgba(199, 233, 255, 0.2), transparent 24%),
    radial-gradient(circle at 78% 36%, rgba(44, 153, 255, 0.16), transparent 32%),
    radial-gradient(circle at 48% 68%, rgba(9, 67, 150, 0.24), transparent 38%),
    linear-gradient(135deg, rgba(3, 13, 34, 0.92), rgba(0, 27, 58, 0.72));
  opacity: 0.8;
}

.theme-blue-void .matrix-field::after {
  color: rgba(117, 204, 255, 0.2);
}

.theme-blue-void .matrix-field span {
  color: rgba(117, 204, 255, 0.3);
  text-shadow: 0 0 8px rgba(117, 204, 255, 0.28);
}

.theme-blue-void .photo-layer {
  border-color: rgba(117, 204, 255, 0.58);
  background:
    radial-gradient(circle at 50% 50%, rgba(117, 204, 255, 0.09), transparent 58%),
    #020713;
  box-shadow: 0 0 24px rgba(117, 204, 255, 0.18), inset 0 0 28px rgba(0, 0, 0, 0.48);
}

.theme-blue-void .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(117, 204, 255, 0.08), transparent 20%, transparent 80%, rgba(199, 233, 255, 0.05)),
    linear-gradient(0deg, rgba(2, 7, 19, 0.28), transparent 24%, transparent 76%, rgba(2, 7, 19, 0.24));
}

.theme-blue-void .hero-photo,
.theme-blue-void .photo-thumb img {
  background: #020713;
}

.theme-blue-void .photo-add:hover,
.theme-blue-void .photo-clear:hover,
.theme-blue-void .photo-add:focus-visible,
.theme-blue-void .photo-clear:focus-visible {
  background: rgba(117, 204, 255, 0.14);
}

.theme-blue-void .photo-thumbs {
  scrollbar-color: rgba(117, 204, 255, 0.62) transparent;
}

.theme-blue-void .photo-thumb {
  border-color: rgba(117, 204, 255, 0.44);
  background: rgba(3, 10, 21, 0.86);
}

.theme-blue-void .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(117, 204, 255, 0.48), 0 0 16px rgba(11, 111, 255, 0.3);
}

.theme-blue-void .hero-copy::before {
  background: linear-gradient(transparent, rgba(117, 204, 255, 0.3), transparent);
}

.theme-blue-void .hero-copy .eyebrow {
  border-color: rgba(117, 204, 255, 0.42);
  color: #bdeaff;
  background: rgba(117, 204, 255, 0.08);
}

.theme-blue-void .hero-copy h1 {
  color: #d5f1ff;
  text-shadow: 0 0 30px rgba(11, 111, 255, 0.34), 0 1px 0 rgba(255, 255, 255, 0.3);
}

.theme-blue-void .hero-copy blockquote {
  border-color: rgba(117, 204, 255, 0.26);
  background:
    linear-gradient(90deg, rgba(117, 204, 255, 0.08), transparent 72%),
    rgba(3, 11, 22, 0.7);
}

.theme-blue-void .meta-grid {
  border-color: rgba(117, 204, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(117, 204, 255, 0.07), rgba(205, 238, 255, 0.025)),
    rgba(3, 9, 18, 0.8);
}

.theme-blue-void .meta-grid div {
  border-bottom-color: rgba(117, 204, 255, 0.14);
}

.theme-warm-flesh {
  --acid: #d47435;
  --acid-2: #ffb078;
  --line: rgba(255, 176, 120, 0.32);
  --line-strong: rgba(255, 176, 120, 0.66);
  --violet: #8d3f20;
  background:
    linear-gradient(90deg, rgba(255, 176, 120, 0.045) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(255, 176, 120, 0.032) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 55% 15%, rgba(212, 116, 53, 0.22), transparent 40%),
    radial-gradient(circle at 18% 78%, rgba(255, 190, 148, 0.11), transparent 34%),
    #070403;
}

.theme-warm-flesh .topbar {
  border-bottom-color: rgba(255, 176, 120, 0.26);
  background: rgba(7, 4, 3, 0.9);
}

.theme-warm-flesh .panel,
.theme-warm-flesh .hero-card {
  border-color: rgba(255, 176, 120, 0.4);
  background:
    radial-gradient(circle at 84% 6%, rgba(255, 176, 120, 0.12), transparent 34%),
    linear-gradient(132deg, rgba(255, 176, 120, 0.08), transparent 26%, rgba(212, 116, 53, 0.1) 58%, transparent 84%),
    rgba(16, 9, 6, 0.93);
  box-shadow: inset 0 0 34px rgba(212, 116, 53, 0.08), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.theme-warm-flesh .panel::before,
.theme-warm-flesh .hero-card::before,
.theme-warm-flesh .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 176, 120, 0.055), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 176, 120, 0.05) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-warm-flesh .menu-list li.selected,
.theme-warm-flesh .tab.active,
.theme-warm-flesh .registry-filter.is-active {
  background: linear-gradient(90deg, rgba(212, 116, 53, 0.52), rgba(255, 176, 120, 0.12));
}

.theme-warm-flesh .outline-action,
.theme-warm-flesh .photo-add,
.theme-warm-flesh .photo-clear,
.theme-warm-flesh .gallery-add,
.theme-warm-flesh .gallery-clear,
.theme-warm-flesh .music-add,
.theme-warm-flesh .music-clear {
  border-color: rgba(255, 176, 120, 0.62);
  background:
    linear-gradient(90deg, rgba(255, 176, 120, 0.14), rgba(255, 214, 185, 0.025)),
    rgba(13, 7, 5, 0.68);
}

.theme-warm-flesh .coin,
.theme-warm-flesh .owner-logo {
  color: #fff4ea;
  background:
    radial-gradient(circle at 34% 28%, #fff7ef, transparent 23%),
    radial-gradient(circle at 50% 50%, #ffb078, #d47435 54%, #150705 78%);
  box-shadow: 0 0 28px rgba(255, 176, 120, 0.32);
}

.theme-warm-flesh .token-art {
  border-color: rgba(255, 176, 120, 0.46);
  background:
    linear-gradient(45deg, rgba(255, 176, 120, 0.22), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 176, 120, 0.22) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(212, 116, 53, 0.16) 10px 11px),
    rgba(14, 8, 5, 0.9);
}

.theme-warm-flesh .architect-mini,
.theme-warm-flesh .dzendex-mini,
.theme-warm-flesh .main-node .avatar {
  background:
    radial-gradient(circle at 46% 34%, #fff2e5, #ffb078 34%, #21100a 72%),
    linear-gradient(135deg, rgba(255, 176, 120, 0.75), rgba(42, 18, 9, 0.95));
}

.theme-warm-flesh .portrait-stage::before {
  background:
    linear-gradient(90deg, rgba(255, 176, 120, 0.08), transparent 28%, transparent),
    radial-gradient(circle at 55% 35%, rgba(255, 176, 120, 0.14), transparent 42%);
}

.theme-warm-flesh .matrix-field {
  background:
    repeating-linear-gradient(90deg, rgba(255, 176, 120, 0.14) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(255, 214, 185, 0.08) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 40%, rgba(212, 116, 53, 0.12), transparent 60%);
  opacity: 0.3;
}

.theme-warm-flesh .matrix-field::after {
  color: rgba(255, 176, 120, 0.23);
}

.theme-warm-flesh .matrix-field span {
  color: rgba(255, 176, 120, 0.32);
  text-shadow: 0 0 8px rgba(255, 176, 120, 0.3);
}

.theme-warm-flesh .photo-layer {
  border-color: rgba(255, 176, 120, 0.62);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 176, 120, 0.1), transparent 58%),
    #0c0604;
  box-shadow: 0 0 24px rgba(255, 176, 120, 0.2), inset 0 0 28px rgba(0, 0, 0, 0.48);
}

.theme-warm-flesh .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(255, 176, 120, 0.08), transparent 20%, transparent 80%, rgba(255, 220, 198, 0.06)),
    linear-gradient(0deg, rgba(12, 6, 4, 0.28), transparent 24%, transparent 76%, rgba(12, 6, 4, 0.24));
}

.theme-warm-flesh .hero-photo,
.theme-warm-flesh .photo-thumb img {
  background: #0c0604;
}

.theme-warm-flesh .photo-add:hover,
.theme-warm-flesh .photo-clear:hover,
.theme-warm-flesh .photo-add:focus-visible,
.theme-warm-flesh .photo-clear:focus-visible {
  background: rgba(255, 176, 120, 0.15);
}

.theme-warm-flesh .photo-thumbs {
  scrollbar-color: rgba(255, 176, 120, 0.64) transparent;
}

.theme-warm-flesh .photo-thumb {
  border-color: rgba(255, 176, 120, 0.46);
  background: rgba(16, 8, 5, 0.86);
}

.theme-warm-flesh .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(255, 176, 120, 0.5), 0 0 16px rgba(212, 116, 53, 0.34);
}

.theme-warm-flesh .hero-copy::before {
  background: linear-gradient(transparent, rgba(255, 176, 120, 0.34), transparent);
}

.theme-warm-flesh .hero-copy .eyebrow {
  border-color: rgba(255, 176, 120, 0.46);
  color: #ffd4b5;
  background: rgba(255, 176, 120, 0.1);
}

.theme-warm-flesh .hero-copy h1 {
  color: #ffb078;
  text-shadow: 0 0 30px rgba(212, 116, 53, 0.38), 0 1px 0 rgba(255, 244, 234, 0.24);
}

.theme-warm-flesh .hero-copy blockquote {
  border-color: rgba(255, 176, 120, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 176, 120, 0.1), transparent 72%),
    rgba(16, 8, 5, 0.7);
}

.theme-warm-flesh .meta-grid {
  border-color: rgba(255, 176, 120, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 176, 120, 0.08), rgba(255, 214, 185, 0.025)),
    rgba(13, 7, 5, 0.8);
}

.theme-warm-flesh .meta-grid div {
  border-bottom-color: rgba(255, 176, 120, 0.16);
}

.theme-warm-flesh .architect-svg {
  color: #ffb078;
  filter: drop-shadow(0 0 28px rgba(212, 116, 53, 0.34));
}

.theme-warm-flesh .architect-svg .line {
  stroke: #fff1e5;
}

.theme-warm-flesh .architect-svg .line.accent {
  stroke: rgba(255, 176, 120, 0.86);
}

.theme-rose-gold {
  --acid: #ff7fb7;
  --acid-2: #ffd166;
  --line: rgba(255, 127, 183, 0.3);
  --line-strong: rgba(255, 209, 102, 0.62);
  --violet: #8b2d61;
  background:
    linear-gradient(90deg, rgba(255, 127, 183, 0.04) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(255, 209, 102, 0.03) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 58% 14%, rgba(255, 127, 183, 0.2), transparent 38%),
    radial-gradient(circle at 20% 78%, rgba(255, 209, 102, 0.12), transparent 34%),
    #070306;
}

.theme-rose-gold [data-editable="true"]:hover {
  background: rgba(255, 127, 183, 0.08);
  outline-color: rgba(255, 209, 102, 0.32);
}

.theme-rose-gold [data-editable="true"]:focus {
  background: rgba(255, 127, 183, 0.14);
  box-shadow: 0 0 18px rgba(255, 127, 183, 0.14);
  outline-color: rgba(255, 209, 102, 0.74);
}

.theme-rose-gold .topbar {
  border-bottom-color: rgba(255, 127, 183, 0.26);
  background: rgba(7, 3, 6, 0.92);
}

.theme-rose-gold .panel,
.theme-rose-gold .hero-card {
  border-color: rgba(255, 127, 183, 0.4);
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 209, 102, 0.11), transparent 34%),
    linear-gradient(132deg, rgba(255, 127, 183, 0.08), transparent 28%, rgba(255, 209, 102, 0.08) 58%, transparent 84%),
    rgba(16, 7, 13, 0.93);
  box-shadow: inset 0 0 34px rgba(255, 127, 183, 0.08), 0 18px 42px rgba(0, 0, 0, 0.25);
}

.theme-rose-gold .panel::before,
.theme-rose-gold .hero-card::before,
.theme-rose-gold .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.045), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 127, 183, 0.045) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-rose-gold .menu-list li.selected,
.theme-rose-gold .tab.active,
.theme-rose-gold .registry-filter.is-active {
  color: #fff9e8;
  background: linear-gradient(90deg, rgba(255, 127, 183, 0.56), rgba(255, 209, 102, 0.14));
}

.theme-rose-gold .outline-action,
.theme-rose-gold .photo-add,
.theme-rose-gold .photo-clear,
.theme-rose-gold .gallery-add,
.theme-rose-gold .gallery-clear,
.theme-rose-gold .music-add,
.theme-rose-gold .music-clear {
  border-color: rgba(255, 209, 102, 0.62);
  background:
    linear-gradient(90deg, rgba(255, 127, 183, 0.16), rgba(255, 209, 102, 0.04)),
    rgba(13, 5, 10, 0.68);
}

.theme-rose-gold .coin,
.theme-rose-gold .owner-logo {
  color: #fff8e8;
  background:
    radial-gradient(circle at 34% 28%, #fff7e1, transparent 22%),
    radial-gradient(circle at 50% 50%, #ffd166, #ff7fb7 54%, #18050f 78%);
  box-shadow: 0 0 28px rgba(255, 127, 183, 0.32);
}

.theme-rose-gold .token-art {
  border-color: rgba(255, 209, 102, 0.46);
  background:
    linear-gradient(45deg, rgba(255, 127, 183, 0.22), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 209, 102, 0.2) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255, 127, 183, 0.14) 10px 11px),
    rgba(14, 6, 11, 0.9);
}

.theme-rose-gold .architect-mini,
.theme-rose-gold .dzendex-mini,
.theme-rose-gold .main-node .avatar {
  background:
    radial-gradient(circle at 46% 34%, #fff8e8, #ffd166 27%, #ff7fb7 52%, #201016 78%),
    linear-gradient(135deg, rgba(255, 127, 183, 0.72), rgba(42, 15, 26, 0.95));
}

.theme-rose-gold .matrix-field {
  background:
    repeating-linear-gradient(90deg, rgba(255, 127, 183, 0.14) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(255, 209, 102, 0.08) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 40%, rgba(255, 127, 183, 0.12), transparent 60%);
  opacity: 0.3;
}

.theme-rose-gold .matrix-field::after {
  color: rgba(255, 209, 102, 0.2);
}

.theme-rose-gold .matrix-field span {
  color: rgba(255, 209, 102, 0.32);
  text-shadow: 0 0 8px rgba(255, 127, 183, 0.3);
}

.theme-rose-gold .photo-layer {
  border-color: rgba(255, 209, 102, 0.62);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 127, 183, 0.11), transparent 58%),
    #0c0409;
  box-shadow: 0 0 24px rgba(255, 127, 183, 0.22), inset 0 0 28px rgba(0, 0, 0, 0.48);
}

.theme-rose-gold .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(255, 127, 183, 0.08), transparent 20%, transparent 80%, rgba(255, 209, 102, 0.06)),
    linear-gradient(0deg, rgba(12, 4, 9, 0.28), transparent 24%, transparent 76%, rgba(12, 4, 9, 0.24));
}

.theme-rose-gold .hero-photo,
.theme-rose-gold .photo-thumb img {
  background: #0c0409;
}

.theme-rose-gold .photo-thumb {
  border-color: rgba(255, 209, 102, 0.46);
  background: rgba(16, 7, 13, 0.86);
}

.theme-rose-gold .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.48), 0 0 16px rgba(255, 127, 183, 0.34);
}

.theme-rose-gold .hero-copy .eyebrow {
  border-color: rgba(255, 209, 102, 0.46);
  color: #ffe0a4;
  background: rgba(255, 127, 183, 0.1);
}

.theme-rose-gold .hero-copy h1 {
  color: #ff7fb7;
  text-shadow: 0 0 30px rgba(255, 127, 183, 0.38), 0 1px 0 rgba(255, 248, 232, 0.24);
}

.theme-rose-gold .hero-copy blockquote,
.theme-rose-gold .meta-grid {
  border-color: rgba(255, 209, 102, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 127, 183, 0.1), transparent 72%),
    rgba(16, 7, 13, 0.72);
}

.theme-rose-gold .meta-grid div {
  border-bottom-color: rgba(255, 209, 102, 0.15);
}

.theme-rose-gold .architect-svg {
  color: #ffd166;
  filter: drop-shadow(0 0 28px rgba(255, 127, 183, 0.34));
}

.theme-rose-gold .architect-svg .line {
  stroke: #fff4d3;
}

.theme-rose-gold .architect-svg .line.accent {
  stroke: rgba(255, 127, 183, 0.88);
}

.theme-red-ussr {
  --acid: #ff3b2f;
  --acid-2: #ffd447;
  --line: rgba(255, 59, 47, 0.34);
  --line-strong: rgba(255, 212, 71, 0.68);
  --violet: #7f1410;
  background:
    linear-gradient(90deg, rgba(255, 59, 47, 0.04) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(255, 212, 71, 0.032) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 55% 15%, rgba(255, 59, 47, 0.22), transparent 40%),
    radial-gradient(circle at 18% 78%, rgba(255, 212, 71, 0.1), transparent 34%),
    #080302;
}

.theme-red-ussr [data-editable="true"]:hover {
  background: rgba(255, 59, 47, 0.08);
  outline-color: rgba(255, 212, 71, 0.28);
}

.theme-red-ussr [data-editable="true"]:focus {
  background: rgba(255, 59, 47, 0.14);
  box-shadow: 0 0 18px rgba(255, 59, 47, 0.15);
  outline-color: rgba(255, 212, 71, 0.74);
}

.theme-red-ussr .topbar {
  border-bottom-color: rgba(255, 59, 47, 0.3);
  background: rgba(8, 3, 2, 0.92);
}

.theme-red-ussr .panel,
.theme-red-ussr .hero-card {
  border-color: rgba(255, 59, 47, 0.44);
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 212, 71, 0.12), transparent 34%),
    linear-gradient(132deg, rgba(255, 59, 47, 0.1), transparent 28%, rgba(255, 212, 71, 0.07) 58%, transparent 84%),
    rgba(17, 6, 4, 0.93);
  box-shadow: inset 0 0 34px rgba(255, 59, 47, 0.09), 0 18px 42px rgba(0, 0, 0, 0.26);
}

.theme-red-ussr .panel::before,
.theme-red-ussr .hero-card::before,
.theme-red-ussr .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 212, 71, 0.048), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 59, 47, 0.048) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-red-ussr .menu-list li.selected,
.theme-red-ussr .tab.active,
.theme-red-ussr .registry-filter.is-active {
  color: #fff8d6;
  background: linear-gradient(90deg, rgba(176, 25, 18, 0.64), rgba(255, 212, 71, 0.16));
}

.theme-red-ussr .outline-action,
.theme-red-ussr .photo-add,
.theme-red-ussr .photo-clear,
.theme-red-ussr .gallery-add,
.theme-red-ussr .gallery-clear,
.theme-red-ussr .music-add,
.theme-red-ussr .music-clear {
  border-color: rgba(255, 212, 71, 0.64);
  background:
    linear-gradient(90deg, rgba(255, 59, 47, 0.16), rgba(255, 212, 71, 0.04)),
    rgba(14, 5, 4, 0.7);
}

.theme-red-ussr .coin,
.theme-red-ussr .owner-logo {
  color: #fff5c5;
  background:
    radial-gradient(circle at 34% 28%, #fff3bf, transparent 22%),
    radial-gradient(circle at 50% 50%, #ffd447, #ff3b2f 54%, #1b0403 78%);
  box-shadow: 0 0 28px rgba(255, 59, 47, 0.34);
}

.theme-red-ussr .token-art {
  border-color: rgba(255, 212, 71, 0.46);
  background:
    linear-gradient(45deg, rgba(255, 59, 47, 0.24), transparent 32%),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 212, 71, 0.2) 10px 11px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255, 59, 47, 0.14) 10px 11px),
    rgba(15, 5, 4, 0.9);
}

.theme-red-ussr .architect-mini,
.theme-red-ussr .dzendex-mini,
.theme-red-ussr .main-node .avatar {
  background:
    radial-gradient(circle at 46% 34%, #fff6c8, #ffd447 28%, #ff3b2f 54%, #1f0805 78%),
    linear-gradient(135deg, rgba(255, 59, 47, 0.74), rgba(46, 10, 7, 0.95));
}

.theme-red-ussr .matrix-field {
  background:
    repeating-linear-gradient(90deg, rgba(255, 59, 47, 0.15) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(255, 212, 71, 0.08) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 40%, rgba(176, 25, 18, 0.13), transparent 60%);
  opacity: 0.32;
}

.theme-red-ussr .matrix-field::after {
  color: rgba(255, 212, 71, 0.22);
}

.theme-red-ussr .matrix-field span {
  color: rgba(255, 212, 71, 0.34);
  text-shadow: 0 0 8px rgba(255, 59, 47, 0.32);
}

.theme-red-ussr .photo-layer {
  border-color: rgba(255, 212, 71, 0.64);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 59, 47, 0.12), transparent 58%),
    #0c0302;
  box-shadow: 0 0 24px rgba(255, 59, 47, 0.22), inset 0 0 28px rgba(0, 0, 0, 0.5);
}

.theme-red-ussr .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(255, 59, 47, 0.08), transparent 20%, transparent 80%, rgba(255, 212, 71, 0.06)),
    linear-gradient(0deg, rgba(12, 3, 2, 0.28), transparent 24%, transparent 76%, rgba(12, 3, 2, 0.24));
}

.theme-red-ussr .hero-photo,
.theme-red-ussr .photo-thumb img {
  background: #0c0302;
}

.theme-red-ussr .photo-thumb {
  border-color: rgba(255, 212, 71, 0.48);
  background: rgba(17, 6, 4, 0.88);
}

.theme-red-ussr .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(255, 212, 71, 0.5), 0 0 16px rgba(255, 59, 47, 0.35);
}

.theme-red-ussr .hero-copy .eyebrow {
  border-color: rgba(255, 212, 71, 0.48);
  color: #ffe78d;
  background: rgba(255, 59, 47, 0.12);
}

.theme-red-ussr .hero-copy h1 {
  color: #ff3b2f;
  text-shadow: 0 0 30px rgba(255, 59, 47, 0.42), 0 1px 0 rgba(255, 245, 197, 0.24);
}

.theme-red-ussr .hero-copy blockquote,
.theme-red-ussr .meta-grid {
  border-color: rgba(255, 212, 71, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 59, 47, 0.11), transparent 72%),
    rgba(17, 6, 4, 0.72);
}

.theme-red-ussr .meta-grid div {
  border-bottom-color: rgba(255, 212, 71, 0.16);
}

.theme-red-ussr .architect-svg {
  color: #ffd447;
  filter: drop-shadow(0 0 28px rgba(255, 59, 47, 0.36));
}

.theme-red-ussr .architect-svg .line {
  stroke: #fff1af;
}

.theme-red-ussr .architect-svg .line.accent {
  stroke: rgba(255, 59, 47, 0.9);
}

.x3o-svg {
  position: absolute;
  left: 50%;
  bottom: 38px;
  z-index: 2;
  width: min(560px, 96%);
  max-height: 86%;
  color: var(--acid-2);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 26px rgba(11, 111, 255, 0.32));
}

.x3o-svg .dz-orbit {
  fill: none;
  stroke: rgba(117, 204, 255, 0.8);
  stroke-width: 4;
}

.x3o-svg .dz-orbit.thin {
  stroke-width: 2;
  stroke-dasharray: 8 12;
  opacity: 0.74;
}

.x3o-svg .dz-line {
  fill: none;
  stroke: #d5f1ff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.x3o-svg .dz-line.thin {
  stroke-width: 2.5;
  opacity: 0.82;
}

.x3o-svg .dz-line.branch {
  stroke: rgba(117, 204, 255, 0.84);
  stroke-width: 3;
}

.x3o-svg .dz-node {
  fill: #75ccff;
  stroke: #eefaff;
  stroke-width: 3;
}

.marsy-svg {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 2;
  width: min(570px, 96%);
  max-height: 86%;
  color: var(--acid-2);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 25px rgba(127, 53, 255, 0.28));
}

.marsy-svg .marsy-orbit {
  fill: none;
  stroke: rgba(200, 167, 255, 0.78);
  stroke-width: 4;
}

.marsy-svg .marsy-orbit.thin {
  stroke-width: 2;
  stroke-dasharray: 9 12;
  opacity: 0.72;
}

.marsy-svg .marsy-line,
.marsy-svg .marsy-mic {
  fill: none;
  stroke: #eee8f7;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marsy-svg .marsy-line.thin {
  stroke-width: 2.5;
  opacity: 0.82;
}

.marsy-svg .marsy-line.dark {
  stroke: rgba(20, 12, 24, 0.9);
  stroke-width: 4;
}

.marsy-svg .marsy-mic {
  stroke: rgba(200, 167, 255, 0.82);
  stroke-width: 4;
}

.marsy-svg .marsy-node {
  fill: #c8a7ff;
  stroke: #f7f2ff;
  stroke-width: 3;
}

.marsy-svg .marsy-star {
  fill: rgba(127, 53, 255, 0.22);
  stroke: #c8a7ff;
  stroke-width: 4;
  stroke-linejoin: round;
}

.marsy-svg .marsy-plate {
  fill: none;
  stroke: rgba(235, 232, 245, 0.56);
  stroke-width: 5;
  stroke-linecap: round;
}

.dzendex-svg {
  position: absolute;
  left: 50%;
  bottom: 38px;
  z-index: 2;
  width: min(560px, 96%);
  max-height: 86%;
  color: var(--acid-2);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 24px rgba(255, 79, 216, 0.28));
}

.dzendex-svg .dz-orbit {
  fill: none;
  stroke: rgba(255, 79, 216, 0.78);
  stroke-width: 4;
}

.dzendex-svg .dz-orbit.thin {
  stroke-width: 2;
  stroke-dasharray: 8 12;
  opacity: 0.72;
}

.dzendex-svg .dz-line {
  fill: none;
  stroke: #ffb8f2;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dzendex-svg .dz-line.thin {
  stroke-width: 2.5;
  opacity: 0.8;
}

.dzendex-svg .dz-line.branch {
  stroke: rgba(255, 79, 216, 0.82);
  stroke-width: 3;
}

.dzendex-svg .dz-node {
  fill: #ff4fd8;
  stroke: #ffdcfa;
  stroke-width: 3;
}

.character-card.is-fuchsia {
  border-color: rgba(255, 79, 216, 0.6);
  background:
    radial-gradient(circle at 74% 44%, rgba(255, 79, 216, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 79, 216, 0.08), transparent 52%),
    rgba(12, 6, 12, 0.94);
}

.character-card.is-fuchsia h2,
.character-card.is-fuchsia .character-index,
.character-card.is-fuchsia .character-meta dt,
.character-card.is-fuchsia .character-more svg,
.character-card.is-fuchsia .character-orbit span,
.character-card.is-fuchsia .character-photo-placeholder,
.character-card.is-fuchsia .character-panel-archetype-label {
  color: #ff4fd8;
}

.character-card.is-fuchsia .character-index,
.character-card.is-fuchsia .character-more,
.character-card.is-fuchsia .character-orbit {
  border-color: rgba(255, 79, 216, 0.7);
}

.character-card.is-fuchsia .character-orbit {
  background:
    radial-gradient(circle, rgba(255, 79, 216, 0.2) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(255, 79, 216, 0.18) 14px 15px),
    conic-gradient(from -12deg, rgba(255, 79, 216, 0.12), rgba(255, 79, 216, 0.4), rgba(255, 79, 216, 0.1), rgba(255, 79, 216, 0.32), rgba(255, 79, 216, 0.12));
  box-shadow: 0 0 26px rgba(255, 79, 216, 0.16), inset 0 0 32px rgba(255, 79, 216, 0.1);
}

.character-card.is-fuchsia .status-dot {
  background: #ff4fd8;
  box-shadow: 0 0 10px rgba(255, 79, 216, 0.76);
}

.character-card.is-purple {
  border-color: rgba(200, 167, 255, 0.62);
  background:
    radial-gradient(circle at 74% 44%, rgba(127, 53, 255, 0.18), transparent 34%),
    linear-gradient(128deg, rgba(235, 232, 245, 0.06), transparent 20%, rgba(127, 53, 255, 0.09) 54%, transparent 82%),
    rgba(10, 7, 13, 0.94);
}

.character-card.is-purple h2,
.character-card.is-purple .character-index,
.character-card.is-purple .character-meta dt,
.character-card.is-purple .character-more svg,
.character-card.is-purple .character-orbit span,
.character-card.is-purple .character-photo-placeholder,
.character-card.is-purple .character-panel-archetype-label {
  color: #c8a7ff;
}

.character-card.is-purple .character-index,
.character-card.is-purple .character-more,
.character-card.is-purple .character-orbit {
  border-color: rgba(200, 167, 255, 0.72);
}

.character-card.is-purple .character-orbit {
  background:
    radial-gradient(circle, rgba(235, 232, 245, 0.2) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(200, 167, 255, 0.17) 14px 15px),
    conic-gradient(from -12deg, rgba(200, 167, 255, 0.12), rgba(127, 53, 255, 0.42), rgba(235, 232, 245, 0.14), rgba(200, 167, 255, 0.34), rgba(127, 53, 255, 0.12));
  box-shadow: 0 0 26px rgba(200, 167, 255, 0.17), inset 0 0 32px rgba(127, 53, 255, 0.1);
}

.character-card.is-purple .status-dot {
  background: #c8a7ff;
  box-shadow: 0 0 10px rgba(200, 167, 255, 0.76);
}

.character-card.is-blue {
  border-color: rgba(117, 204, 255, 0.62);
  background:
    radial-gradient(circle at 74% 44%, rgba(11, 111, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(117, 204, 255, 0.08), transparent 52%),
    rgba(4, 9, 18, 0.94);
}

.character-card.is-blue h2,
.character-card.is-blue .character-index,
.character-card.is-blue .character-meta dt,
.character-card.is-blue .character-more svg,
.character-card.is-blue .character-orbit span,
.character-card.is-blue .character-photo-placeholder,
.character-card.is-blue .character-panel-archetype-label {
  color: #75ccff;
}

.character-card.is-blue .character-index,
.character-card.is-blue .character-more,
.character-card.is-blue .character-orbit {
  border-color: rgba(117, 204, 255, 0.72);
}

.character-card.is-blue .character-orbit {
  background:
    radial-gradient(circle, rgba(213, 241, 255, 0.2) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(117, 204, 255, 0.18) 14px 15px),
    conic-gradient(from -12deg, rgba(117, 204, 255, 0.12), rgba(11, 111, 255, 0.42), rgba(213, 241, 255, 0.14), rgba(117, 204, 255, 0.34), rgba(11, 111, 255, 0.12));
  box-shadow: 0 0 26px rgba(117, 204, 255, 0.17), inset 0 0 32px rgba(11, 111, 255, 0.1);
}

.character-card.is-blue .status-dot {
  background: #75ccff;
  box-shadow: 0 0 10px rgba(117, 204, 255, 0.76);
}

.character-card.is-flesh {
  border-color: rgba(255, 176, 120, 0.66);
  background:
    radial-gradient(circle at 74% 44%, rgba(255, 176, 120, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(255, 176, 120, 0.09), transparent 52%),
    rgba(16, 8, 5, 0.94);
}

.character-card.is-flesh h2,
.character-card.is-flesh .character-index,
.character-card.is-flesh .character-meta dt,
.character-card.is-flesh .character-more svg,
.character-card.is-flesh .character-orbit span,
.character-card.is-flesh .character-photo-placeholder,
.character-card.is-flesh .character-panel-archetype-label {
  color: #ffb078;
}

.character-card.is-flesh .character-index,
.character-card.is-flesh .character-more,
.character-card.is-flesh .character-orbit {
  border-color: rgba(255, 176, 120, 0.74);
}

.character-card.is-flesh .character-orbit {
  background:
    radial-gradient(circle, rgba(255, 214, 185, 0.22) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(255, 176, 120, 0.2) 14px 15px),
    conic-gradient(from -12deg, rgba(255, 176, 120, 0.12), rgba(212, 116, 53, 0.46), rgba(255, 214, 185, 0.15), rgba(255, 176, 120, 0.36), rgba(212, 116, 53, 0.13));
  box-shadow: 0 0 26px rgba(255, 176, 120, 0.18), inset 0 0 32px rgba(212, 116, 53, 0.12);
}

.character-card.is-flesh .character-orbit.has-image {
  background:
    radial-gradient(circle, rgba(255, 176, 120, 0.2), transparent 62%),
    conic-gradient(from -12deg, rgba(255, 176, 120, 0.16), rgba(212, 116, 53, 0.46), rgba(255, 214, 185, 0.14), rgba(255, 176, 120, 0.36), rgba(212, 116, 53, 0.16));
}

.character-card.is-flesh .status-dot {
  background: #ffb078;
  box-shadow: 0 0 10px rgba(255, 176, 120, 0.78);
}

.character-card.is-rose {
  border-color: rgba(255, 127, 183, 0.66);
  background:
    radial-gradient(circle at 74% 44%, rgba(255, 209, 102, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 127, 183, 0.1), transparent 52%),
    rgba(16, 7, 13, 0.94);
}

.character-card.is-rose h2,
.character-card.is-rose .character-index,
.character-card.is-rose .character-meta dt,
.character-card.is-rose .character-more svg,
.character-card.is-rose .character-orbit span,
.character-card.is-rose .character-photo-placeholder,
.character-card.is-rose .character-panel-archetype-label {
  color: #ffd166;
}

.character-card.is-rose .character-index,
.character-card.is-rose .character-more,
.character-card.is-rose .character-orbit {
  border-color: rgba(255, 209, 102, 0.74);
}

.character-card.is-rose .character-orbit {
  background:
    radial-gradient(circle, rgba(255, 248, 232, 0.22) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(255, 127, 183, 0.2) 14px 15px),
    conic-gradient(from -12deg, rgba(255, 127, 183, 0.14), rgba(255, 209, 102, 0.42), rgba(255, 248, 232, 0.15), rgba(255, 127, 183, 0.36), rgba(120, 28, 72, 0.16));
  box-shadow: 0 0 26px rgba(255, 127, 183, 0.18), inset 0 0 32px rgba(255, 209, 102, 0.1);
}

.character-card.is-rose .character-orbit.has-image {
  background:
    radial-gradient(circle, rgba(255, 209, 102, 0.16), transparent 62%),
    conic-gradient(from -12deg, rgba(255, 127, 183, 0.16), rgba(255, 209, 102, 0.42), rgba(255, 248, 232, 0.13), rgba(255, 127, 183, 0.36), rgba(120, 28, 72, 0.16));
}

.character-card.is-rose .status-dot {
  background: #ffd166;
  box-shadow: 0 0 10px rgba(255, 127, 183, 0.78);
}

.character-card.is-crimson {
  border-color: rgba(255, 59, 47, 0.68);
  background:
    radial-gradient(circle at 74% 44%, rgba(255, 212, 71, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 59, 47, 0.11), transparent 52%),
    rgba(17, 6, 4, 0.94);
}

.character-card.is-crimson h2,
.character-card.is-crimson .character-index,
.character-card.is-crimson .character-meta dt,
.character-card.is-crimson .character-more svg,
.character-card.is-crimson .character-orbit span,
.character-card.is-crimson .character-photo-placeholder,
.character-card.is-crimson .character-panel-archetype-label {
  color: #ffd447;
}

.character-card.is-crimson .character-index,
.character-card.is-crimson .character-more,
.character-card.is-crimson .character-orbit {
  border-color: rgba(255, 212, 71, 0.76);
}

.character-card.is-crimson .character-orbit {
  background:
    radial-gradient(circle, rgba(255, 245, 197, 0.23) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(255, 59, 47, 0.22) 14px 15px),
    conic-gradient(from -12deg, rgba(255, 59, 47, 0.16), rgba(255, 212, 71, 0.42), rgba(255, 245, 197, 0.14), rgba(255, 59, 47, 0.38), rgba(105, 13, 10, 0.18));
  box-shadow: 0 0 26px rgba(255, 59, 47, 0.2), inset 0 0 32px rgba(255, 212, 71, 0.1);
}

.character-card.is-crimson .character-orbit.has-image {
  background:
    radial-gradient(circle, rgba(255, 212, 71, 0.18), transparent 62%),
    conic-gradient(from -12deg, rgba(255, 59, 47, 0.18), rgba(255, 212, 71, 0.42), rgba(255, 245, 197, 0.13), rgba(255, 59, 47, 0.38), rgba(105, 13, 10, 0.18));
}

.character-card.is-crimson .status-dot {
  background: #ffd447;
  box-shadow: 0 0 10px rgba(255, 59, 47, 0.8);
}

.theme-mono-exchange {
  --acid: #ffffff;
  --acid-2: #f3f3f3;
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.48);
  --panel: rgba(9, 9, 9, 0.94);
  --panel-soft: rgba(18, 18, 18, 0.82);
  --muted: #8f8f8f;
  --text: #f4f4f4;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.1), transparent 36%),
    #030303;
}

.theme-mono-exchange .main-nav a.active,
.theme-mono-exchange .main-nav a:hover,
.theme-mono-exchange .panel h2,
.theme-mono-exchange .hero-card h2 {
  color: #fff;
}

.theme-mono-exchange .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.9);
}

.theme-mono-exchange .primary-action {
  color: #050505;
  background: #f3f3f3;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
}

.theme-mono-exchange .panel,
.theme-mono-exchange .hero-card {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 45%),
    rgba(8, 8, 8, 0.95);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.025), 0 18px 42px rgba(0, 0, 0, 0.32);
}

.theme-mono-exchange .panel::before,
.theme-mono-exchange .hero-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-mono-exchange .menu-list li.selected,
.theme-mono-exchange .tab.active,
.theme-mono-exchange .registry-filter.is-active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
}

.theme-mono-exchange .menu-list svg,
.theme-mono-exchange .feature-list svg,
.theme-mono-exchange .outline-action svg,
.theme-mono-exchange .panel-title-row svg,
.theme-mono-exchange .social-list svg,
.theme-mono-exchange .stat-list svg {
  color: #fff;
}

.theme-mono-exchange .outline-action {
  border-color: rgba(255, 255, 255, 0.38);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.theme-mono-exchange .outline-action:hover {
  color: #050505;
  background: #f3f3f3;
}

.theme-mono-exchange .coin,
.theme-mono-exchange .owner-logo {
  color: #030303;
  border-color: #d9d9d9;
  background:
    radial-gradient(circle at 35% 30%, #fff, transparent 22%),
    repeating-conic-gradient(from 0deg, #f7f7f7 0deg 10deg, #8d8d8d 10deg 18deg),
    radial-gradient(circle, #e6e6e6, #5b5b5b 68%);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
}

.exchange-layout {
  grid-template-columns: 275px minmax(0, 1fr) 315px;
}

.exchange-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.exchange-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 600px);
  gap: 16px;
  align-items: end;
}

.exchange-hero .breadcrumb {
  padding: 0;
}

.exchange-hero h1 {
  margin: 16px 0 10px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.92;
  text-transform: uppercase;
}

.exchange-hero p {
  max-width: 780px;
  margin: 0;
  color: #d7d7d7;
  font-size: 14px;
  line-height: 1.7;
}

.exchange-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.exchange-stats article {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.86);
}

.exchange-stats span,
.exchange-token-copy p,
.exchange-token-copy dt,
.exchange-table .head,
.trade-feed span {
  color: #9b9b9b;
  font-size: 11px;
  text-transform: uppercase;
}

.exchange-stats strong {
  display: block;
  margin-top: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.exchange-stats em,
.positive {
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.negative {
  color: #a7a7a7;
  font-weight: 900;
}

.exchange-token-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.exchange-token-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 42%) minmax(0, 1fr);
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.12), transparent 34%),
    rgba(8, 8, 8, 0.92);
  overflow: hidden;
}

.exchange-token-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(255, 255, 255, 0.035) 16px 17px),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04));
}

.exchange-token-card > * {
  position: relative;
}

.exchange-token-portrait {
  position: relative;
  min-height: 360px;
  background: #050505;
  overflow: hidden;
}

.exchange-token-portrait img,
.exchange-token-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.exchange-token-portrait img {
  object-fit: cover;
  object-position: center top;
  filter: none;
}

.exchange-token-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.22), transparent 23%),
    linear-gradient(145deg, #292929, #050505);
}

.exchange-token-placeholder span {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 58px;
}

.exchange-token-portrait input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.exchange-token-portrait label,
.exchange-token-portrait button {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-token-portrait label {
  bottom: 52px;
}

.exchange-token-portrait button {
  bottom: 12px;
}

.exchange-token-portrait label:hover,
.exchange-token-portrait button:hover,
.exchange-token-portrait label:focus-visible,
.exchange-token-portrait button:focus-visible {
  color: #050505;
  background: #fff;
  outline: none;
}

.exchange-token-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 16px 16px;
}

.exchange-token-copy h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 34px;
  line-height: 0.95;
  text-transform: uppercase;
}

.token-symbol {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.token-coin {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.token-coin > span,
.token-coin img {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.token-coin > span {
  font-family: var(--font-sans);
  font-size: 24px;
}

.token-coin img {
  display: block;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.token-symbol-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.token-symbol strong {
  font-size: 18px;
  letter-spacing: 0;
}

.token-coin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.token-coin-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.token-coin-actions label,
.token-coin-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.token-coin-actions label {
  cursor: pointer;
}

.token-coin-actions label:hover,
.token-coin-actions button:hover,
.token-coin-actions label:focus-visible,
.token-coin-actions button:focus-visible {
  color: #050505;
  background: #fff;
  outline: none;
}

.exchange-token-copy dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.exchange-token-copy dd {
  margin: 3px 0 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.sparkline,
.mini-chart {
  display: block;
  height: 42px;
  background:
    linear-gradient(135deg, transparent 8%, #fff 9% 11%, transparent 12% 20%, #fff 21% 23%, transparent 24% 38%, #fff 39% 41%, transparent 42% 55%, #fff 56% 58%, transparent 59%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.1), transparent);
  clip-path: polygon(0 76%, 10% 58%, 18% 66%, 29% 44%, 38% 58%, 48% 36%, 60% 42%, 72% 18%, 82% 32%, 92% 12%, 100% 22%, 100% 100%, 0 100%);
  opacity: 0.92;
}

.sparkline.alt,
.mini-chart.alt {
  clip-path: polygon(0 82%, 9% 62%, 21% 70%, 31% 51%, 43% 42%, 56% 48%, 66% 27%, 78% 34%, 89% 16%, 100% 28%, 100% 100%, 0 100%);
}

.sparkline.short,
.mini-chart.short {
  clip-path: polygon(0 70%, 13% 64%, 23% 50%, 35% 60%, 45% 42%, 55% 46%, 65% 31%, 77% 39%, 88% 26%, 100% 35%, 100% 100%, 0 100%);
}

.exchange-table-panel {
  padding: 0;
}

.exchange-table-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.exchange-table-tabs button {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: #9b9b9b;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-table-tabs button.is-active {
  color: #050505;
  background: #fff;
}

.exchange-table {
  display: grid;
  padding: 8px 16px 16px;
}

.exchange-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr 1fr 1.1fr;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8e8e8;
  font-size: 13px;
}

.exchange-row.head {
  min-height: 42px;
  color: #929292;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-row strong {
  color: #fff;
  font-size: 14px;
}

.exchange-row em {
  display: block;
  margin-top: 3px;
  color: #858585;
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
}

.mini-chart {
  height: 28px;
}

.exchange-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.exchange-info-grid .panel {
  padding: 18px;
}

.exchange-info-grid span {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
}

.exchange-info-grid h3 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
}

.exchange-info-grid p {
  margin: 0;
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1.6;
}

.exchange-right .panel {
  padding: 18px;
}

.market-ring {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 18px auto;
  border: 16px solid rgba(255, 255, 255, 0.16);
  border-top-color: #fff;
  border-right-color: #d4d4d4;
  border-radius: 50%;
  text-align: center;
}

.market-ring strong {
  color: #fff;
  font-size: 42px;
  line-height: 1;
}

.market-ring span {
  display: block;
  margin-top: 4px;
  color: #bdbdbd;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-state dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.market-state div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.market-state dt {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
}

.market-state dd {
  margin: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.trade-feed ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.trade-feed li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-feed strong {
  color: #fff;
  font-size: 13px;
}

.trade-feed em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.exchange-cube {
  height: 120px;
  margin: 18px 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(30deg, transparent 40%, rgba(255, 255, 255, 0.18) 41% 43%, transparent 44%),
    linear-gradient(150deg, transparent 40%, rgba(255, 255, 255, 0.14) 41% 43%, transparent 44%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.09) 18px 19px),
    #070707;
}

@media (max-width: 1500px) {
  .exchange-token-card {
    grid-template-columns: 1fr;
  }

  .exchange-token-portrait {
    min-height: 430px;
  }
}

@media (max-width: 1220px) {
  .exchange-layout,
  .exchange-hero,
  .exchange-token-grid,
  .exchange-info-grid {
    grid-template-columns: 1fr;
  }

  .exchange-row {
    grid-template-columns: 1.2fr repeat(2, 0.8fr);
  }

  .exchange-row span:nth-child(4),
  .exchange-row span:nth-child(5),
  .exchange-row .mini-chart {
    display: none;
  }
}

/* Exchange premium refresh: Huly-inspired monochrome layer. */
.theme-mono-exchange.exchange-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px) 0 0 / 86px 86px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 86px 86px,
    linear-gradient(180deg, #111 0%, #050505 40%, #010101 100%);
}

/* Ширину не сужаем: страница использует общий .page-shell (min(1920px, 100%)),
   иначе биржа была уже остальных вкладок на ~140px. */

.theme-mono-exchange.exchange-page .topbar {
  min-height: 74px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(4, 4, 4, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44);
}

.theme-mono-exchange.exchange-page .main-nav a.active,
.theme-mono-exchange.exchange-page .main-nav a:hover {
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.28);
}

.theme-mono-exchange .exchange-layout {
  grid-template-columns: 275px minmax(0, 1fr) 305px;
  gap: 14px;
  padding: 14px 20px 58px;
}

.theme-mono-exchange .left-rail .panel,
.theme-mono-exchange .right-rail .panel,
.theme-mono-exchange .exchange-table-panel,
.theme-mono-exchange .exchange-info-grid .panel {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.012) 48%, rgba(255, 255, 255, 0.035)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 18px),
    rgba(8, 8, 8, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.34);
}

.theme-mono-exchange .left-rail .panel::before,
.theme-mono-exchange .right-rail .panel::before,
.theme-mono-exchange .exchange-table-panel::before,
.theme-mono-exchange .exchange-info-grid .panel::before {
  opacity: 0.22;
}

.theme-mono-exchange .exchange-content {
  gap: 14px;
}

.theme-mono-exchange .exchange-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  align-items: stretch;
  min-height: 236px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 26%, rgba(255, 255, 255, 0.08) 26.2% 26.6%, transparent 26.8%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018) 54%, rgba(255, 255, 255, 0.05)),
    repeating-linear-gradient(90deg, transparent 0 54px, rgba(255, 255, 255, 0.045) 54px 55px),
    #060606;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 24px 70px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.theme-mono-exchange .exchange-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, #fff 0 28px, transparent 28px 52px);
  opacity: 0.16;
  pointer-events: none;
}

.theme-mono-exchange .exchange-hero::after {
  content: "ALTG";
  position: absolute;
  right: 22px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.045);
  font-family: var(--font-sans);
  font-size: 132px;
  line-height: 0.78;
  text-transform: uppercase;
  pointer-events: none;
}

.theme-mono-exchange .exchange-hero > * {
  position: relative;
  z-index: 1;
}

.theme-mono-exchange .exchange-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.theme-mono-exchange .exchange-hero h1 {
  max-width: 820px;
  margin: 14px 0 10px;
  color: #fff;
  font-size: 86px;
  line-height: 0.86;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 #6c6c6c,
    0 20px 42px rgba(255, 255, 255, 0.08);
}

.theme-mono-exchange .exchange-hero p:not(.breadcrumb) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.75;
}

.theme-mono-exchange .exchange-stats {
  align-content: stretch;
  grid-template-columns: 1fr;
  gap: 10px;
}

.theme-mono-exchange .exchange-stats article {
  display: grid;
  align-content: center;
  min-height: 0;
  padding: 16px 18px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.018) 48%),
    #090909;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.theme-mono-exchange .exchange-stats strong {
  margin-top: 8px;
  font-size: 26px;
}

.theme-mono-exchange .exchange-token-grid {
  gap: 14px;
}

.theme-mono-exchange .exchange-token-card {
  display: grid;
  grid-template-columns: minmax(210px, 44%) minmax(0, 1fr);
  min-height: 420px;
  padding: 10px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.016) 42%, rgba(255, 255, 255, 0.055)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 20px),
    #070707;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 18px 42px rgba(0, 0, 0, 0.38);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.theme-mono-exchange .exchange-token-card:hover {
  border-color: rgba(255, 255, 255, 0.44);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 28px 62px rgba(0, 0, 0, 0.52);
}

.theme-mono-exchange .exchange-token-card::before {
  background:
    linear-gradient(115deg, transparent 0 16%, rgba(255, 255, 255, 0.12) 16.3% 16.8%, transparent 17.1% 100%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, 0.032) 34px 35px);
  opacity: 0.55;
}

.theme-mono-exchange .exchange-token-portrait {
  min-height: 400px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.11), transparent 35%),
    #030303;
}

.theme-mono-exchange .exchange-token-portrait img {
  filter: none;
}

.theme-mono-exchange .exchange-token-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.17), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, #252525, #050505);
}

.theme-mono-exchange .exchange-token-placeholder span {
  width: 116px;
  height: 116px;
  border-color: rgba(255, 255, 255, 0.82);
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.06),
    0 0 34px rgba(255, 255, 255, 0.14);
  font-size: 68px;
}

.theme-mono-exchange .exchange-token-placeholder.exo-token {
  background:
    radial-gradient(circle at 60% 28%, rgba(124, 204, 255, 0.32), transparent 28%),
    linear-gradient(140deg, rgba(54, 126, 210, 0.32), transparent 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, #0d1c2b, #04080d);
}

.theme-mono-exchange .exchange-token-placeholder.exo-token span {
  border-color: rgba(124, 204, 255, 0.86);
  color: #d9f2ff;
  box-shadow:
    inset 0 0 28px rgba(124, 204, 255, 0.12),
    0 0 38px rgba(67, 159, 255, 0.24);
}

.theme-mono-exchange .exchange-token-placeholder.kalisa-token {
  background:
    radial-gradient(circle at 62% 24%, rgba(255, 209, 102, 0.22), transparent 26%),
    linear-gradient(140deg, rgba(255, 127, 183, 0.22), transparent 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, #2a1821, #050304);
}

.theme-mono-exchange .exchange-token-placeholder.kalisa-token span {
  border-color: rgba(255, 209, 102, 0.84);
  color: #fff4d4;
  box-shadow:
    inset 0 0 28px rgba(255, 209, 102, 0.1),
    0 0 38px rgba(255, 127, 183, 0.2);
}

.theme-mono-exchange .exchange-token-placeholder.cccp-token {
  background:
    radial-gradient(circle at 60% 25%, rgba(255, 212, 71, 0.24), transparent 26%),
    linear-gradient(140deg, rgba(255, 59, 47, 0.24), transparent 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, #2b100d, #050303);
}

.theme-mono-exchange .exchange-token-placeholder.cccp-token span {
  border-color: rgba(255, 212, 71, 0.86);
  color: #fff1ad;
  box-shadow:
    inset 0 0 28px rgba(255, 212, 71, 0.1),
    0 0 38px rgba(255, 59, 47, 0.24);
}

.theme-mono-exchange .exchange-token-portrait label,
.theme-mono-exchange .exchange-token-portrait button {
  left: 14px;
  right: 14px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.54);
  border-radius: 5px;
  color: #050505;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

.theme-mono-exchange .exchange-token-portrait button {
  color: #fff;
  background: rgba(0, 0, 0, 0.76);
}

.theme-mono-exchange .exchange-token-portrait label:hover,
.theme-mono-exchange .exchange-token-portrait label:focus-visible {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 16px 32px rgba(0, 0, 0, 0.42);
}

.theme-mono-exchange .exchange-token-copy {
  align-content: stretch;
  gap: 14px;
  padding: 16px 14px 10px 20px;
}

.theme-mono-exchange .exchange-token-copy p {
  color: rgba(255, 255, 255, 0.58);
}

.theme-mono-exchange .exchange-token-copy h2 {
  font-size: 40px;
  line-height: 0.92;
  text-shadow: 0 16px 34px rgba(255, 255, 255, 0.08);
}

.theme-mono-exchange .token-coin,
.theme-mono-exchange .token-coin > span,
.theme-mono-exchange .token-coin img {
  width: 50px;
  height: 50px;
}

.theme-mono-exchange .token-coin > span,
.theme-mono-exchange .token-coin img {
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    #0a0a0a;
}

.theme-mono-exchange .token-coin > span {
  font-size: 28px;
}

.theme-mono-exchange .token-coin img {
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.08),
    0 0 24px rgba(255, 255, 255, 0.12);
}

.theme-mono-exchange .token-coin-actions label,
.theme-mono-exchange .token-coin-actions button {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.06);
}

.theme-mono-exchange .exchange-token-copy dl {
  gap: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.theme-mono-exchange .exchange-token-copy dl div {
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.theme-mono-exchange .exchange-token-copy dl div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.theme-mono-exchange .sparkline,
.theme-mono-exchange .mini-chart {
  height: 50px;
  border-radius: 3px;
  background:
    linear-gradient(135deg, transparent 8%, #fff 9% 11%, transparent 12% 20%, #fff 21% 23%, transparent 24% 38%, #fff 39% 41%, transparent 42% 55%, #fff 56% 58%, transparent 59%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 72%),
    rgba(255, 255, 255, 0.04);
}

.theme-mono-exchange .exchange-token-copy .outline-action {
  align-self: end;
  min-height: 46px;
  color: #050505;
  border-color: rgba(255, 255, 255, 0.92);
  background: #f2f2f2;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.36);
}

.theme-mono-exchange .exchange-table-panel {
  overflow: hidden;
}

.theme-mono-exchange .exchange-table-tabs {
  min-height: 58px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(0, 0, 0, 0.32);
}

.theme-mono-exchange .exchange-table-tabs button {
  min-height: 58px;
  min-width: 170px;
}

.theme-mono-exchange .exchange-table-tabs button.is-active {
  color: #030303;
  background: #fff;
}

.theme-mono-exchange .exchange-table {
  gap: 3px;
  padding: 12px;
}

.theme-mono-exchange .exchange-row {
  min-height: 64px;
  padding: 0 12px;
  border-bottom: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.026);
}

.theme-mono-exchange .exchange-row.head {
  min-height: 44px;
  background: transparent;
}

.theme-mono-exchange .exchange-row:not(.head):hover {
  background: rgba(255, 255, 255, 0.065);
}

.theme-mono-exchange .exchange-empty {
  display: grid;
  min-height: 74px;
  place-items: center;
  margin-top: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.024);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-mono-exchange .exchange-empty[hidden] {
  display: none;
}

.theme-mono-exchange .exchange-info-grid {
  gap: 14px;
}

.theme-mono-exchange .exchange-info-grid .panel {
  min-height: 138px;
  padding: 20px;
}

.theme-mono-exchange .exchange-info-grid span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
}

.theme-mono-exchange .market-ring {
  width: 150px;
  height: 150px;
  border-width: 18px;
  border-top-color: #fff;
  border-right-color: #f4f4f4;
  border-bottom-color: rgba(255, 255, 255, 0.26);
  border-left-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.04),
    0 0 30px rgba(255, 255, 255, 0.08);
}

.theme-mono-exchange .market-ring strong {
  font-size: 48px;
}

.theme-mono-exchange .market-state {
  display: grid;
  gap: 16px;
}

.market-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.market-head h2 {
  margin-bottom: 6px;
}

.market-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.market-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(51, 245, 107, 0.44);
  border-radius: 999px;
  color: #33f56b;
  background: rgba(51, 245, 107, 0.08);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-head > span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.market-overview {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.theme-mono-exchange .market-overview .market-ring {
  margin: 0;
}

.market-summary {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.03);
}

.market-summary span,
.market-bars span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.market-summary strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
  text-transform: uppercase;
}

.market-summary em {
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.market-state .market-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-state .market-metrics div {
  display: grid;
  gap: 6px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.market-state .market-metrics dt,
.market-state .market-metrics dd {
  display: block;
}

.market-state .market-metrics dd {
  font-size: 15px;
}

.market-bars {
  display: grid;
  gap: 10px;
}

.market-bars div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
}

.market-bars strong {
  color: #fff;
  font-size: 12px;
}

.market-bars i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86) var(--value), rgba(255, 255, 255, 0.1) var(--value)),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.theme-mono-exchange .exchange-news {
  display: grid;
  gap: 14px;
}

.exchange-news-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.exchange-news-head span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-news-head strong {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
}

.exchange-news-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(255, 255, 255, 0.08) 26px 27px),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(255, 255, 255, 0.045) 26px 27px),
    rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.exchange-news-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exchange-news-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  text-transform: uppercase;
}

.exchange-news-placeholder span {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.exchange-news-placeholder small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 900;
}

.exchange-news-media input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.exchange-news-tools {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.exchange-news-tools label,
.exchange-news-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 5px;
  color: #050505;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-news-tools button {
  min-width: 74px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.exchange-news-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-news h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.08;
  text-transform: uppercase;
}

.exchange-news > p:not(.exchange-news-kicker) {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.65;
}

.exchange-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exchange-news-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-cta .exchange-cta-media {
  min-height: 138px;
  margin: 4px 0 2px;
}

.exchange-cta .exchange-news-placeholder span {
  font-size: 14px;
}

.theme-mono-exchange .trade-feed li {
  min-height: 48px;
  padding: 8px 0 12px;
}

.theme-mono-exchange .exchange-cube {
  height: 150px;
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(30deg, transparent 40%, rgba(255, 255, 255, 0.22) 41% 42%, transparent 43%),
    linear-gradient(150deg, transparent 40%, rgba(255, 255, 255, 0.16) 41% 42%, transparent 43%),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(255, 255, 255, 0.1) 26px 27px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent),
    #070707;
}

@media (min-width: 1501px) {
  .theme-mono-exchange .exchange-token-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1580px) {
  .theme-mono-exchange .exchange-hero {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .theme-mono-exchange .exchange-hero h1 {
    font-size: 72px;
  }

  .theme-mono-exchange .exchange-stats article {
    padding: 14px;
  }

  .theme-mono-exchange .exchange-stats strong {
    font-size: 22px;
  }
}

@media (max-width: 1500px) {
  .theme-mono-exchange .exchange-token-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .theme-mono-exchange .exchange-token-portrait {
    min-height: 470px;
  }

  .theme-mono-exchange .exchange-token-copy {
    padding: 18px 14px 10px;
  }
}

@media (max-width: 1320px) {
  .theme-mono-exchange .exchange-layout {
    grid-template-columns: 255px minmax(0, 1fr);
  }

  .theme-mono-exchange .exchange-right {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1220px) {
  .theme-mono-exchange .exchange-layout,
  .theme-mono-exchange .exchange-hero,
  .theme-mono-exchange .exchange-token-grid,
  .theme-mono-exchange .exchange-info-grid {
    grid-template-columns: 1fr;
  }

  .theme-mono-exchange .exchange-right {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .theme-mono-exchange .exchange-hero h1 {
    font-size: 64px;
  }
}

@media (max-width: 760px) {
  .theme-mono-exchange .exchange-layout {
    padding: 10px;
  }

  .theme-mono-exchange .exchange-hero {
    padding: 18px;
  }

  .theme-mono-exchange .exchange-hero h1 {
    font-size: 42px;
  }

  .theme-mono-exchange .exchange-token-portrait {
    min-height: 390px;
  }

  .theme-mono-exchange .exchange-table-tabs {
    overflow-x: auto;
  }
}

/* Exchange token cards: larger portrait-first layout. */
.theme-mono-exchange .exchange-token-grid {
  align-items: stretch;
}

.theme-mono-exchange .exchange-token-card {
  grid-template-columns: 1fr;
  align-content: start;
  min-height: 0;
  padding: 12px;
}

.theme-mono-exchange .exchange-token-card::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 34%),
    linear-gradient(215deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 18px);
  opacity: 0.72;
}

.theme-mono-exchange .exchange-token-portrait {
  min-height: 520px;
  aspect-ratio: 9 / 14;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.48),
    0 18px 36px rgba(0, 0, 0, 0.42);
}

.theme-mono-exchange .exchange-token-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.theme-mono-exchange .exchange-token-portrait label,
.theme-mono-exchange .exchange-token-portrait button {
  left: auto;
  right: 14px;
  z-index: 3;
  width: 176px;
  min-height: 36px;
}

.theme-mono-exchange .exchange-token-portrait label {
  top: 14px;
  bottom: auto;
}

.theme-mono-exchange .exchange-token-portrait button {
  top: 58px;
  bottom: auto;
}

.theme-mono-exchange .exchange-token-copy {
  z-index: 2;
  margin-top: -92px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.032)),
    rgba(5, 5, 5, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 -18px 46px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.theme-mono-exchange .exchange-token-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.theme-mono-exchange .exchange-token-copy h2 {
  font-size: 38px;
  line-height: 0.9;
}

.theme-mono-exchange .token-symbol {
  padding: 10px 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.theme-mono-exchange .exchange-token-copy dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  border: 0;
  background: transparent;
}

.theme-mono-exchange .exchange-token-copy dl div {
  min-height: 64px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-mono-exchange .exchange-token-copy dl div:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-mono-exchange .exchange-token-copy dd {
  font-size: 16px;
  line-height: 1.18;
}

.theme-mono-exchange .sparkline {
  height: 38px;
  opacity: 0.78;
}

.theme-mono-exchange .exchange-token-copy .outline-action {
  margin-top: 0;
  min-height: 48px;
}

@media (max-width: 1500px) {
  .theme-mono-exchange .exchange-token-portrait {
    min-height: 500px;
  }

  .theme-mono-exchange .exchange-token-copy h2 {
    font-size: 34px;
  }
}

@media (max-width: 760px) {
  .theme-mono-exchange .exchange-token-portrait {
    min-height: 430px;
  }

  .theme-mono-exchange .exchange-token-portrait label,
  .theme-mono-exchange .exchange-token-portrait button {
    left: 14px;
    right: 14px;
    width: auto;
  }

  .theme-mono-exchange .exchange-token-copy {
    margin-top: -74px;
    padding: 14px;
  }
}

/* Exchange token carousel: one horizontal lane instead of card rows. */
.exchange-token-carousel {
  position: relative;
}

.theme-mono-exchange .exchange-token-carousel {
  display: grid;
  padding: 0 52px;
}

.theme-mono-exchange .exchange-token-carousel::before,
.theme-mono-exchange .exchange-token-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 18px;
  z-index: 2;
  width: 46px;
  pointer-events: none;
}

.theme-mono-exchange .exchange-token-carousel::before {
  left: 52px;
  background: linear-gradient(90deg, #050505, transparent);
}

.theme-mono-exchange .exchange-token-carousel::after {
  right: 52px;
  background: linear-gradient(270deg, #050505, transparent);
}

.theme-mono-exchange .exchange-token-carousel .exchange-token-grid {
  display: flex;
  grid-template-columns: none;
  gap: 14px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 18px;
  scroll-behavior: smooth;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(255, 255, 255, 0.42) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.theme-mono-exchange .exchange-token-carousel .exchange-token-grid:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

.theme-mono-exchange .exchange-token-carousel .exchange-token-grid::-webkit-scrollbar {
  height: 8px;
}

.theme-mono-exchange .exchange-token-carousel .exchange-token-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.theme-mono-exchange .exchange-token-carousel .exchange-token-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.theme-mono-exchange .exchange-token-carousel .exchange-token-card {
  flex: 0 0 clamp(300px, calc((100% - 28px) / 3), 390px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.token-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 82px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: #050505;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(210, 210, 210, 0.92)),
    #fff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.token-carousel-button.prev {
  left: 0;
}

.token-carousel-button.next {
  right: 0;
}

.token-carousel-button:hover,
.token-carousel-button:focus-visible {
  border-color: #fff;
  outline: none;
  transform: translateY(-50%) scale(1.04);
}

.token-carousel-button:disabled {
  cursor: default;
  opacity: 0.28;
  transform: translateY(-50%);
}

@media (max-width: 1500px) {
  .theme-mono-exchange .exchange-token-carousel .exchange-token-card {
    flex-basis: clamp(292px, calc((100% - 14px) / 2), 370px);
  }
}

@media (max-width: 760px) {
  .theme-mono-exchange .exchange-token-carousel {
    padding: 0 0 48px;
  }

  .theme-mono-exchange .exchange-token-carousel::before,
  .theme-mono-exchange .exchange-token-carousel::after {
    display: none;
  }

  .theme-mono-exchange .exchange-token-carousel .exchange-token-card {
    flex-basis: min(86vw, 340px);
  }

  .token-carousel-button {
    top: auto;
    bottom: 0;
    width: calc(50% - 5px);
    height: 38px;
    font-size: 24px;
    transform: none;
  }

  .token-carousel-button.prev {
    left: 0;
  }

  .token-carousel-button.next {
    right: 0;
  }

  .token-carousel-button:hover,
  .token-carousel-button:focus-visible,
  .token-carousel-button:disabled {
    transform: none;
  }
}

/* Exchange charts: refined sparklines for cards and table rows. */
.theme-mono-exchange .sparkline,
.theme-mono-exchange .mini-chart {
  --chart-dot: 92% 16%;
  --chart-area: polygon(0 78%, 9% 64%, 18% 68%, 29% 48%, 39% 56%, 50% 38%, 61% 43%, 72% 22%, 84% 30%, 93% 12%, 100% 18%, 100% 100%, 0 100%);
  --chart-line: polygon(0 75%, 9% 61%, 18% 65%, 29% 45%, 39% 53%, 50% 35%, 61% 40%, 72% 19%, 84% 27%, 93% 9%, 100% 15%, 100% 24%, 93% 18%, 84% 36%, 72% 28%, 61% 49%, 50% 44%, 39% 62%, 29% 54%, 18% 74%, 9% 70%, 0 84%);
  position: relative;
  display: block;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    radial-gradient(circle at var(--chart-dot), rgba(255, 255, 255, 0.96) 0 2px, rgba(255, 255, 255, 0.24) 3px, transparent 5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px),
    rgba(255, 255, 255, 0.025);
  clip-path: none;
  opacity: 1;
  overflow: hidden;
}

.theme-mono-exchange .sparkline::before,
.theme-mono-exchange .mini-chart::before,
.theme-mono-exchange .sparkline::after,
.theme-mono-exchange .mini-chart::after {
  content: "";
  position: absolute;
  inset: 6px 8px;
  pointer-events: none;
}

.theme-mono-exchange .sparkline::before,
.theme-mono-exchange .mini-chart::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.025));
  clip-path: var(--chart-area);
}

.theme-mono-exchange .sparkline::after,
.theme-mono-exchange .mini-chart::after {
  background: linear-gradient(90deg, rgba(220, 220, 220, 0.88), #fff 55%, rgba(255, 255, 255, 0.92));
  clip-path: var(--chart-line);
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.22));
}

.theme-mono-exchange .sparkline.alt,
.theme-mono-exchange .mini-chart.alt {
  --chart-dot: 90% 24%;
  --chart-area: polygon(0 82%, 10% 62%, 20% 69%, 32% 52%, 44% 42%, 56% 48%, 67% 28%, 78% 34%, 90% 18%, 100% 27%, 100% 100%, 0 100%);
  --chart-line: polygon(0 79%, 10% 59%, 20% 66%, 32% 49%, 44% 39%, 56% 45%, 67% 25%, 78% 31%, 90% 15%, 100% 24%, 100% 33%, 90% 24%, 78% 40%, 67% 34%, 56% 54%, 44% 48%, 32% 58%, 20% 75%, 10% 68%, 0 88%);
}

.theme-mono-exchange .sparkline.short,
.theme-mono-exchange .mini-chart.short {
  --chart-dot: 88% 28%;
  --chart-area: polygon(0 72%, 12% 66%, 24% 50%, 36% 60%, 46% 43%, 56% 48%, 66% 32%, 78% 40%, 89% 26%, 100% 36%, 100% 100%, 0 100%);
  --chart-line: polygon(0 69%, 12% 63%, 24% 47%, 36% 57%, 46% 40%, 56% 45%, 66% 29%, 78% 37%, 89% 23%, 100% 33%, 100% 42%, 89% 32%, 78% 46%, 66% 38%, 56% 54%, 46% 49%, 36% 66%, 24% 56%, 12% 72%, 0 78%);
}

.theme-mono-exchange .sparkline.exo-line,
.theme-mono-exchange .mini-chart.exo-line {
  --chart-dot: 86% 18%;
  --chart-area: polygon(0 84%, 12% 72%, 23% 58%, 34% 64%, 44% 44%, 56% 50%, 66% 32%, 77% 37%, 88% 20%, 100% 25%, 100% 100%, 0 100%);
  --chart-line: polygon(0 81%, 12% 69%, 23% 55%, 34% 61%, 44% 41%, 56% 47%, 66% 29%, 77% 34%, 88% 17%, 100% 22%, 100% 31%, 88% 26%, 77% 43%, 66% 38%, 56% 56%, 44% 50%, 34% 70%, 23% 64%, 12% 78%, 0 90%);
}

.theme-mono-exchange .mini-chart {
  width: min(180px, 100%);
  height: 38px;
}

.theme-mono-exchange .sparkline {
  height: 50px;
}

.theme-mono-exchange [data-live-number="true"] {
  transition: color 220ms ease, text-shadow 220ms ease, opacity 220ms ease;
}

.theme-mono-exchange [data-live-number="true"].is-live-updating {
  opacity: 0.94;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.42);
}

.theme-mono-exchange .positive,
.theme-mono-exchange [data-live-trend="positive"] {
  color: #33f56b;
}

.theme-mono-exchange .negative,
.theme-mono-exchange [data-live-trend="negative"] {
  color: #ff4d4d;
}

.theme-mono-exchange [data-live-trend="positive"].is-live-updating {
  text-shadow: 0 0 14px rgba(51, 245, 107, 0.44);
}

.theme-mono-exchange [data-live-trend="negative"].is-live-updating {
  text-shadow: 0 0 14px rgba(255, 77, 77, 0.42);
}

@media (max-width: 1500px) {
  .theme-mono-exchange .mini-chart {
    min-width: 120px;
  }
}

.agents-content {
  grid-template-rows: auto auto auto;
}

.agents-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 22px;
  min-height: 170px;
  padding: 22px;
}

.agents-hero h1 {
  margin: 14px 0 12px;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
}

.agents-hero p {
  max-width: 780px;
  margin: 0;
  color: #e2d9e0;
  font-size: 14px;
  line-height: 1.75;
}

.agents-hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 1px solid rgba(255, 79, 216, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 50%, rgba(255, 79, 216, 0.2), transparent 30%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 79, 216, 0.15) 18px 19px),
    rgba(12, 6, 12, 0.52);
  overflow: hidden;
}

.agents-hero-mark > span {
  position: absolute;
  right: 20px;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(42px, 5vw, 80px);
  line-height: 1;
  opacity: 0.95;
  text-transform: uppercase;
}

.agents-skull {
  position: absolute;
  left: 34px;
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 79, 216, 0.5);
  border-radius: 50%;
  color: rgba(255, 79, 216, 0.7);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 4px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-agent-card {
  position: relative;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 20px;
  min-height: 292px;
  padding: 22px 18px 16px;
  border: 1px solid rgba(255, 79, 216, 0.46);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 42%, rgba(255, 79, 216, 0.15), transparent 28%),
    linear-gradient(145deg, rgba(255, 79, 216, 0.07), transparent 54%),
    rgba(8, 4, 8, 0.92);
  overflow: hidden;
}

.ai-agent-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 79, 216, 0.055), transparent) -80px 0 / 180px 100%,
    linear-gradient(rgba(255, 79, 216, 0.045) 1px, transparent 1px) 0 0 / 100% 28px;
  opacity: 0.56;
}

.ai-agent-card > * {
  position: relative;
}

.agent-number {
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 38px;
  border: 1px solid rgba(255, 79, 216, 0.74);
  border-radius: 6px;
  color: var(--acid-2);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 900;
}

.agent-status {
  position: absolute;
  right: 18px;
  top: 22px;
  color: var(--acid-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-status::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--acid-2);
  vertical-align: 2px;
  box-shadow: 0 0 12px rgba(255, 79, 216, 0.8);
}

.agent-symbol {
  position: relative;
  align-self: center;
  justify-self: center;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 142px;
  aspect-ratio: 1;
  margin-top: 38px;
  border: 2px solid rgba(255, 79, 216, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 79, 216, 0.18), transparent 60%),
    rgba(8, 4, 8, 0.5);
  box-shadow: 0 0 32px rgba(255, 79, 216, 0.24), inset 0 0 28px rgba(255, 79, 216, 0.16);
  overflow: hidden;
}

.agent-symbol::before,
.agent-symbol::after {
  content: "";
  position: absolute;
}

.agent-symbol.pulse {
  position: relative;
}

.agent-symbol.pulse::before {
  left: 14px;
  right: 14px;
  top: 48%;
  height: 2px;
  background: var(--acid-2);
  box-shadow: 0 0 16px rgba(255, 79, 216, 0.75);
}

.agent-symbol.pulse::after {
  left: 22px;
  top: 30px;
  width: 54px;
  height: 38px;
  border-left: 3px solid var(--acid-2);
  border-bottom: 3px solid var(--acid-2);
  transform: skewX(-24deg);
}

.agent-symbol.round::after {
  border-radius: 50%;
  border: 2px solid var(--acid-2);
  inset: 20px;
  transform: none;
}

.agent-symbol.cubes,
.agent-symbol.network {
  border-radius: 8px;
  background:
    linear-gradient(30deg, transparent 42%, rgba(255, 79, 216, 0.9) 43% 46%, transparent 47%),
    linear-gradient(150deg, transparent 42%, rgba(255, 79, 216, 0.85) 43% 46%, transparent 47%),
    rgba(8, 4, 8, 0.52);
}

.agent-symbol.triangle {
  border-radius: 6px;
  clip-path: polygon(50% 5%, 94% 86%, 6% 86%);
}

.agent-symbol.phantom {
  border-radius: 48% 48% 12% 12%;
}

.agent-symbol.eye::before {
  inset: 30px 12px;
  border: 2px solid var(--acid-2);
  border-radius: 50%;
}

.agent-symbol.eye::after,
.agent-symbol.target::after,
.agent-symbol.ghost::after {
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--acid-2);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(255, 79, 216, 0.78);
}

.agent-symbol.target::before {
  inset: 18px;
  border: 2px dashed var(--acid-2);
  border-radius: 50%;
}

.agent-symbol.ghost {
  border-radius: 45% 45% 16% 16%;
}

.agent-symbol.has-sticker {
  border-radius: 20px;
  clip-path: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 79, 216, 0.2), transparent 64%),
    rgba(8, 4, 8, 0.72);
}

.agent-symbol.has-sticker::before,
.agent-symbol.has-sticker::after {
  display: none;
}

.agent-sticker-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 79, 216, 0.36));
}

.agent-sticker-input {
  display: none;
}

.agent-sticker-tools {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.agent-symbol:hover .agent-sticker-tools,
.agent-symbol:focus-within .agent-sticker-tools,
.agent-symbol:not(.has-sticker) .agent-sticker-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.agent-sticker-upload,
.agent-sticker-clear {
  min-width: 0;
  height: 24px;
  border: 1px solid rgba(255, 79, 216, 0.72);
  border-radius: 4px;
  color: #fff;
  background: rgba(8, 4, 8, 0.84);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.agent-sticker-upload:hover,
.agent-sticker-clear:hover {
  color: var(--acid-2);
  background: rgba(255, 79, 216, 0.14);
}

.agent-sticker-clear[hidden] {
  display: none;
}

.agent-copy {
  align-self: center;
  padding-top: 42px;
}

.agent-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
}

.agent-copy h3 {
  margin: 6px 0 14px;
  color: var(--acid-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-copy p {
  margin: 0;
  color: #d8cdd5;
  font-size: 13px;
  line-height: 1.75;
}

.agent-tags {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.agent-tags span,
.agent-buy {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 79, 216, 0.48);
  border-radius: 5px;
  color: #ffb8f2;
  background: rgba(255, 79, 216, 0.045);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.agent-buy {
  grid-column: 1 / -1;
  color: #fff;
  cursor: pointer;
}

.agent-buy:hover {
  border-color: var(--acid-2);
  color: var(--acid-2);
  background: rgba(255, 79, 216, 0.12);
}

.agents-quote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 26px;
}

.agents-quote > span {
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: 74px;
  line-height: 0.7;
}

.agents-quote p {
  margin: 0;
  color: #e7dde4;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  text-transform: uppercase;
}

.agents-quote strong {
  grid-column: 2;
  color: var(--acid-2);
  font-size: 12px;
  text-transform: uppercase;
}

.agent-barcode {
  grid-row: 1 / span 2;
  min-width: 240px;
  padding-top: 52px;
  color: var(--acid-2);
  background: repeating-linear-gradient(90deg, var(--acid-2) 0 2px, transparent 2px 6px) top / 100% 42px no-repeat;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.agents-right .brief-card,
.agents-right .commercial-card,
.agents-right .rent-card,
.network-stats {
  padding: 18px;
}

.network-stats {
  display: grid;
  gap: 12px;
}

.network-stats strong {
  color: var(--acid-2);
  font-size: 17px;
  text-transform: uppercase;
}

.biography-layout {
  grid-template-columns: 275px minmax(0, 1fr);
}

.bio-editor {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.05), transparent 44%),
    linear-gradient(rgba(154, 212, 0, 0.035) 1px, transparent 1px) 0 0 / 100% 34px,
    rgba(5, 10, 7, 0.9);
  box-shadow: inset 0 0 38px rgba(154, 212, 0, 0.04), 0 18px 42px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.bio-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
  gap: 20px;
  align-items: end;
  padding: 22px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.28);
}

.bio-editor-head .breadcrumb {
  margin: 0 0 16px;
  color: #9ea79e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.bio-editor h1 {
  max-width: 900px;
  margin: 0;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(48px, 6vw, 92px);
  line-height: 0.92;
  text-transform: uppercase;
}

.bio-editor-head p:last-child {
  max-width: 780px;
  margin: 14px 0 0;
  color: #d6ddd3;
  font-size: 15px;
  line-height: 1.7;
}

.bio-toolbar {
  display: grid;
  gap: 10px;
}

.bio-tool,
.bio-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(154, 212, 0, 0.56);
  border-radius: 5px;
  color: #f0f4ea;
  background: linear-gradient(90deg, rgba(154, 212, 0, 0.09), rgba(154, 212, 0, 0.02));
  font-weight: 800;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.bio-tool {
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 12px;
}

.bio-tool svg,
.bio-icon-button svg,
.primary-action svg {
  width: 18px;
  height: 18px;
  color: var(--acid-2);
}

.bio-tool:hover,
.bio-icon-button:hover {
  border-color: var(--acid-2);
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.13);
}

.bio-tool.muted {
  background: rgba(8, 13, 10, 0.76);
}

.file-tool {
  position: relative;
  cursor: pointer;
}

.file-tool input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.bio-save-state {
  justify-self: end;
  color: rgba(200, 255, 0, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bio-chapters {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.bio-chapter {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 80% 0, rgba(154, 212, 0, 0.11), transparent 36%),
    rgba(6, 12, 8, 0.9);
  overflow: hidden;
}

.bio-chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(154, 212, 0, 0.045), transparent) -80px 0 / 180px 100%,
    linear-gradient(rgba(154, 212, 0, 0.045) 1px, transparent 1px) 0 0 / 100% 28px;
  opacity: 0.5;
}

.bio-chapter > * {
  position: relative;
}

.bio-chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.bio-chapter-label {
  width: fit-content;
  margin: 0 0 6px;
  color: rgba(154, 212, 0, 0.78);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.bio-chapter h2 {
  margin: 0;
  color: var(--acid-2);
  font-size: clamp(28px, 3.4vw, 54px);
  line-height: 1;
  text-transform: uppercase;
}

.bio-icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
}

.bio-icon-button.danger:hover {
  border-color: rgba(219, 39, 53, 0.85);
  color: #ff6d75;
  background: rgba(219, 39, 53, 0.12);
}

.bio-image-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px dashed rgba(154, 212, 0, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(154, 212, 0, 0.08), transparent 38%),
    rgba(3, 7, 4, 0.62);
  overflow: hidden;
}

.bio-image-slot img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-chapter.has-image .bio-image-slot {
  border-style: solid;
}

.bio-chapter.has-image .bio-image-slot img {
  display: block;
}

.bio-chapter.has-image .bio-image-empty {
  display: none;
}

.bio-image-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: rgba(240, 242, 237, 0.78);
  cursor: pointer;
  text-transform: uppercase;
}

.bio-image-empty svg {
  width: 38px;
  height: 38px;
  color: var(--acid-2);
}

.bio-image-empty span {
  font-size: 12px;
  font-weight: 800;
}

.bio-chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bio-comments {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(154, 212, 0, 0.24);
  border-radius: 8px;
  background: rgba(3, 7, 4, 0.48);
}

.bio-comments-head,
.bio-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bio-comments-head h3 {
  margin: 0;
  color: var(--acid-2);
  font-size: 14px;
  text-transform: uppercase;
}

.bio-comments-head span,
.bio-comment-head span {
  color: rgba(240, 242, 237, 0.62);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bio-comments-list {
  display: grid;
  gap: 10px;
}

.bio-comment {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(154, 212, 0, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(154, 212, 0, 0.055), transparent 72%),
    rgba(6, 12, 8, 0.72);
}

.bio-comment-body,
.bio-comment-input {
  min-height: 92px;
  color: #e9ede6;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  outline: 0;
}

.bio-comment-body {
  min-height: 54px;
}

.bio-comment-composer {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 212, 0, 0.18);
}

.bio-comment-input {
  padding: 14px;
  border: 1px solid rgba(154, 212, 0, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.bio-comment-body:empty::before,
.bio-comment-input:empty::before {
  content: attr(data-placeholder);
  color: rgba(240, 242, 237, 0.38);
}

.bio-comment-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(154, 212, 0, 0.22);
  border-radius: 8px;
  color: rgba(240, 242, 237, 0.46);
  font-size: 13px;
  text-transform: uppercase;
}

.bio-icon-button.small {
  width: 32px;
  height: 32px;
}

.bio-icon-button.small svg {
  width: 15px;
  height: 15px;
}

.bio-help {
  padding: 18px;
}

.bio-format {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(154, 212, 0, 0.35);
  border-radius: 6px;
  background: rgba(154, 212, 0, 0.08);
}

.bio-format strong {
  color: var(--acid-2);
  font-size: 22px;
}

.bio-format span {
  color: #c1c7bd;
  font-size: 12px;
  text-transform: uppercase;
}

/* =====================================================
   CHARACTER CHAT WIDGET
   ===================================================== */

.char-chat {
  position: relative;
  margin: 20px 0 18px;
  border: 1px solid rgba(154, 212, 0, 0.2);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      0deg, transparent, transparent 27px,
      rgba(154, 212, 0, 0.025) 27px, rgba(154, 212, 0, 0.025) 28px
    ),
    linear-gradient(145deg, rgba(154, 212, 0, 0.04), transparent 55%),
    rgba(3, 8, 4, 0.9);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(154, 212, 0, 0.06), inset 0 0 32px rgba(154, 212, 0, 0.02);
}

.char-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(154, 212, 0, 0.04) 1px, transparent 1px
  ) 0 0 / 32px 100%;
  opacity: 0.25;
}

.char-chat::after {
  content: "⌐■";
  position: absolute;
  top: 9px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(154, 212, 0, 0.18);
  pointer-events: none;
  letter-spacing: -2px;
}

/* Header */
.char-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 13px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.14);
  position: relative;
  background: rgba(154, 212, 0, 0.03);
}

.char-chat-ident {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acid-2);
  box-shadow: 0 0 6px var(--acid-2), 0 0 14px rgba(154, 212, 0, 0.4);
  animation: chatPulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes chatPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; box-shadow: 0 0 2px var(--acid-2); }
}

.chat-head-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acid-2);
}

.chat-beta-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border: 1px solid rgba(154, 212, 0, 0.35);
  border-radius: 3px;
  color: rgba(154, 212, 0, 0.65);
  text-transform: uppercase;
  background: rgba(154, 212, 0, 0.06);
}

/* Messages */
.char-chat-body {
  padding: 18px 18px 14px;
  min-height: 280px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 212, 0, 0.35) transparent;
}

.char-chat-body::-webkit-scrollbar { width: 4px; }
.char-chat-body::-webkit-scrollbar-thumb { background: rgba(154, 212, 0, 0.35); border-radius: 2px; }

.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chat-msg.is-user {
  flex-direction: row-reverse;
}

.chat-msg-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(154, 212, 0, 0.2), rgba(154, 212, 0, 0.06));
  border: 1px solid rgba(154, 212, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--acid-2);
  flex-shrink: 0;
  font-family: var(--font-mono);
  letter-spacing: 0;
  box-shadow: 0 0 8px rgba(154, 212, 0, 0.12);
}

.chat-msg.is-user .chat-msg-icon {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(198, 214, 188, 0.7);
  font-size: 11px;
  box-shadow: none;
}

.chat-msg-text {
  max-width: 82%;
}

.chat-msg.is-user .chat-msg-text {
  text-align: right;
}

.chat-msg-who {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acid-2);
  margin-bottom: 5px;
  opacity: 0.9;
}

.chat-msg.is-user .chat-msg-who {
  color: rgba(198, 214, 188, 0.45);
}

.chat-msg-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(198, 220, 190, 0.9);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  background: rgba(154, 212, 0, 0.04);
  border: 1px solid rgba(154, 212, 0, 0.1);
  border-radius: 6px;
  padding: 10px 14px;
}

.chat-msg.is-user .chat-msg-text p {
  color: #dde8d8;
  text-align: right;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Typing indicator */
.chat-typing {
  align-items: center;
}

.chat-typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.chat-typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid-2);
  animation: typingDot 1.3s ease-in-out infinite;
}

.chat-typing-dots span:nth-child(2) { animation-delay: 0.22s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.44s; }

@keyframes typingDot {
  0%, 80%, 100% { opacity: 0.18; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1); }
}

.chat-typing-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.03em;
  opacity: 0.5;
  font-style: italic;
  animation: fadeInSlow 0.8s ease both;
}

@keyframes fadeInSlow {
  from { opacity: 0; }
  to   { opacity: 0.5; }
}

/* Composer */
.char-chat-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid rgba(154, 212, 0, 0.12);
  background: rgba(154, 212, 0, 0.025);
  min-height: 56px;
}

.chat-prompt-mark {
  color: var(--acid-2);
  font-size: 20px;
  font-family: var(--font-mono);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.6;
  margin-top: -1px;
}

.char-chat-input {
  flex: 1;
  background: rgba(154, 212, 0, 0.04);
  border: 1px solid rgba(154, 212, 0, 0.14);
  border-radius: 6px;
  outline: none;
  color: #dde8d8;
  font-size: 14px;
  font-family: var(--font-mono);
  caret-color: var(--acid-2);
  padding: 9px 12px;
  letter-spacing: 0.02em;
  transition: border-color 180ms, background 180ms;
  min-height: 38px;
}

.char-chat-input:focus {
  border-color: rgba(154, 212, 0, 0.38);
  background: rgba(154, 212, 0, 0.07);
}

.char-chat-input::placeholder {
  color: rgba(198, 214, 188, 0.3);
}

.char-chat-send {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(154, 212, 0, 0.35);
  border-radius: 8px;
  background: rgba(154, 212, 0, 0.08);
  color: var(--acid-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 180ms, border-color 180ms, transform 100ms, box-shadow 180ms;
}

.char-chat-send:hover {
  background: rgba(154, 212, 0, 0.18);
  border-color: rgba(154, 212, 0, 0.65);
  box-shadow: 0 0 10px rgba(154, 212, 0, 0.2);
}

.char-chat-send:active {
  transform: scale(0.93);
}

.char-chat-send:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Footer */
.char-chat-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px 9px;
  border-top: 1px solid rgba(154, 212, 0, 0.07);
  background: rgba(0, 0, 0, 0.15);
}

.chat-footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(154, 212, 0, 0.35);
  flex-shrink: 0;
  animation: chatPulse 3s ease-in-out infinite;
}

.char-chat-footer span:last-child {
  font-size: 10px;
  color: rgba(198, 214, 188, 0.32);
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* Theme overrides for other accent colors */
.theme-fuchsia .char-chat { border-color: rgba(255, 79, 216, 0.2); }
.theme-fuchsia .char-chat-body { scrollbar-color: rgba(255, 79, 216, 0.35) transparent; }
.theme-purple-metallic .char-chat { border-color: rgba(200, 167, 255, 0.2); }
.theme-blue-void .char-chat { border-color: rgba(117, 204, 255, 0.2); }
.theme-warm-flesh .char-chat { border-color: rgba(255, 176, 120, 0.22); }
.theme-rose-gold .char-chat { border-color: rgba(255, 127, 183, 0.22); }
.theme-red-ussr .char-chat { border-color: rgba(255, 59, 47, 0.22); }

/* =====================================================
   CHAR PAGE — full-width character profile (no sidebars)
   Used by index.html, arut.html, etc.
   ===================================================== */

.char-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px 28px;
}

.char-breadcrumb {
  padding: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a8afaa;
}

.char-hero {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.char-hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.char-portrait-col {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.char-portrait-col .portrait-stage {
  height: 780px;
  min-height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* SVG fills the full stage height — no dead space at any row height */
.char-hero .architect-svg {
  height: calc(100% + 8px);
  width: auto;
}

/* Thumbnail strip in normal grid flow below portrait-stage */
.char-portrait-col .photo-thumbs {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  padding: 6px 0;
  min-height: 0;
}
.char-portrait-col .photo-thumbs:empty {
  display: none;
}

/* Portrait HUD corner decorations */
.portrait-hud {
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
}
.portrait-hud::before,
.portrait-hud::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(154, 212, 0, 0.5);
  border-style: solid;
}
.portrait-hud::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}
.portrait-hud::after {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}
.portrait-hud-br,
.portrait-hud-bl {
  position: absolute;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-color: rgba(154, 212, 0, 0.5);
  border-style: solid;
}
.portrait-hud-br {
  right: 0;
  border-width: 0 2px 2px 0;
}
.portrait-hud-bl {
  left: 0;
  border-width: 0 0 2px 2px;
}
.portrait-hud-id {
  position: absolute;
  top: 4px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(154, 212, 0, 0.45);
  text-transform: uppercase;
}
.portrait-hud-status {
  position: absolute;
  top: 22px;
  right: 0;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(154, 212, 0, 0.35);
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.char-hero .hero-copy {
  padding: 20px 28px 22px 22px;
  min-height: auto;
  background:
    linear-gradient(160deg, rgba(154, 212, 0, 0.028), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 40%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(154, 212, 0, 0.03), 0 4px 16px rgba(0,0,0,0.18);
}

.char-hero .hero-copy::before {
  display: none;
}

.char-hero .hero-copy h1 {
  font-size: clamp(52px, 5.2vw, 82px);
  line-height: 0.88;
  margin-bottom: 4px;
}

.char-handle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(198, 214, 188, 0.45);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 4px;
}

.char-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--acid-2);
  color: #060a06;
  font-size: 9px;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
}

.char-panels-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.char-panels-col .panel {
  padding: 16px;
}

.guild-card .guild-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 12px;
}

.guild-card .guild-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(154, 212, 0, 0.18), rgba(154, 212, 0, 0.04));
  border: 1px solid rgba(154, 212, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--acid-2);
  flex-shrink: 0;
}

.guild-card .guild-row strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 2px;
}

.guild-card .guild-row span {
  font-size: 11px;
  color: rgba(198, 214, 188, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ══ CPX HERO REBUILD ══════════════════════════════════════════ */

/* Header row */
.cpx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.cpx-header .eyebrow {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.cpx-chips {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cpx-chip {
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.cpx-chip--live {
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.1);
  border: 1px solid rgba(154, 212, 0, 0.35);
}

.cpx-chip--rarity {
  color: #c8a840;
  background: rgba(200, 168, 64, 0.08);
  border: 1px solid rgba(200, 168, 64, 0.3);
}

/* Identity row under H1 */
.cpx-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 4px 0 10px;
}

.cpx-identity .char-handle {
  margin: 0;
}

.cpx-id-code {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(154, 212, 0, 0.35);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── DATA ZONE — 2 columns ── */
.cpx-data {
  display: grid;
  grid-template-columns: minmax(140px, 0.6fr) minmax(0, 1.4fr);
  gap: 12px;
  margin: 0 0 12px;
  align-items: stretch;
}

.cpx-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(154, 212, 0, 0.4);
  text-transform: uppercase;
  margin: 0 0 7px;
}

/* Meta panel */
.cpx-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border: 1px solid rgba(154, 212, 0, 0.18);
  border-radius: var(--radius);
  background: rgba(4, 10, 6, 0.55);
  margin: 0;
}

.cpx-meta div {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  border-bottom: 1px solid rgba(154, 212, 0, 0.07);
}

.cpx-meta div:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.cpx-meta dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154, 212, 0, 0.4);
  margin: 0 0 2px;
}

.cpx-meta dd {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #dae8ca;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.cpx-meta dd.live {
  color: var(--acid-2);
}


/* Radar panel */
.cpx-radar {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid rgba(154, 212, 0, 0.18);
  border-radius: var(--radius);
  background: rgba(4, 10, 6, 0.55);
}

.cpx-radar-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

.cpx-rg polygon,
.cpx-rg line {
  fill: none;
  stroke: rgba(154, 212, 0, 0.16);
  stroke-width: 1;
}

.cpx-rg line {
  stroke: rgba(154, 212, 0, 0.1);
  stroke-dasharray: 3 4;
}

.cpx-rfill {
  fill: url(#cpxRG);
  stroke: none;
  transform-origin: 130px 100px;
  animation: cpxRadarIn 1s cubic-bezier(0.22,1,0.36,1) both;
}

.cpx-rstroke {
  fill: none;
  stroke: var(--acid-2);
  stroke-width: 1.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(154,212,0,0.5));
  transform-origin: 130px 100px;
  animation: cpxRadarIn 1s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cpxRadarIn {
  from { transform: scale(0.05); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.cpx-rdot {
  cursor: pointer;
}

.cpx-rdot circle:first-child {
  fill: var(--acid-2);
  filter: drop-shadow(0 0 3px rgba(154,212,0,0.7));
  transition: r 0.15s ease;
}

.cpx-rdot-ring {
  fill: none;
  stroke: var(--acid-2);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cpx-rdot:hover circle:first-child {
  r: 6;
}

.cpx-rdot:hover .cpx-rdot-ring {
  opacity: 0.55;
  animation: cpxDotPulse 1.4s ease-in-out infinite;
}

@keyframes cpxDotPulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.75; }
}

.cpx-rscale {
  font-family: var(--font-mono);
  font-size: 6.5px;
  fill: rgba(154,212,0,0.28);
}

.cpx-rlbl {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  fill: rgba(198,214,188,0.6);
  letter-spacing: 0.04em;
}

.cpx-rtip-bg {
  fill: rgba(3,8,4,0.94);
  stroke: rgba(154,212,0,0.4);
  stroke-width: 1;
}

.cpx-rtip-txt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  fill: var(--acid-2);
}

/* ── DONUT RING CHART ── */

.cpx-donut-wrap {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.cpx-ring-legend {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  min-width: 130px;
  align-self: stretch;
}

.cpx-ring-legend .cpx-section-label {
  margin-bottom: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.cpx-rl-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 0;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.cpx-rl-item:hover {
  background: rgba(154,212,0,0.05);
}

.cpx-rl-line {
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--acid-2);
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 0.15s ease, width 0.15s ease;
}

.cpx-rl-item:hover .cpx-rl-line {
  opacity: 1;
  width: 18px;
}

.cpx-rl-name {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(198,214,188,0.52);
  white-space: nowrap;
}

.cpx-rl-val {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--acid-2);
  text-align: right;
  cursor: text;
  border-radius: 2px;
  padding: 0 2px;
  transition: background 0.15s ease;
  outline: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}

.cpx-rl-val:focus {
  background: rgba(154,212,0,0.1);
  color: #c8e060;
}

.cpx-ring-chart {
  flex: 1 1 0;
  min-width: 0;
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  aspect-ratio: 1;
  overflow: visible;
}

/* Decorative orbit */
.cpx-orbit-ring {
  animation: cpxOrbitRotate 80s linear infinite;
  transform-origin: 140px 140px;
}

@keyframes cpxOrbitRotate {
  to { transform: rotate(360deg); }
}

/* Background tracks */
.cpx-ring-tracks circle {
  fill: none;
  stroke: rgba(154,212,0,0.07);
  stroke-width: 12;
}

/* Progress arcs */
.cpx-ring-arc {
  fill: none;
  stroke: var(--acid-2);
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0.78;
  transform: rotate(-90deg);
  transform-origin: 140px 140px;
  filter: url(#cpxRingGlow);
  transition: opacity 0.18s ease, stroke-width 0.18s ease;
  cursor: pointer;
}

.cpx-ring-arc:hover {
  opacity: 1;
  stroke-width: 15;
}

/* Center */
.cpx-ring-center-bg {
  fill: rgba(5,12,6,0.92);
  stroke: rgba(154,212,0,0.38);
  stroke-width: 1.5;
}

.cpx-ring-center-inner {
  fill: none;
  stroke: rgba(154,212,0,0.2);
  stroke-width: 1;
}

.cpx-ring-center-txt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  fill: var(--acid-2);
  letter-spacing: 0;
  pointer-events: none;
}

/* ── BOTTOM ZONE — quote + chat ── */
.cpx-bottom {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.cpx-bottom blockquote {
  margin: 0;
  max-width: none;
  height: 100%;
  box-sizing: border-box;
  font-size: 12.5px;
  padding: 14px 14px 14px 38px;
}

.cpx-bottom .char-chat {
  margin: 0;
}

/* Responsive adjustments for CPX */
@media (max-width: 1300px) {
  .cpx-data {
    grid-template-columns: minmax(130px, 0.58fr) minmax(0, 1.42fr);
    gap: 10px;
  }
}

@media (max-width: 1100px) {
  .cpx-data {
    grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1.45fr);
  }
}

@media (max-width: 800px) {
  .cpx-data {
    grid-template-columns: 1fr;
  }

  .cpx-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1500px) {
  .char-hero {
    grid-template-columns: 380px minmax(0, 1fr);
  }
}

@media (max-width: 1300px) {
  .char-hero {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .char-hero .hero-copy h1 {
    font-size: clamp(44px, 5.5vw, 72px);
  }

  .cpx-data {
    grid-template-columns: minmax(120px, 0.58fr) minmax(0, 1.42fr);
    gap: 10px;
  }
}

@media (max-width: 1100px) {
  .char-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .char-portrait-col {
    display: none;
  }
}

@media (max-width: 700px) {
  .char-page {
    padding: 10px 12px 20px;
  }

  .char-hero {
    grid-template-columns: 1fr;
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 1500px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 0 16px 0 20px;
  }

  .main-nav a {
    padding: 0 14px;
    font-size: 12px;
  }

  .layout {
    grid-template-columns: 255px minmax(0, 1fr) 280px;
  }

  .biography-layout {
    grid-template-columns: 255px minmax(0, 1fr);
  }

  .hero-copy h1 {
    font-size: clamp(58px, 5.5vw, 78px);
  }

  .tab-panels {
    grid-template-columns: 1fr;
  }

  .network {
    height: 210px;
  }

  .agents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-agent-card {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .agent-symbol {
    width: 132px;
  }

  .character-grid {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
  }
}

@media (max-width: 1220px) {
  .topbar {
    grid-template-columns: auto 1fr;
    gap: 0;
    min-height: 56px;
    padding: 0 14px 0 18px;
  }

  .nav-universe-badge {
    display: none;
  }

  .brand {
    align-items: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .login-layout {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .client-hero,
  .client-grid {
    grid-template-columns: 1fr;
  }

  .client-balance-panel,
  .client-wallet-panel,
  .client-character-panel,
  .client-routes-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .login-hero,
  .login-card {
    min-height: auto;
  }

  .left-rail,
  .right-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .left-footer {
    display: none;
  }

  .biography-layout {
    grid-template-columns: 1fr;
  }

  .registry-hero {
    grid-template-columns: 1fr;
  }

  .agents-hero {
    grid-template-columns: 1fr;
  }

  .agents-hero-mark {
    min-height: 120px;
  }

  .bio-editor-head {
    grid-template-columns: 1fr;
  }

  .registry-tools {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .character-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }
}

@media (max-width: 900px) {
  .top-content {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    min-height: 780px;
  }

  .hero-copy {
    padding: 44px 28px 36px;
  }

  .hero-copy h1 {
    font-size: clamp(54px, 10vw, 76px);
  }

  .tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .bottom-grid,
  .left-rail,
  .right-rail,
  .location-list {
    grid-template-columns: 1fr;
  }

  .location-list {
    display: grid;
  }

  .stats-layout {
    grid-template-columns: 1fr;
  }

  .radar {
    max-width: 260px;
  }

  .history-grid {
    grid-template-columns: 1fr;
  }

  .agents-grid {
    grid-template-columns: 1fr;
  }

  .agents-quote {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agent-barcode {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .registry-tabs {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
  }

  .character-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .registry-footer {
    grid-template-columns: 1fr;
  }

  .registry-load {
    min-width: min(420px, 100%);
  }

  .registry-footer p {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .layout {
    padding: 10px;
  }

  .top-actions {
    flex-direction: column;
    gap: 8px;
  }

  .primary-action {
    width: 100%;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .auth-mode-toggle {
    grid-template-columns: 1fr;
  }

  .client-layout,
  .client-locked {
    padding: 10px;
    margin: 10px;
  }

  .client-hero {
    padding: 18px;
  }

  .client-hero h1,
  .client-locked h1 {
    font-size: 50px;
  }

  .client-card-list,
  .client-wallet-total,
  .character-console-stats {
    grid-template-columns: 1fr;
  }

  .client-wallet-total em {
    grid-column: 1;
    grid-row: auto;
    text-align: left;
  }

  .client-ledger div {
    grid-template-columns: 1fr;
  }

  .login-layout {
    padding: 10px;
  }

  .login-hero h1 {
    font-size: 54px;
  }

  .panel h2,
  .hero-card h2 {
    font-size: 14px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy blockquote {
    padding: 16px 16px 16px 34px;
    font-size: 14px;
  }

  .hero-copy blockquote span:first-child {
    left: 10px;
  }

  .photo-controls {
    left: 12px;
    right: 12px;
    flex-wrap: wrap;
  }

  .photo-add,
  .photo-clear {
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }

  .photo-layer {
    top: 52px;
    left: 8px;
    width: min(360px, calc(100% - 16px));
    max-height: none;
  }

  .photo-thumbs {
    left: 8px;
    right: 8px;
    bottom: 14px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .meta-grid div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 7px 0;
  }

  .tabs {
    grid-template-columns: 1fr 1fr;
  }

  .tab {
    min-height: 42px;
    font-size: 12px;
  }

  .event-list li {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .event-list time {
    grid-column: 2;
  }

  .network {
    height: 420px;
  }

  .network-lines {
    display: none;
  }

  .node,
  .main-node {
    position: static;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    justify-items: start;
    margin-bottom: 10px;
    transform: none;
    text-align: left;
  }

  .main-node .avatar {
    width: 58px;
    height: 58px;
  }

  .main-node strong {
    margin-top: 0;
    align-self: center;
  }

  .registry-content {
    padding: 12px;
  }

  .registry-tools {
    grid-template-columns: 1fr;
  }

  .bio-editor-head {
    padding: 16px;
  }

  .bio-chapters {
    padding: 12px;
  }

  .bio-chapter {
    padding: 14px;
  }

  .agents-hero {
    padding: 16px;
  }

  .agents-hero-mark > span {
    right: 14px;
    font-size: 38px;
  }

  .agents-skull {
    left: 14px;
    width: 82px;
    font-size: 25px;
  }

  .ai-agent-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .agent-symbol {
    grid-row: auto;
    width: 150px;
    margin-top: 42px;
  }

  .agent-copy {
    padding-top: 0;
  }

  .agent-tags {
    grid-template-columns: 1fr;
  }

  .agents-quote {
    padding: 18px;
  }

  .registry-hero h1 {
    font-size: 25px;
  }

  .character-grid {
    grid-template-columns: 1fr;
  }

  .character-card-body {
    grid-template-columns: 1fr;
  }

  .character-orbit {
    width: 180px;
  }
}

.universe-content {
  grid-template-rows: auto auto auto;
}

.universe-hero {
  padding: 0 18px 20px;
}

.universe-hero .breadcrumb {
  margin: 0 -18px 16px;
}

.universe-hero h1 {
  margin: 0;
  color: var(--acid-2);
  font-family: var(--font-sans);
  font-size: clamp(46px, 6vw, 92px);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(154, 212, 0, 0.28);
}

.universe-hero > p:not(.breadcrumb):not(.registry-kicker) {
  max-width: 760px;
  margin: 14px 0 0;
  color: #cbd4c8;
  font-size: 15px;
  line-height: 1.65;
}

.universe-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.universe-stat {
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(154, 212, 0, 0.34);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.1), transparent 64%),
    rgba(6, 12, 8, 0.78);
}

.universe-stat strong {
  display: block;
  color: var(--acid-2);
  font-family: var(--font-mono);
  font-size: 34px;
  line-height: 1;
}

.universe-stat span {
  display: block;
  margin-top: 8px;
  color: #dce4d7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.spb-map-panel {
  padding: 18px;
}

.map-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.map-toolbar h2,
.route-panel h2,
.intel-card h2 {
  margin: 0;
  color: var(--acid-2);
  font-size: 18px;
  text-transform: uppercase;
}

.map-toolbar p,
.intel-card p {
  max-width: 740px;
  margin: 8px 0 0;
  color: #c3cbc0;
  font-size: 13px;
  line-height: 1.65;
}

.map-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.map-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.map-coordinate-search {
  display: grid;
  gap: 6px;
  width: min(380px, 100%);
}

.map-coordinate-label {
  color: var(--acid-2);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
}

.map-coordinate-row {
  display: grid;
  grid-template-columns: minmax(185px, 1fr) auto;
  gap: 8px;
}

.map-coordinate-search input {
  width: 100%;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(154, 212, 0, 0.46);
  border-radius: 5px;
  color: #f0f2ed;
  background: rgba(1, 4, 2, 0.74);
  font: inherit;
  font-size: 12px;
}

.map-coordinate-search input:focus {
  border-color: var(--acid-2);
  box-shadow: 0 0 14px rgba(154, 212, 0, 0.18);
  outline: none;
}

.map-coordinate-search output {
  min-height: 14px;
  color: #c3cbc0;
  font-size: 10px;
  line-height: 1.3;
  text-align: right;
}

.map-coordinate-search output.is-error {
  color: #ff6b6b;
}

.map-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.map-filter-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(154, 212, 0, 0.34);
  border-radius: 6px;
  color: #edf4e8;
  background: rgba(5, 10, 7, 0.68);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.map-filter-button span {
  grid-row: 1 / span 2;
  font-size: 15px;
  line-height: 1.1;
}

.map-filter-button strong,
.map-filter-button em {
  display: block;
  min-width: 0;
}

.map-filter-button strong {
  color: #fff;
  font-size: 11px;
  line-height: 1.15;
  text-transform: uppercase;
}

.map-filter-button em {
  color: #bdc8b7;
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
}

.map-filter-button:hover,
.map-filter-button:focus-visible,
.map-filter-button.is-active {
  border-color: var(--filter-color, var(--acid-2));
  background: color-mix(in srgb, var(--filter-color, var(--acid-2)) 14%, rgba(5, 10, 7, 0.78));
  box-shadow: 0 0 18px color-mix(in srgb, var(--filter-color, var(--acid-2)) 28%, transparent);
  outline: none;
}

.map-filter-reset {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(154, 168, 175, 0.3);
  border-radius: 7px;
  background: rgba(3, 9, 12, 0.68);
  color: #9aa8af;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.map-filter-reset:hover,
.map-filter-reset:focus-visible {
  border-color: rgba(217, 228, 234, 0.72);
  color: #fff;
  outline: none;
}

.map-filter-reset:disabled {
  opacity: 0.4;
  cursor: default;
}

.map-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 999px;
  color: #e2eadc;
  background: rgba(154, 212, 0, 0.07);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-marker-actions,
.map-marker-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.map-coord-inspector {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
}

.map-coord-inspector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.map-coord-inspector-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #00e5ff;
  opacity: 0.7;
}

.map-coord-inspector-copy {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px;
  color: #00e5ff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 8px;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.map-coord-inspector-copy:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.6);
}

.map-coord-inspector-copy.is-active {
  background: rgba(0, 229, 255, 0.25);
  border-color: #00e5ff;
  color: #fff;
  animation: picker-pulse 1s ease-in-out infinite;
}

.map-coord-inspector-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e0f7fa;
  letter-spacing: 0.03em;
  word-break: break-all;
}

.map-coord-inspector-hint {
  font-size: 10px;
  color: #00e5ff;
  margin-top: 2px;
  min-height: 14px;
}

.map-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(154, 212, 0, 0.62);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(154, 212, 0, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.map-action-button:hover,
.map-action-button:focus-visible,
.map-action-button.is-active {
  border-color: var(--acid-2);
  color: #fff;
  background: rgba(154, 212, 0, 0.16);
  outline: none;
}

.map-action-button.muted {
  color: #e1e8dc;
  background: rgba(5, 10, 7, 0.72);
}

.map-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
  gap: 12px;
  align-items: stretch;
}

.spb-map-shell {
  position: relative;
  min-height: 650px;
  --map-filter-accent: #ff3248;
  --map-filter-tint: rgba(255, 50, 72, 0.12);
  /* invert() turns the light OSM basemap dark; hue-rotate/saturate then tint
     it per district. Tuned 2026-09-20 against a real St Petersburg tile —
     see the comment above MAP_TILE_CONFIG in script.js for why the tile
     source changed and why the old grayscale/sepia recipe (built for a
     dark CARTO/Esri source) stopped working. */
  --map-filter-map: invert(1) hue-rotate(144deg) saturate(1.2) brightness(0.95) contrast(0.92);
  --map-tile-bg: #0a0a0f;
  border: 1px solid rgba(154, 212, 0, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 48% 42%, var(--map-filter-tint), transparent 44%),
    linear-gradient(135deg, color-mix(in srgb, var(--map-filter-accent) 10%, transparent), transparent 58%),
    #030604;
  box-shadow: inset 0 0 44px color-mix(in srgb, var(--map-filter-accent) 12%, transparent), 0 0 26px color-mix(in srgb, var(--map-filter-accent) 16%, transparent);
  cursor: grab;
  overflow: hidden;
}

.map-marker-side-panel {
  display: grid;
  align-content: start;
  min-height: 650px;
  padding: 14px;
  border: 1px solid rgba(154, 212, 0, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.1), transparent 58%),
    rgba(3, 7, 4, 0.86);
  box-shadow: inset 0 0 32px rgba(154, 212, 0, 0.08);
}

.map-marker-empty {
  display: grid;
  gap: 10px;
  min-height: 190px;
  align-content: center;
  padding: 18px;
  border: 1px dashed rgba(154, 212, 0, 0.42);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.36);
}

.map-marker-empty strong {
  color: var(--acid-2);
  font-size: 13px;
  text-transform: uppercase;
}

.map-marker-empty p {
  margin: 0;
  color: #cbd3c6;
  font-size: 12px;
  line-height: 1.55;
}

.district-summary-card {
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 16px;
  border-style: solid;
}

.district-summary-card strong,
.district-summary-card p {
  color: inherit;
}

.district-summary-head {
  display: grid;
  gap: 5px;
}

.district-summary-head span,
.district-stats-block h4,
.district-events-block h4,
.district-index span,
.district-summary-meta dt {
  color: color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 82%, #ffffff 12%);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.district-summary-head h3 {
  margin: 0;
  color: #fff;
  font-size: 19px;
  line-height: 1;
  text-transform: uppercase;
}

.district-summary-head strong {
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--district-status-color, var(--map-filter-accent)) 70%, transparent);
  border-radius: 999px;
  color: var(--district-status-color, var(--map-filter-accent));
  background: color-mix(in srgb, var(--district-status-color, var(--map-filter-accent)) 10%, transparent);
  font-size: 10px;
  text-transform: uppercase;
}

.district-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 48%, transparent);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.district-index b {
  color: #fff;
  font-size: 38px;
  line-height: 0.9;
}

.district-summary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.district-summary-meta div {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.district-summary-meta dt,
.district-summary-meta dd {
  margin: 0;
}

.district-summary-meta dd {
  margin-top: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.district-stats-block,
.district-events-block {
  display: grid;
  gap: 8px;
}

.district-stats-block h4,
.district-events-block h4 {
  margin: 0;
}

.district-stats-block ul,
.district-events-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.district-stat-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  padding: 8px 9px;
  border: 1px solid color-mix(in srgb, var(--district-stat-color) 38%, transparent);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
}

.district-stat-row span,
.district-stat-row strong {
  position: relative;
  z-index: 1;
}

.district-stat-row b {
  margin-right: 7px;
  color: var(--district-stat-color);
  font-family: var(--font-mono);
}

.district-stat-row strong {
  color: #fff;
}

.district-stat-row i {
  position: absolute;
  inset: auto auto 0 0;
  width: var(--district-stat-width);
  height: 2px;
  background: var(--district-stat-color);
  box-shadow: 0 0 12px var(--district-stat-color);
}

.district-events-block li {
  color: #d8e0d3;
  font-size: 11px;
  line-height: 1.35;
}

.district-events-block .district-skill-effect {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 42%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 8%, transparent);
}

.district-events-block .district-skill-effect strong {
  color: var(--map-filter-accent, var(--acid-2));
  font-size: 11px;
  text-transform: uppercase;
}

.district-events-block .district-skill-effect span {
  color: #bec9ba;
  font-size: 10px;
  text-transform: uppercase;
}

.map-marker-empty.is-placing {
  border-style: solid;
  background: rgba(154, 212, 0, 0.08);
  box-shadow: inset 0 0 22px rgba(154, 212, 0, 0.08);
}

.map-marker-empty[hidden],
.map-marker-detail[hidden],
.map-marker-editor[hidden] {
  display: none;
}

.map-marker-detail {
  display: grid;
  gap: 14px;
  color: #eef5ea;
}

.map-marker-detail-image,
.map-marker-image-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 58%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(200, 255, 0, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(0deg, rgba(200, 255, 0, 0.07) 1px, transparent 1px) 0 0 / 28px 28px,
    rgba(1, 4, 2, 0.62);
}

.map-marker-detail-image {
  min-height: 176px;
  border-style: solid;
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 14%, transparent);
}

.map-marker-detail-image span,
.map-marker-image-preview em {
  color: rgba(238, 245, 234, 0.58);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.map-marker-detail-image img,
.map-marker-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.map-marker-detail-head {
  position: relative;
  display: grid;
  gap: 5px;
  padding-right: 34px;
}

.map-marker-detail-head span {
  color: color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 88%, #ffffff 12%);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-marker-detail-head h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.05;
  text-transform: uppercase;
}

.map-marker-detail-close {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 70%, #ffffff 8%);
  border-radius: 5px;
  color: var(--map-filter-accent, var(--acid-2));
  background: rgba(3, 7, 4, 0.78);
  font-size: 18px;
  line-height: 1;
}

.map-marker-detail-close:hover,
.map-marker-detail-close:focus-visible {
  background: color-mix(in srgb, var(--map-filter-accent, var(--acid-2)) 18%, rgba(3, 7, 4, 0.8));
  outline: none;
}

.map-marker-detail p {
  margin: 0;
  color: #dfe7da;
  font-size: 12px;
  line-height: 1.55;
}

.map-marker-detail-meta {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(154, 212, 0, 0.2);
  border-radius: 7px;
  background: rgba(1, 4, 2, 0.32);
}

.map-marker-detail-meta div {
  display: grid;
  grid-template-columns: minmax(86px, 0.72fr) minmax(0, 1fr);
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.16);
}

.map-marker-detail-meta div:last-child {
  border-bottom: 0;
}

.map-marker-detail-meta dt {
  color: #aeb9aa;
  font-size: 10px;
  text-transform: uppercase;
}

.map-marker-detail-meta dd {
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.spb-map-shell.is-dragging {
  cursor: grabbing;
}

.spb-map-shell.is-placing {
  cursor: crosshair;
}

.spb-map-shell.map-filter-rockstar {
  --map-filter-accent: #ff3248;
  --map-filter-tint: rgba(255, 50, 72, 0.08);
  --map-filter-map: invert(1) hue-rotate(144deg) saturate(1.2) brightness(0.95) contrast(0.92);
  --map-tile-bg: #1a0508;
}

.spb-map-shell.map-filter-lumen {
  --map-filter-accent: #ffd23f;
  --map-filter-tint: rgba(255, 210, 63, 0.08);
  --map-filter-map: invert(1) hue-rotate(196deg) saturate(1.15) brightness(0.95) contrast(0.92);
  --map-tile-bg: #18130a;
}

.spb-map-shell.map-filter-commerce {
  --map-filter-accent: #57ff63;
  --map-filter-tint: rgba(87, 255, 99, 0.08);
  --map-filter-map: invert(1) hue-rotate(274deg) saturate(1.15) brightness(0.95) contrast(0.92);
  --map-tile-bg: #061408;
}

.spb-map-shell.map-filter-playground {
  --map-filter-accent: #ff982e;
  --map-filter-tint: rgba(255, 152, 46, 0.08);
  --map-filter-map: invert(1) hue-rotate(180deg) saturate(1.15) brightness(0.95) contrast(0.92);
  --map-tile-bg: #180d04;
}

.spb-map-shell.map-filter-fit {
  --map-filter-accent: #39a4ff;
  --map-filter-tint: rgba(57, 164, 255, 0.09);
  --map-filter-map: invert(1) hue-rotate(358deg) saturate(1.15) brightness(0.95) contrast(0.92);
  --map-tile-bg: #040e1a;
}

.spb-map-shell.map-filter-luxury {
  --map-filter-accent: #c45bff;
  --map-filter-tint: rgba(196, 91, 255, 0.09);
  --map-filter-map: invert(1) hue-rotate(68deg) saturate(1.15) brightness(0.95) contrast(0.92);
  --map-tile-bg: #0e0618;
}

.spb-map-shell.map-filter-sandbox {
  --map-filter-accent: #8c9490;
  --map-filter-tint: rgba(140, 148, 144, 0.1);
  --map-filter-map: invert(1) grayscale(1) brightness(0.92) contrast(0.95);
  --map-tile-bg: #0c0e0d;
}

.spb-map-shell.map-filter-civic {
  --map-filter-accent: #d9e4ea;
  --map-filter-tint: rgba(217, 228, 234, 0.11);
  --map-filter-map: invert(1) hue-rotate(351deg) saturate(0.7) brightness(0.98) contrast(0.9);
  --map-tile-bg: #080e10;
}

.spb-map-shell.map-filter-onboarding {
  --map-filter-accent: #28ffe0;
  --map-filter-tint: rgba(40, 255, 224, 0.08);
  --map-filter-map: invert(1) hue-rotate(321deg) saturate(1.15) brightness(0.95) contrast(0.92);
  --map-tile-bg: #041410;
}

.spb-map-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: screen;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 42px 42px;
}

.spb-map-shell[data-district-tone="hype"]::before {
  opacity: 0.5;
  background:
    radial-gradient(circle at 45% 42%, rgba(255, 47, 100, 0.42), transparent 34%),
    linear-gradient(135deg, rgba(255, 47, 100, 0.24), transparent 58%);
}

.spb-map-shell[data-district-tone="fear"]::before,
.spb-map-shell[data-district-tone="disorder"]::before {
  opacity: 0.54;
  background:
    repeating-linear-gradient(135deg, rgba(255, 48, 48, 0.18) 0 2px, transparent 2px 12px),
    radial-gradient(circle at 52% 48%, rgba(176, 0, 32, 0.4), transparent 45%);
}

.spb-map-shell[data-district-tone="tech"]::before {
  opacity: 0.46;
  background:
    linear-gradient(90deg, rgba(66, 200, 255, 0.2) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(0deg, rgba(66, 200, 255, 0.14) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 62% 30%, rgba(66, 200, 255, 0.25), transparent 38%);
}

.spb-map-shell[data-district-tone="ai"]::before {
  opacity: 0.48;
  background:
    radial-gradient(circle at 20% 28%, rgba(179, 76, 255, 0.34), transparent 16%),
    radial-gradient(circle at 72% 62%, rgba(179, 76, 255, 0.28), transparent 19%),
    linear-gradient(110deg, rgba(179, 76, 255, 0.18), transparent 55%);
}

.spb-map-shell[data-district-tone="stable"]::before {
  opacity: 0.36;
  background:
    linear-gradient(90deg, rgba(66, 255, 228, 0.12) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(66, 255, 228, 0.1) 1px, transparent 1px) 0 0 / 36px 36px;
}

.spb-map-shell[data-district-tone="invest"]::before {
  opacity: 0.44;
  background:
    radial-gradient(circle at 28% 50%, rgba(125, 255, 99, 0.36), transparent 18%),
    radial-gradient(circle at 70% 38%, rgba(125, 255, 99, 0.28), transparent 15%),
    linear-gradient(90deg, rgba(125, 255, 99, 0.1) 1px, transparent 1px) 0 0 / 34px 34px;
}

.spb-map-shell[data-district-tone="control"]::before {
  opacity: 0.46;
  background:
    linear-gradient(90deg, rgba(192, 107, 255, 0.16) 2px, transparent 2px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(192, 107, 255, 0.14) 2px, transparent 2px) 0 0 / 72px 72px,
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(192, 107, 255, 0.28) 39%, transparent 42%);
}

.spb-map-shell.skill-fx-neural-grid::before {
  opacity: 0.62;
  background:
    radial-gradient(circle at 50% 50%, rgba(184, 255, 0, 0.42) 0 3px, transparent 3px 22%, rgba(184, 255, 0, 0.18) 22.5%, transparent 23.5%),
    linear-gradient(90deg, rgba(184, 255, 0, 0.23) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(0deg, rgba(184, 255, 0, 0.18) 1px, transparent 1px) 0 0 / 30px 30px;
  animation: district-skill-pulse 2.1s ease-in-out infinite;
}

.spb-map-shell.skill-fx-stabilization-dome::before {
  opacity: 0.58;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(66, 255, 228, 0.24), transparent 47%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(66, 255, 228, 0.3) 40.5%, transparent 43%);
}

.spb-map-shell.skill-fx-ownership-contour::before {
  opacity: 0.65;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(255, 210, 63, 0.5) 38.5%, transparent 41%),
    linear-gradient(90deg, transparent 6%, rgba(255, 210, 63, 0.22) 6.3%, transparent 6.7%, transparent 93%, rgba(255, 210, 63, 0.2) 93.3%, transparent 93.7%);
}

.spb-map-shell.skill-fx-district-transformation::before {
  opacity: 0.75;
  background:
    radial-gradient(circle at 50% 48%, rgba(184, 255, 0, 0.33), transparent 32%),
    repeating-linear-gradient(90deg, rgba(184, 255, 0, 0.19) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(66, 255, 228, 0.16) 0 1px, transparent 1px 22px);
  animation: district-skill-pulse 1.35s ease-in-out infinite;
}

@keyframes district-skill-pulse {
  0%, 100% { filter: brightness(0.9); }
  50% { filter: brightness(1.25); }
}

.spb-leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: var(--map-tile-bg, #0a0a0f);
}

.spb-leaflet-map .leaflet-container {
  background: var(--map-tile-bg, #0a0a0f) !important;
}

.spb-leaflet-map .leaflet-tile-pane {
  filter: var(--map-filter-map);
  opacity: 0.88;
  background: #b0b0b0;
}

.spb-leaflet-map .leaflet-tile,
.spb-leaflet-map .leaflet-tile-loaded {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Eliminate sub-pixel gaps between tiles visible during zoom/pan */
.spb-leaflet-map .leaflet-tile {
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
}

.spb-leaflet-map .leaflet-control-attribution {
  color: rgba(240, 242, 237, 0.45);
  background: rgba(3, 7, 4, 0.55);
  font-size: 10px;
}

.spb-leaflet-map .spb-admin-district-polygon {
  stroke-dasharray: 10 8;
  stroke-dashoffset: 0;
  stroke-opacity: 0.55;
  fill-opacity: 0;
  vector-effect: non-scaling-stroke;
  animation: none;
  filter: none;
}

/* Black curtain — donut GeoJSON in blackoutPane (z-index 385).
   fill-rule:evenodd makes the district ring punch a transparent hole in the world fill. */
.blackoutPane path {
  fill-rule: evenodd !important;
}

@keyframes spb-district-march {
  to { stroke-dashoffset: -18; }
}

.spb-admin-district-label {
  border: 0;
  background: transparent;
}

.spb-admin-district-label-btn {
  padding: 6px 13px;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent, #c8ff00) 50%, transparent);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(2, 5, 4, 0.78);
  backdrop-filter: blur(6px);
  box-shadow:
    0 0 8px color-mix(in srgb, var(--map-filter-accent, #c8ff00) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 1);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transform: translateY(3px) translateX(-50%);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms, border-color 180ms, box-shadow 180ms;
}

.spb-admin-district-label-btn:hover {
  color: #fff;
  background: rgba(2, 8, 5, 0.88);
  border-color: color-mix(in srgb, var(--map-filter-accent, #c8ff00) 80%, transparent);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--map-filter-accent, #c8ff00) 40%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.spb-map-shell[data-map-ui-zoom="1"] .spb-admin-district-label-btn,
.spb-map-shell[data-map-ui-zoom="2"] .spb-admin-district-label-btn,
.spb-map-shell[data-map-ui-zoom="3"] .spb-admin-district-label-btn,
.spb-map-shell[data-map-ui-zoom="4"] .spb-admin-district-label-btn,
.spb-map-shell[data-map-ui-zoom="5"] .spb-admin-district-label-btn,
.spb-map-shell[data-map-ui-zoom="6"] .spb-admin-district-label-btn,
.spb-map-shell[data-map-ui-zoom="7"] .spb-admin-district-label-btn {
  opacity: 0.82;
  transform: translateY(0) translateX(-50%);
}

/* ── District selection state ──────────────────────────────────────────────── */

/* All non-selected polygons: keep invisible (base rule already hides them) */
.has-district-selected .spb-admin-district-polygon {
  stroke-opacity: 0 !important;
  fill-opacity: 0 !important;
  animation: none !important;
  filter: none !important;
}

/* ONLY the clicked district gets a glowing animated border */
.has-district-selected .spb-admin-district-polygon.is-selected {
  stroke-opacity: 1 !important;
  fill-opacity: 0 !important;
  animation: spb-district-march 1.2s linear infinite !important;
  filter:
    drop-shadow(0 0 12px var(--map-filter-accent, #c8ff00))
    drop-shadow(0 0 30px color-mix(in srgb, var(--map-filter-accent, #c8ff00) 55%, transparent))
    drop-shadow(0 0 60px color-mix(in srgb, var(--map-filter-accent, #c8ff00) 25%, transparent)) !important;
}

/* Non-selected labels: fully invisible + not clickable */
.has-district-selected .spb-admin-district-label:not(.is-selected-label) .spb-admin-district-label-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Selected label: hidden on map (name visible in info panel) */
.has-district-selected .spb-admin-district-label.is-selected-label .spb-admin-district-label-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Non-selected business point markers: fully hidden when district is active */
.has-district-selected .map-point-marker:not(.is-in-selected-district) {
  opacity: 0 !important;
  pointer-events: none !important;
  filter: none !important;
}

/* Points inside the selected district: fully visible + clickable */
.has-district-selected .map-point-marker.is-in-selected-district {
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
}

/* Keep markers inside the selected district fully interactive */
.has-district-selected .map-point-marker.is-in-selected-district {
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
}

/* Pop selected label — hidden while district is open (name shown in panel) */
.has-district-selected .spb-admin-district-label.is-selected-label .spb-admin-district-label-btn {
  opacity: 0 !important;
  pointer-events: none !important;
  color: #fff;
  background: rgba(2, 8, 5, 0.92);
  border-color: var(--map-filter-accent, #c8ff00);
  box-shadow:
    0 0 20px color-mix(in srgb, var(--map-filter-accent, #c8ff00) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px) translateX(-50%) scale(1.08) !important;
}

.spb-map-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(var(--map-filter-tint), rgba(3, 6, 4, 0.06));
}

.map-zoom-control {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  grid-template-columns: 38px 38px auto;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent) 66%, #ffffff 8%);
  border-radius: 6px;
  background: rgba(3, 7, 4, 0.9);
  box-shadow: 0 0 18px color-mix(in srgb, var(--map-filter-accent) 24%, transparent);
  backdrop-filter: blur(8px);
}

.map-zoom-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent) 72%, #ffffff 8%);
  border-radius: 5px;
  color: #fff;
  background: color-mix(in srgb, var(--map-filter-accent) 18%, rgba(3, 7, 4, 0.8));
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.map-zoom-button:hover,
.map-zoom-button:focus-visible {
  color: var(--map-filter-accent);
  background: rgba(3, 7, 4, 0.92);
  outline: none;
}

.map-zoom-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.map-zoom-control span {
  min-width: 52px;
  color: #eef5ea;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.coordinate-search-marker-host {
  border: 0;
  background: transparent;
}

.coordinate-search-marker {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid var(--map-filter-accent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--map-filter-accent) 13%, rgba(3, 7, 4, 0.82));
  box-shadow: 0 0 22px color-mix(in srgb, var(--map-filter-accent) 64%, transparent);
}

.coordinate-search-marker::before,
.coordinate-search-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--map-filter-accent);
  transform: translate(-50%, -50%);
}

.coordinate-search-marker::before {
  width: 28px;
  height: 1px;
}

.coordinate-search-marker::after {
  width: 1px;
  height: 28px;
}

.coordinate-search-marker i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--map-filter-accent);
  transform: translate(-50%, -50%);
}

.map-marker-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.custom-map-marker-host {
  border: 0;
  background: transparent;
}

.custom-map-marker-shell {
  position: relative;
  width: 260px;
  padding-top: 24px;
  pointer-events: none;
}

.custom-map-marker-pin {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--map-filter-accent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--map-filter-accent) 82%, transparent);
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
}

.custom-map-marker-shell.is-selected .custom-map-marker-pin {
  width: 14px;
  height: 14px;
  background: #fff;
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--map-filter-accent) 22%, transparent),
    0 0 28px color-mix(in srgb, var(--map-filter-accent) 92%, transparent);
}

.custom-map-marker-shell::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 13px;
  width: 1px;
  height: 13px;
  background: color-mix(in srgb, var(--map-filter-accent) 72%, transparent);
  transform: translateX(-50%);
}

.spb-map-shell:not([data-map-ui-zoom="7"]) .custom-map-marker-shell::after,
.spb-map-shell:not([data-map-ui-zoom="7"]) .custom-map-marker {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.custom-map-marker {
  position: relative;
  width: 260px;
  min-width: 188px;
  max-width: 260px;
  padding: 11px 34px 12px 13px;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent) 72%, #ffffff 12%);
  border-radius: 7px;
  color: #eef5ea;
  background: rgba(3, 7, 4, 0.88);
  box-shadow: 0 0 20px color-mix(in srgb, var(--map-filter-accent) 22%, transparent), inset 0 0 18px color-mix(in srgb, var(--map-filter-accent) 8%, transparent);
  pointer-events: auto;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: opacity 140ms ease, visibility 140ms ease;
}

.custom-map-marker-shell.is-selected .custom-map-marker {
  border-color: #fff;
  box-shadow:
    0 0 24px color-mix(in srgb, var(--map-filter-accent) 42%, transparent),
    inset 0 0 20px color-mix(in srgb, var(--map-filter-accent) 12%, transparent);
}

.custom-map-marker::after {
  display: none;
}

.custom-map-marker::before {
  display: none;
}

.custom-map-marker strong {
  display: block;
  color: var(--map-filter-accent);
  font-size: 12px;
  line-height: 1.25;
  text-transform: uppercase;
}

.custom-map-marker-details {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.custom-map-marker-details li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.custom-map-marker-details b {
  color: var(--map-filter-accent);
  font-size: 12px;
  line-height: 1.25;
}

.custom-map-marker-details span {
  display: block;
  color: #dfe7da;
  font-size: 10.5px;
  line-height: 1.32;
}

.custom-map-marker-delete {
  position: absolute;
  right: 7px;
  top: 7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(154, 212, 0, 0.4);
  border-radius: 4px;
  color: #e5eddf;
  background: rgba(3, 7, 4, 0.76);
  font-size: 13px;
  line-height: 1;
}

.custom-map-marker-delete:hover,
.custom-map-marker-delete:focus-visible {
  border-color: var(--acid-2);
  color: var(--acid-2);
  outline: none;
}

.map-placement-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  background:
    linear-gradient(90deg, rgba(200, 255, 0, 0.12) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(200, 255, 0, 0.1) 1px, transparent 1px) 0 0 / 36px 36px,
    rgba(3, 6, 4, 0.08);
  cursor: crosshair;
}

.spb-map-shell.is-placing .map-placement-layer {
  display: block;
}

.spb-map-shell.is-placing::after {
  content: "Кликните по карте, чтобы поставить метку";
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 6;
  padding: 9px 12px;
  border: 1px solid rgba(200, 255, 0, 0.56);
  border-radius: 5px;
  color: var(--acid-2);
  background: rgba(3, 7, 4, 0.86);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  pointer-events: none;
}

.map-marker-editor {
  position: static;
  z-index: auto;
  display: grid;
  gap: 10px;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 14px;
  border: 1px solid rgba(200, 255, 0, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(154, 212, 0, 0.12), transparent 58%),
    rgba(3, 7, 4, 0.94);
  box-shadow: 0 0 28px rgba(154, 212, 0, 0.2);
  transform: none;
}

.map-marker-editor.is-above {
  transform: none;
}

.map-marker-editor-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.24);
}

.map-marker-editor-head strong {
  color: var(--acid-2);
  font-size: 13px;
  text-transform: uppercase;
}

.map-marker-editor-head output {
  color: #dce7d6;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.map-marker-editor label,
.map-marker-editor label span {
  display: grid;
  gap: 6px;
}

.map-marker-editor label span {
  color: var(--acid-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-marker-editor input,
.map-marker-editor textarea,
.map-marker-editor select {
  width: 100%;
  border: 1px solid rgba(154, 212, 0, 0.42);
  border-radius: 5px;
  color: #f0f2ed;
  background: rgba(1, 4, 2, 0.74);
  font: inherit;
  font-size: 13px;
}

.map-marker-editor input,
.map-marker-editor select {
  height: 36px;
  padding: 0 10px;
}

.map-marker-editor textarea {
  min-height: 74px;
  padding: 10px;
  resize: vertical;
}

.map-marker-image-field {
  display: grid;
  gap: 8px;
}

.map-marker-image-field > span {
  color: var(--acid-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-marker-image-preview {
  min-height: 132px;
}

.map-marker-image-preview.has-image {
  border-style: solid;
}

.map-marker-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-marker-image-actions .map-action-button {
  margin: 0;
  cursor: pointer;
}

.map-marker-editor input:focus,
.map-marker-editor textarea:focus,
.map-marker-editor select:focus {
  border-color: var(--acid-2);
  box-shadow: 0 0 14px rgba(154, 212, 0, 0.18);
  outline: none;
}

.universe-zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zone-card {
  padding: 18px;
}

.zone-card > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(154, 212, 0, 0.58);
  border-radius: 6px;
  color: var(--acid-2);
  font-family: var(--font-mono);
  font-weight: 900;
}

.zone-card h3 {
  margin: 16px 0 8px;
  color: var(--acid-2);
  font-size: 18px;
  text-transform: uppercase;
}

.zone-card p {
  margin: 0;
  color: #d3dbcf;
  font-size: 13px;
  line-height: 1.6;
}

.zone-card ul,
.route-list,
.intel-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.zone-card li {
  color: #f0f2ed;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.zone-card li::before {
  content: "•";
  margin-right: 8px;
  color: var(--acid-2);
}

.universe-right .panel {
  padding: 18px;
}

.route-list li,
.intel-list li {
  display: grid;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.16);
}

.route-list strong,
.intel-list strong {
  color: var(--acid-2);
  font-family: var(--font-mono);
  font-size: 12px;
}

.route-list span,
.intel-list span {
  color: #e1e7dc;
  font-size: 12px;
  line-height: 1.45;
}

.intel-list li {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.universe-right .outline-action {
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 1500px) {
  .spb-map-shell {
    min-height: 590px;
  }
}

@media (max-width: 1220px) {
  .admin-grid,
  .admin-character-list,
  .admin-market-form {
    grid-template-columns: 1fr;
  }

  .universe-zone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-workbench {
    grid-template-columns: 1fr;
  }

  .map-marker-side-panel {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .tokenization-summary,
  .tokenization-economy,
  .token-market-row,
  .tok-grid {
    grid-template-columns: 1fr;
  }

  .token-market-row {
    gap: 6px;
    padding: 12px;
  }

  .universe-stats,
  .universe-zone-grid,
  .map-filter-bar,
  .map-toolbar {
    grid-template-columns: 1fr;
  }

  .map-chips {
    justify-content: flex-start;
  }

  .map-tools {
    justify-items: stretch;
  }

  .map-coordinate-label,
  .map-coordinate-search output {
    text-align: left;
  }

  .map-coordinate-row {
    grid-template-columns: 1fr;
  }

  .map-marker-actions,
  .map-marker-editor-actions {
    justify-content: flex-start;
  }

  .spb-map-shell {
    min-height: 560px;
  }
}

/* Shared exchange-like surface for registry, map and AI agents. */
.characters-page,
.universe-page,
.agents-page {
  --directory-panel: rgba(10, 10, 10, 0.94);
  --directory-panel-soft: rgba(18, 18, 18, 0.84);
  --directory-line: rgba(255, 255, 255, 0.16);
  --directory-line-strong: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 86px 86px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 86px 86px,
    radial-gradient(circle at 48% -10%, rgba(255, 255, 255, 0.09), transparent 36%),
    #030303;
}

/* Ширину не сужаем: страницы используют общий .page-shell (min(1920px, 100%)).
   Раньше здесь стоял min(1780px, 100%) — «Фигуры» и «Агенты» были уже
   остальных вкладок, и на 1920 это давало пустые поля по краям. */

:is(.characters-page, .universe-page, .agents-page) .topbar {
  min-height: 74px;
  border-bottom-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 28%, rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.9);
}

:is(.characters-page, .universe-page, .agents-page) .main-nav a.active,
:is(.characters-page, .universe-page, .agents-page) .main-nav a:hover {
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.24);
}

:is(.characters-page, .universe-page, .agents-page) .layout {
  gap: 14px;
  padding: 14px 20px 58px;
}

:is(.characters-page, .universe-page, .agents-page) .left-rail,
:is(.characters-page, .universe-page, .agents-page) .right-rail,
:is(.characters-page, .universe-page, .agents-page) .content,
.characters-page .registry-content {
  gap: 14px;
}

:is(.characters-page, .universe-page, .agents-page) .left-rail .panel,
:is(.characters-page, .universe-page, .agents-page) .right-rail .panel,
.characters-page .registry-content,
.universe-page .universe-hero,
.universe-page .spb-map-panel,
.universe-page .universe-zone,
.agents-page .agents-hero,
.agents-page .agents-quote,
.agents-page .ai-agent-card {
  border-color: var(--directory-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 46%),
    var(--directory-panel);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.025), 0 18px 42px rgba(0, 0, 0, 0.32);
}

:is(.characters-page, .universe-page, .agents-page) .left-rail .panel::before,
:is(.characters-page, .universe-page, .agents-page) .right-rail .panel::before,
.characters-page .registry-content::before,
.universe-page .universe-hero::before,
.universe-page .spb-map-panel::before,
.universe-page .universe-zone::before,
.agents-page .agents-hero::before,
.agents-page .agents-quote::before,
.agents-page .ai-agent-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px) 0 0 / 100% 28px;
  opacity: 0.28;
}

:is(.characters-page, .universe-page, .agents-page) .panel h2,
.characters-page .registry-hero h1,
.universe-page .universe-hero h1,
.agents-page .agents-hero h1 {
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.22);
}

.characters-page .registry-content {
  padding: 20px;
}

.characters-page .registry-hero,
.universe-page .universe-hero,
.agents-page .agents-hero {
  position: relative;
  overflow: hidden;
}

.characters-page .registry-hero {
  padding: 2px 0 18px;
}

.characters-page .registry-hero::after,
.universe-page .universe-hero::after,
.agents-page .agents-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 18px, transparent 18px 36px);
  opacity: 0.13;
}

.characters-page .registry-hero > *,
.universe-page .universe-hero > *,
.agents-page .agents-hero > * {
  position: relative;
  z-index: 1;
}

.characters-page .registry-kicker,
.universe-page .registry-kicker,
.agents-page .breadcrumb {
  color: rgba(255, 255, 255, 0.66);
}

.characters-page .registry-hero h1,
.universe-page .universe-hero h1,
.agents-page .agents-hero h1 {
  max-width: 860px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: clamp(42px, 5.6vw, 86px);
  line-height: 0.84;
  letter-spacing: 0;
  text-transform: uppercase;
}

.characters-page .registry-hero p:last-child,
.universe-page .universe-hero > p:not(.breadcrumb):not(.registry-kicker),
.agents-page .agents-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.characters-page .registry-search,
.characters-page .registry-sort,
.characters-page .registry-tabs,
.universe-page .universe-stat,
.universe-page .map-coordinate-search,
.universe-page .map-filter-button,
.universe-page .map-action-button,
.agents-page .agent-tags span,
.agents-page .agent-buy {
  border-color: var(--directory-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(10, 10, 10, 0.72);
}

.characters-page .registry-search:focus-within,
.characters-page .registry-sort:focus-within,
.characters-page .registry-load:hover,
.universe-page .map-coordinate-search:focus-within,
.universe-page .map-action-button:hover,
.agents-page .agent-buy:hover {
  border-color: var(--directory-line-strong);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.035);
}

.characters-page .registry-filter {
  min-height: 48px;
  border-right-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.68);
  background: rgba(8, 8, 8, 0.66);
}

.characters-page .registry-filter:hover,
.characters-page .registry-filter.is-active {
  color: #050505;
  background: #fff;
}

.characters-page .registry-load,
:is(.characters-page, .universe-page, .agents-page) .outline-action {
  border-color: var(--directory-line-strong);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018));
}

.characters-page .registry-load strong {
  color: #fff;
}

.characters-page .character-card {
  --character-accent: var(--acid-2);
  min-height: 350px;
  border-color: color-mix(in srgb, var(--character-accent) 54%, rgba(255, 255, 255, 0.16));
  background:
    radial-gradient(circle at 76% 44%, color-mix(in srgb, var(--character-accent) 18%, transparent), transparent 33%),
    linear-gradient(145deg, color-mix(in srgb, var(--character-accent) 7%, transparent), transparent 52%),
    rgba(8, 8, 8, 0.95);
  box-shadow:
    inset 0 0 28px color-mix(in srgb, var(--character-accent) 7%, transparent),
    0 18px 38px rgba(0, 0, 0, 0.34);
}

.characters-page .character-card::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--character-accent) 4%, transparent), transparent) -80px 0 / 170px 100%;
}

.characters-page .character-card::after {
  border-color: color-mix(in srgb, var(--character-accent) 72%, rgba(255, 255, 255, 0.12));
}

.characters-page .character-card h2,
.characters-page .character-index,
.characters-page .character-meta dt,
.characters-page .character-more svg,
.characters-page .character-orbit span {
  color: var(--character-accent);
}

.characters-page .character-index,
.characters-page .character-more,
.characters-page .character-orbit {
  border-color: color-mix(in srgb, var(--character-accent) 66%, rgba(255, 255, 255, 0.12));
}

.characters-page .character-orbit img {
  filter: saturate(1.08) contrast(1.06) brightness(0.96);
}

.characters-page .character-orbit {
  background:
    radial-gradient(circle, color-mix(in srgb, var(--character-accent) 16%, transparent) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, color-mix(in srgb, var(--character-accent) 15%, transparent) 14px 15px),
    conic-gradient(from -12deg, color-mix(in srgb, var(--character-accent) 12%, transparent), color-mix(in srgb, var(--character-accent) 36%, transparent), rgba(255, 255, 255, 0.035), color-mix(in srgb, var(--character-accent) 26%, transparent), color-mix(in srgb, var(--character-accent) 10%, transparent));
  box-shadow:
    0 0 28px color-mix(in srgb, var(--character-accent) 16%, transparent),
    inset 0 0 34px color-mix(in srgb, var(--character-accent) 12%, transparent);
}

.characters-page .character-orbit::before,
.characters-page .character-orbit::after,
.characters-page .character-meta div::after {
  border-color: color-mix(in srgb, var(--character-accent) 34%, transparent);
}

.characters-page .character-meta div::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--character-accent) 32%, transparent), transparent);
}

.characters-page .status-dot {
  background: var(--character-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--character-accent) 72%, transparent);
}

.characters-page .character-more:hover {
  color: var(--character-accent);
  background: color-mix(in srgb, var(--character-accent) 10%, rgba(255, 255, 255, 0.02));
}

.characters-page .character-card.is-fuchsia { --character-accent: #ff4fd8; }
.characters-page .character-card.is-purple { --character-accent: #c8a7ff; }
.characters-page .character-card.is-blue { --character-accent: #75ccff; }
.characters-page .character-card.is-flesh { --character-accent: #ffb078; }
.characters-page .character-card.is-rose { --character-accent: #ffd166; }
.characters-page .character-card.is-crimson { --character-accent: #ffd447; }
.characters-page .character-card.is-gold { --character-accent: #f5c64a; }

.universe-page .universe-stat {
  min-height: 96px;
  border-radius: 8px;
}

.universe-page .universe-stat strong {
  color: #fff;
  font-size: 34px;
}

.universe-page .spb-map-panel {
  padding: 20px;
}

.universe-page .spb-map-shell {
  border-color: color-mix(in srgb, var(--map-filter-accent) 64%, rgba(255, 255, 255, 0.14));
  background:
    radial-gradient(circle at 48% 42%, var(--map-filter-tint), transparent 44%),
    linear-gradient(135deg, color-mix(in srgb, var(--map-filter-accent) 12%, transparent), transparent 58%),
    #050505;
  box-shadow:
    inset 0 0 44px color-mix(in srgb, var(--map-filter-accent) 12%, transparent),
    0 0 26px color-mix(in srgb, var(--map-filter-accent) 16%, transparent);
}

.universe-page .map-marker-side-panel {
  border: 1px solid var(--directory-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 50%),
    rgba(10, 10, 10, 0.88);
  padding: 12px;
}

.universe-page .map-filter-button:hover,
.universe-page .map-filter-button:focus-visible,
.universe-page .map-filter-button.is-active {
  border-color: var(--filter-color, #fff);
  color: #fff;
  box-shadow: 0 0 18px color-mix(in srgb, var(--filter-color, #fff) 26%, transparent);
}

.agents-page .agents-hero,
.agents-page .ai-agent-card,
.agents-page .agents-quote {
  border-color: color-mix(in srgb, var(--acid-2) 50%, rgba(255, 255, 255, 0.14));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--acid-2) 7%, transparent), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 46%),
    rgba(10, 7, 10, 0.94);
}

.agents-page .agents-hero h1,
.agents-page .agent-copy h3,
.agents-page .agents-quote > span,
.agents-page .agents-quote strong,
.agents-page .agent-number,
.agents-page .agent-status {
  color: var(--acid-2);
}

.agents-page .ai-agent-card {
  min-height: 255px;
  border-radius: 8px;
  box-shadow:
    inset 0 0 30px color-mix(in srgb, var(--acid-2) 4%, transparent),
    0 18px 42px rgba(0, 0, 0, 0.34);
}

.agents-page .agent-symbol {
  width: 140px;
  border-color: color-mix(in srgb, var(--acid-2) 70%, rgba(255, 255, 255, 0.1));
  background:
    radial-gradient(circle at 52% 44%, color-mix(in srgb, var(--acid-2) 18%, transparent), transparent 35%),
    rgba(8, 8, 8, 0.72);
  box-shadow: 0 0 28px color-mix(in srgb, var(--acid-2) 16%, transparent);
}

.agents-page .agent-tags span,
.agents-page .agent-buy {
  border-color: color-mix(in srgb, var(--acid-2) 44%, rgba(255, 255, 255, 0.14));
}

@media (max-width: 1500px) {
  .agents-page .agents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1220px) {
  :is(.characters-page, .universe-page, .agents-page) .layout {
    grid-template-columns: 1fr;
  }

  .universe-page .map-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :is(.characters-page, .universe-page, .agents-page) .layout {
    padding: 10px;
  }

  .characters-page .registry-content,
  .universe-page .spb-map-panel {
    padding: 12px;
  }

  .characters-page .registry-hero h1,
  .universe-page .universe-hero h1,
  .agents-page .agents-hero h1 {
    font-size: 38px;
  }

  .characters-page .character-grid,
  .agents-page .agents-grid {
    grid-template-columns: 1fr;
  }

  .characters-page .registry-tools,
  .characters-page .registry-hero,
  .universe-page .universe-stats,
  .universe-page .map-filter-bar {
    grid-template-columns: 1fr;
  }
}

.character-card.is-gold {
  border-color: rgba(245, 198, 74, 0.68);
  background:
    radial-gradient(circle at 74% 44%, rgba(24, 220, 135, 0.14), transparent 34%),
    radial-gradient(circle at 18% 18%, rgba(245, 198, 74, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(245, 198, 74, 0.07), transparent 52%),
    rgba(8, 12, 8, 0.94);
}

.character-card.is-gold h2,
.character-card.is-gold .character-index,
.character-card.is-gold .character-meta dt,
.character-card.is-gold .character-more svg,
.character-card.is-gold .character-orbit span,
.character-card.is-gold .character-photo-placeholder,
.character-card.is-gold .character-panel-archetype-label {
  color: #f5c64a;
}

/* Immersive city-map workspace: map remains the engine-driven canvas, panels are view-only overlays. */
.universe-map-fullscreen {
  overflow: hidden;
  background: #020403;
}

.universe-map-fullscreen .scanline {
  z-index: 45;
  opacity: 0.18;
}

.universe-map-fullscreen .page-shell {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.universe-map-fullscreen .topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  min-height: 74px;
  padding-inline: 22px;
  background: rgba(2, 4, 3, 0.83);
  backdrop-filter: blur(18px);
}

.universe-map-fullscreen .universe-layout {
  display: block;
  min-height: 100vh;
  padding: 0;
}

.universe-map-fullscreen .content,
.universe-map-fullscreen .universe-content,
.universe-map-fullscreen .spb-map-panel,
.universe-map-fullscreen .map-workbench {
  display: contents;
}

.universe-map-fullscreen .spb-map-panel::before {
  display: none;
}

.universe-map-fullscreen .spb-map-shell {
  position: fixed;
  inset: 74px 0 0;
  z-index: 1;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 70px color-mix(in srgb, var(--map-filter-accent) 16%, transparent);
}

.universe-map-fullscreen .spb-map-shell::before {
  opacity: 0.28;
}

.universe-map-fullscreen .left-rail,
.universe-map-fullscreen .universe-right,
.universe-map-fullscreen .universe-hero,
.universe-map-fullscreen .map-toolbar,
.universe-map-fullscreen .map-marker-side-panel {
  position: fixed;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.universe-map-fullscreen .left-rail {
  left: 18px;
  top: 90px;
  width: 238px;
  gap: 12px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  max-height: calc(100vh - 110px);
}

.universe-map-fullscreen .left-rail .panel,
.universe-map-fullscreen .right-rail .panel,
.universe-map-fullscreen .universe-hero,
.universe-map-fullscreen .map-marker-side-panel,
.universe-map-fullscreen .map-toolbar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 48%),
    rgba(5, 8, 7, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.universe-map-fullscreen .left-rail > .panel {
  flex: 0 0 auto;
}

.universe-map-fullscreen .universe-hero {
  left: 272px;
  top: 90px;
  width: min(520px, calc(100vw - 1120px));
  min-width: 420px;
  padding: 15px 18px 16px;
  border-color: rgba(255, 255, 255, 0.18);
}

.universe-map-fullscreen .universe-hero::after {
  height: 34px;
}

.universe-map-fullscreen .universe-hero .breadcrumb {
  margin: 0 0 10px;
}

.universe-map-fullscreen .universe-hero h1 {
  max-width: none;
  font-size: clamp(38px, 3.4vw, 58px);
  line-height: 0.9;
}

.universe-map-fullscreen .universe-hero > p:not(.breadcrumb):not(.registry-kicker) {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.universe-map-fullscreen .universe-stats {
  gap: 7px;
  margin-top: 14px;
}

.universe-map-fullscreen .universe-stat {
  min-height: 60px;
  padding: 10px 12px;
}

.universe-map-fullscreen .universe-stat strong {
  font-size: 24px;
}

.universe-map-fullscreen .universe-stat span {
  margin-top: 5px;
  font-size: 9px;
}

.universe-map-fullscreen .map-toolbar {
  top: 90px;
  left: 272px;
  right: auto;
  width: 308px;
  display: block;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.universe-map-fullscreen .map-toolbar > div:first-child {
  display: none;
}

.universe-map-fullscreen .map-tools,
.universe-map-fullscreen .map-coordinate-search {
  width: 100%;
}

.universe-map-fullscreen .map-marker-actions {
  justify-content: stretch;
}

.universe-map-fullscreen .map-marker-actions .map-action-button {
  flex: 1 1 auto;
}

.universe-map-fullscreen .map-marker-side-panel {
  top: 90px;
  right: 18px;
  bottom: 20px;
  width: 328px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  border-color: color-mix(in srgb, var(--map-filter-accent, #c8ff00) 42%, rgba(255, 255, 255, 0.16));
}

/* Паспорт объекта — центрированный прямоугольный блок с затемнением фона,
   как в match-map.html (режим 1×1), а не докованная боковая панель.
   0 0 0 100vmax — приём match-map.css: одна box-shadow-тень покрывает весь
   вьюпорт затемнением, без отдельного div-оверлея. */
.universe-map-fullscreen .map-point-panel[aria-hidden="false"] {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
  min-height: 0;
  z-index: 2000;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  backdrop-filter: blur(14px);
  background:
    radial-gradient(circle at 18% 0%, rgba(var(--rarity-rgb), 0.09), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 48%),
    rgba(6, 8, 8, 0.97);
  box-shadow:
    0 0 0 100vmax rgba(0, 3, 5, 0.72),
    0 28px 76px rgba(0, 0, 0, 0.6),
    inset 2px 0 0 var(--rarity);
  animation: map-point-panel-in 180ms ease-out both;
}

@keyframes map-point-panel-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.97); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.universe-map-fullscreen .map-point-panel[aria-hidden="false"] .map-point-image-wrap {
  flex: 0 0 220px;
  width: 220px;
  aspect-ratio: auto;
  height: auto;
}

.universe-map-fullscreen .map-point-panel[aria-hidden="false"] .map-point-panel-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}


.universe-map-fullscreen .map-filter-sidebar {
  flex: 0 0 auto;
  padding: 13px 12px;
}

.universe-map-fullscreen .map-filter-sidebar h2 {
  margin-bottom: 10px;
}

.universe-map-fullscreen .map-filter-bar {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.universe-map-fullscreen .map-filter-button {
  min-height: 39px;
  gap: 2px 7px;
  padding: 6px 7px;
}

.universe-map-fullscreen .map-filter-button strong {
  font-size: 9px;
}

.universe-map-fullscreen .map-filter-button em {
  font-size: 8px;
}

.universe-map-fullscreen .map-zoom-control {
  top: 16px;
  right: 364px;
  z-index: 10;
}

.universe-map-fullscreen .universe-zone-grid {
  display: none;
}

.universe-map-fullscreen .world-state-inspector {
  display: none !important;
}

@media (max-width: 1540px) {
  .universe-map-fullscreen .map-toolbar {
    width: 284px;
  }
}

@media (max-width: 1120px) {
  .universe-map-fullscreen .left-rail {
    display: block;
    left: 14px;
    top: auto;
    bottom: 14px;
    width: 214px;
    max-height: min(62vh, 520px);
    padding: 0;
  }

  .universe-map-fullscreen .map-toolbar {
    top: 86px;
    left: 14px;
    right: auto;
    width: min(410px, calc(100vw - 370px));
  }

  .universe-map-fullscreen .map-marker-side-panel {
    top: 86px;
    right: 14px;
    bottom: 14px;
    width: 330px;
  }

  .universe-map-fullscreen .map-zoom-control {
    right: 360px;
  }
}

@media (max-width: 760px) {
  .universe-map-fullscreen {
    overflow-y: auto;
  }

  .universe-map-fullscreen .topbar {
    position: sticky;
  }

  .universe-map-fullscreen .spb-map-shell {
    inset: 68px 0 0;
  }

  .universe-map-fullscreen .map-toolbar {
    top: 82px;
    left: 10px;
    bottom: auto;
    width: calc(100% - 20px);
  }

  .universe-map-fullscreen .left-rail {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 168px;
  }

  .universe-map-fullscreen .map-filter-sidebar .map-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .universe-map-fullscreen .map-marker-side-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 188px;
    width: auto;
    max-height: min(42vh, 330px);
  }

  .universe-map-fullscreen .map-point-panel[aria-hidden="false"] {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 188px;
    width: auto;
    max-height: min(42vh, 330px);
    transform: none;
    flex-direction: column;
  }

  .universe-map-fullscreen .map-point-panel[aria-hidden="false"] .map-point-image-wrap {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1080 / 640;
  }

  .universe-map-fullscreen .map-zoom-control {
    right: 10px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Geo cockpit — единый блок «чат с инструментами» (левая панель).
   Объединяет ALTG-сетку, поиск/добавление точки/пикер и гео-агента.
   ───────────────────────────────────────────────────────────────────────── */
.universe-map-fullscreen .left-rail {
  left: 18px;
  top: 90px;
  bottom: 20px;
  width: 384px;
  max-height: none;
  height: auto;
  overflow: visible;
  padding: 0;
  gap: 0;
  display: flex;
}

/* инструменты переехали в кокпит — отдельный тулбар больше не нужен */
.universe-map-fullscreen .map-toolbar { display: none; }

.geo-cockpit {
  --ck-accent: #e9e9ee;
  --ck-soft: #a9a9b2;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-mono);
}

/* выигрываем у .universe-map-fullscreen .left-rail .panel (фон/тень/flex) */
.universe-map-fullscreen .left-rail > .panel.geo-cockpit {
  flex: 1 1 auto;
  padding: 0;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(130% 55% at 50% -12%, rgba(255, 255, 255, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(13, 14, 18, 0.95), rgba(6, 7, 10, 0.97));
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cockpit-accent {
  height: 3px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--ck-accent), transparent 72%);
}

/* ── header ── */
.cockpit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cockpit-brand { display: flex; align-items: center; gap: 10px; }
.cockpit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ck-accent);
  box-shadow: 0 0 10px var(--ck-accent);
  animation: cockpitPulse 2.4s ease-in-out infinite;
}
@keyframes cockpitPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .cockpit-dot { animation: none; } }
.cockpit-brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.cockpit-brand-text strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ck-soft);
}
.cockpit-brand-text em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b8b94;
}
.cockpit-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ck-soft);
  white-space: nowrap;
}
.cockpit-balance-ico { align-self: center; font-size: 11px; opacity: 0.85; }
.cockpit-balance-value { font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.cockpit-balance-unit { font-size: 9.5px; letter-spacing: 0.1em; color: #8b8b94; }

/* ── tools ── */
.cockpit-tools {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cockpit-tool-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b8b94;
}
.geo-cockpit .map-coordinate-search { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; border: 0; background: none; }
.geo-cockpit .map-coordinate-row { display: flex; gap: 8px; }
.geo-cockpit .map-coordinate-search input {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: #f0ece0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.geo-cockpit .map-coordinate-search input::placeholder { color: #5f5a50; }
.geo-cockpit .map-coordinate-search input:focus {
  outline: none;
  border-color: var(--ck-accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}
.geo-cockpit .map-coordinate-search output { font-size: 12.5px; color: #8b8b94; min-height: 0; }
.geo-cockpit .map-coordinate-search output.is-error { color: #ff7a6b; }
.geo-cockpit .map-action-button {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ck-soft);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.geo-cockpit .map-action-button:hover,
.geo-cockpit .map-action-button:focus-visible {
  outline: none;
  border-color: var(--ck-accent);
  background: rgba(255, 255, 255, 0.18);
  color: #fff3d8;
}
.cockpit-tool-row { display: flex; gap: 8px; }
.cockpit-tool-row .cockpit-add { flex: 1 1 auto; }
.geo-cockpit .cockpit-pick {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #cbc3ad;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.geo-cockpit .cockpit-pick:hover,
.geo-cockpit .cockpit-pick.is-active {
  border-color: var(--ck-accent);
  color: var(--ck-soft);
  background: rgba(255, 255, 255, 0.1);
}
.geo-cockpit .cockpit-inspector {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}
.geo-cockpit .map-coord-inspector-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b8b94;
}
.geo-cockpit .map-coord-inspector-value {
  font-size: 14.5px;
  color: #c6c6ce;
  font-variant-numeric: tabular-nums;
}
.geo-cockpit .map-coord-inspector-hint { font-size: 12px; color: #8a857e; }

/* ── districts (collapsible) ── */
.cockpit-districts { flex-shrink: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.cockpit-districts-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8b8b94;
  transition: color 0.15s;
}
.cockpit-districts-summary::-webkit-details-marker { display: none; }
.cockpit-districts-summary:hover { color: var(--ck-soft); }
.cockpit-districts-chevron { font-size: 10px; transition: transform 0.2s ease; }
.cockpit-districts[open] .cockpit-districts-chevron { transform: rotate(180deg); }
.cockpit-districts .map-filter-bar {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0 14px 13px;
  max-height: 216px;
  overflow-y: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.geo-cockpit .map-filter-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 42px;
  padding: 7px 11px 7px 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.geo-cockpit .map-filter-button > span { display: none; } /* убираем emoji-иконку */
.geo-cockpit .map-filter-button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--filter-color, #8a8f92);
  box-shadow: 0 0 8px -1px var(--filter-color, #8a8f92);
}
.geo-cockpit .map-filter-button strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ddd7c7;
}
.geo-cockpit .map-filter-button em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #8b8b94;
}
.geo-cockpit .map-filter-button:hover,
.geo-cockpit .map-filter-button:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--filter-color, #8a8f92) 60%, transparent);
  background: rgba(255, 255, 255, 0.045);
}
.geo-cockpit .map-filter-button.is-active {
  border-color: var(--filter-color, var(--ck-accent));
  background: color-mix(in srgb, var(--filter-color, #8a8f92) 16%, transparent);
}
.geo-cockpit .map-filter-button.is-active strong { color: #fff; }

/* ── МО points list (appears when a district is chosen) ── */
.geo-cockpit .cockpit-points { flex-shrink: 0; margin: 0; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: transparent; box-shadow: none; }
.geo-cockpit .cockpit-points[aria-hidden="true"] { display: none; }
.geo-cockpit .cockpit-points .fpp-list { max-height: 196px; overflow-y: auto; scrollbar-width: thin; }
.geo-cockpit .cockpit-points .fpp-title { font-size: 12px; color: rgba(255, 255, 255, 0.85); }
.geo-cockpit .cockpit-points .fpp-count { font-size: 11px; color: rgba(255, 255, 255, 0.42); }
.geo-cockpit .cockpit-points .fpp-item { padding: 9px 12px; }
.geo-cockpit .cockpit-points .fpp-item-name { font-size: 13.5px; color: rgba(255, 255, 255, 0.92); }
.geo-cockpit .cockpit-points .fpp-item-meta { font-size: 11px; color: rgba(255, 255, 255, 0.45); }
.geo-cockpit .cockpit-points .fpp-item-price { font-size: 12.5px; }

/* ── chat mount ── */
.cockpit-chat {
  flex: 1 1 auto;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 14px;
  overflow: hidden;
}

@media (max-width: 1120px) {
  .universe-map-fullscreen .left-rail {
    width: 340px;
    top: 86px;
    bottom: 14px;
  }
}

.character-card.is-gold .character-index,
.character-card.is-gold .character-more,
.character-card.is-gold .character-orbit {
  border-color: rgba(245, 198, 74, 0.74);
}

.character-card.is-gold .character-orbit {
  background:
    radial-gradient(circle, rgba(255, 246, 194, 0.2) 0 4px, transparent 5px),
    repeating-radial-gradient(circle, transparent 0 13px, rgba(24, 220, 135, 0.18) 14px 15px),
    conic-gradient(from -12deg, rgba(245, 198, 74, 0.16), rgba(24, 220, 135, 0.36), rgba(255, 246, 194, 0.12), rgba(245, 198, 74, 0.36), rgba(6, 58, 38, 0.16));
}

.character-card.is-gold .status-dot {
  background: #f5c64a;
  box-shadow: 0 0 10px rgba(24, 220, 135, 0.78);
}

.theme-crypto-gold {
  --acid: #18dc87;
  --acid-2: #f5c64a;
  --line: rgba(245, 198, 74, 0.3);
  --line-strong: rgba(245, 198, 74, 0.56);
  --panel: rgba(8, 12, 8, 0.93);
  --panel-soft: rgba(15, 22, 13, 0.82);
  background:
    linear-gradient(90deg, rgba(245, 198, 74, 0.04) 1px, transparent 1px) 0 0 / 74px 74px,
    linear-gradient(0deg, rgba(24, 220, 135, 0.035) 1px, transparent 1px) 0 0 / 74px 74px,
    radial-gradient(circle at 50% 16%, rgba(245, 198, 74, 0.15), transparent 36%),
    #030604;
}

.theme-crypto-gold [data-editable="true"]:hover {
  background: rgba(245, 198, 74, 0.08);
  outline-color: rgba(245, 198, 74, 0.3);
}

.theme-crypto-gold [data-editable="true"]:focus {
  background: rgba(24, 220, 135, 0.12);
  box-shadow: 0 0 18px rgba(245, 198, 74, 0.14);
  outline-color: rgba(245, 198, 74, 0.72);
}

.theme-crypto-gold .topbar {
  border-bottom-color: rgba(245, 198, 74, 0.24);
  background: rgba(3, 6, 4, 0.92);
}

.theme-crypto-gold .panel,
.theme-crypto-gold .hero-card {
  border-color: rgba(245, 198, 74, 0.38);
  background:
    radial-gradient(circle at 86% 8%, rgba(24, 220, 135, 0.1), transparent 34%),
    linear-gradient(132deg, rgba(245, 198, 74, 0.075), transparent 28%, rgba(24, 220, 135, 0.08) 58%, transparent 84%),
    rgba(8, 12, 8, 0.93);
  box-shadow: inset 0 0 34px rgba(24, 220, 135, 0.07), 0 18px 42px rgba(0, 0, 0, 0.25);
}

.theme-crypto-gold .panel::before,
.theme-crypto-gold .hero-card::before,
.theme-crypto-gold .character-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(245, 198, 74, 0.045), transparent) 0 0 / 180px 100%,
    linear-gradient(rgba(24, 220, 135, 0.045) 1px, transparent 1px) 0 0 / 100% 28px;
}

.theme-crypto-gold .menu-list li.selected,
.theme-crypto-gold .tab.active,
.theme-crypto-gold .registry-filter.is-active {
  color: #fff9d8;
  background: linear-gradient(90deg, rgba(245, 198, 74, 0.48), rgba(24, 220, 135, 0.12));
}

.theme-crypto-gold .outline-action,
.theme-crypto-gold .photo-add,
.theme-crypto-gold .photo-clear,
.theme-crypto-gold .gallery-add,
.theme-crypto-gold .gallery-clear,
.theme-crypto-gold .music-add,
.theme-crypto-gold .music-clear {
  border-color: rgba(245, 198, 74, 0.62);
  background:
    linear-gradient(90deg, rgba(245, 198, 74, 0.13), rgba(24, 220, 135, 0.055)),
    rgba(4, 8, 5, 0.76);
}

.theme-crypto-gold .coin,
.theme-crypto-gold .owner-logo {
  color: #fff9d8;
  background:
    radial-gradient(circle at 34% 28%, #fff8d2, transparent 22%),
    conic-gradient(from 0deg, #f5c64a, #18dc87, #8a6b20, #f5c64a);
  box-shadow: 0 0 26px rgba(245, 198, 74, 0.28);
}

.theme-crypto-gold .token-art {
  border-color: rgba(245, 198, 74, 0.46);
  background:
    linear-gradient(45deg, rgba(245, 198, 74, 0.22), transparent 32%),
    linear-gradient(135deg, transparent 0 44%, rgba(24, 220, 135, 0.44) 45% 47%, transparent 48%),
    radial-gradient(circle at 70% 30%, rgba(24, 220, 135, 0.22), transparent 34%),
    rgba(5, 11, 7, 0.9);
}

.theme-crypto-gold .architect-mini,
.theme-crypto-gold .dzendex-mini,
.theme-crypto-gold .main-node .avatar {
  background:
    radial-gradient(circle at 46% 34%, #fff9d8, #f5c64a 27%, #18dc87 52%, #0b1510 78%),
    linear-gradient(135deg, rgba(245, 198, 74, 0.72), rgba(5, 26, 15, 0.95));
}

.theme-crypto-gold .matrix-field {
  background:
    repeating-linear-gradient(90deg, rgba(245, 198, 74, 0.13) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(24, 220, 135, 0.08) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 48% 46%, rgba(245, 198, 74, 0.12), transparent 38%);
}

.theme-crypto-gold .matrix-field::after {
  color: rgba(245, 198, 74, 0.2);
}

.theme-crypto-gold .matrix-field span {
  color: rgba(245, 198, 74, 0.32);
  text-shadow: 0 0 8px rgba(24, 220, 135, 0.3);
}

.theme-crypto-gold .photo-layer {
  border-color: rgba(245, 198, 74, 0.62);
  background:
    radial-gradient(circle at 50% 50%, rgba(24, 220, 135, 0.11), transparent 58%),
    rgba(5, 11, 7, 0.94);
}

.theme-crypto-gold .photo-layer::before {
  background:
    linear-gradient(90deg, rgba(245, 198, 74, 0.08), transparent 20%, transparent 80%, rgba(24, 220, 135, 0.06)),
    linear-gradient(0deg, rgba(4, 9, 5, 0.28), transparent 24%, transparent 76%, rgba(4, 9, 5, 0.24));
}

.theme-crypto-gold .hero-photo,
.theme-crypto-gold .photo-thumb img {
  background: #050b07;
}

.theme-crypto-gold .photo-thumb {
  border-color: rgba(245, 198, 74, 0.46);
  background: rgba(8, 12, 8, 0.86);
}

.theme-crypto-gold .photo-thumb.active {
  border-color: var(--acid-2);
  box-shadow: 0 0 0 1px rgba(245, 198, 74, 0.48), 0 0 16px rgba(24, 220, 135, 0.34);
}

.theme-crypto-gold .hero-copy .eyebrow {
  border-color: rgba(245, 198, 74, 0.46);
  color: #ffe9a4;
  background: rgba(24, 220, 135, 0.09);
}

.theme-crypto-gold .hero-copy h1 {
  color: #f5c64a;
  text-shadow: 0 0 30px rgba(245, 198, 74, 0.36), 0 1px 0 rgba(255, 248, 210, 0.24);
}

.theme-crypto-gold .hero-copy blockquote,
.theme-crypto-gold .meta-grid {
  border-color: rgba(245, 198, 74, 0.32);
  background:
    linear-gradient(90deg, rgba(245, 198, 74, 0.1), transparent 72%),
    rgba(4, 8, 5, 0.56);
}

.theme-crypto-gold .meta-grid div {
  border-bottom-color: rgba(245, 198, 74, 0.15);
}

.theme-crypto-gold .architect-svg {
  color: #f5c64a;
  filter: drop-shadow(0 0 28px rgba(24, 220, 135, 0.32));
}

.theme-crypto-gold .architect-svg .line {
  stroke: #fff3c2;
}

.theme-crypto-gold .architect-svg .line.accent {
  stroke: rgba(24, 220, 135, 0.9);
}

.theme-mono-exchange .exchange-token-placeholder.arut-token {
  background:
    radial-gradient(circle at 60% 25%, rgba(245, 198, 74, 0.24), transparent 26%),
    linear-gradient(140deg, rgba(24, 220, 135, 0.24), transparent 44%),
    rgba(10, 12, 8, 0.96);
}

.theme-mono-exchange .exchange-token-placeholder.arut-token span {
  border-color: rgba(245, 198, 74, 0.86);
  color: #fff3c2;
  box-shadow:
    0 0 0 8px rgba(24, 220, 135, 0.08),
    0 0 32px rgba(245, 198, 74, 0.28);
}

/* ── Persistent Audio Mini-Player ── */
/* ── Mini-Player keyframes ─────────────────────────────────── */
@keyframes mpScan {
  from { transform: translateX(-100%); }
  to   { transform: translateX(250%); }
}
@keyframes mpGlow {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}
@keyframes mpPulse {
  0%, 100% { opacity: 0.45; filter: none; }
  50%       { opacity: 0.9; filter: drop-shadow(0 0 6px rgba(154, 212, 0, 0.5)); }
}

/* ── Mini-Player (floating glass pill) ─────────────────────── */
#alterego-mini-player {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(680px, calc(100vw - 40px));
  height: 58px;
  padding: 0 10px 0 18px;
  background: linear-gradient(
    135deg,
    rgba(10, 18, 10, 0.78) 0%,
    rgba(5, 10, 5, 0.90) 50%,
    rgba(10, 20, 10, 0.78) 100%
  );
  backdrop-filter: blur(48px) saturate(1.8) brightness(1.08);
  -webkit-backdrop-filter: blur(48px) saturate(1.8) brightness(1.08);
  border-radius: 16px;
  border: 1px solid rgba(154, 212, 0, 0.14);
  box-shadow:
    inset 0  1px 0 rgba(154, 212, 0, 0.07),
    inset 0  0   0 1px rgba(255, 255, 255, 0.035),
    0  8px 32px rgba(0, 0, 0, 0.58),
    0  2px  8px rgba(0, 0, 0, 0.35),
    0  0   48px rgba(154, 212, 0, 0.04);
  transition:
    transform   0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow   0.3s ease;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--font-mono);
}

#alterego-mini-player:hover {
  border-color: rgba(154, 212, 0, 0.22);
  box-shadow:
    inset 0  1px 0 rgba(154, 212, 0, 0.11),
    inset 0  0   0 1px rgba(255, 255, 255, 0.05),
    0 10px 40px rgba(0, 0, 0, 0.65),
    0  3px 10px rgba(0, 0, 0, 0.4),
    0  0   64px rgba(154, 212, 0, 0.07);
}

/* Animated top-edge glow line */
#alterego-mini-player::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(154, 212, 0, 0.5) 35%,
    rgba(200, 255, 50, 0.95) 50%,
    rgba(154, 212, 0, 0.5) 65%,
    transparent
  );
  filter: blur(0.5px);
  animation: mpGlow 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* Slow scan sweep */
#alterego-mini-player::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 35%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(154, 212, 0, 0.028) 50%,
    transparent
  );
  animation: mpScan 9s linear infinite;
  pointer-events: none;
}

#alterego-mini-player.mini-player--visible {
  transform: translateX(-50%) translateY(0);
}

/* Music note icon */
.mini-player-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  color: rgba(154, 212, 0, 0.65);
  animation: mpPulse 2.8s ease-in-out infinite;
}

/* Track info — stacked */
.mini-player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.mini-player-name {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.mini-player-time {
  display: block;
  font-size: 9.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.07em;
  color: rgba(154, 212, 0, 0.58);
  font-style: normal;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Button base */
.mini-player-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0;
  outline: none;
  transition:
    background    0.2s ease,
    border-color  0.2s ease,
    color         0.2s ease,
    box-shadow    0.2s ease,
    transform     0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

/* Play / pause — primary */
.mini-player-toggle {
  width: 44px;
  height: 44px;
  font-size: 13px;
  background: rgba(154, 212, 0, 0.06);
  border: 1.5px solid rgba(154, 212, 0, 0.28);
  color: rgba(154, 212, 0, 0.78);
  box-shadow:
    inset 0  1px 0 rgba(154, 212, 0, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.mini-player-toggle:hover,
.mini-player-toggle:focus-visible {
  background: rgba(154, 212, 0, 0.12);
  border-color: rgba(154, 212, 0, 0.62);
  color: rgb(220, 255, 100);
  transform: scale(1.07);
  box-shadow:
    0  0 18px rgba(154, 212, 0, 0.22),
    0  0  5px rgba(154, 212, 0, 0.12),
    inset 0  1px 0 rgba(154, 212, 0, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.mini-player-toggle:active {
  transform: scale(0.93);
  transition-duration: 0.07s;
}

/* Close — minimal, secondary */
.mini-player-close {
  width: 30px;
  height: 30px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.28);
}

.mini-player-close:hover,
.mini-player-close:focus-visible {
  background: rgba(255, 50, 50, 0.08);
  border-color: rgba(255, 80, 80, 0.28);
  color: rgba(255, 110, 110, 0.82);
  transform: scale(1.1) rotate(90deg);
}

.mini-player-close:active {
  transform: scale(0.9) rotate(90deg);
  transition-duration: 0.07s;
}

/* ── Map business point markers ────────────────────────────────────────────── */

.map-point-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.map-point-marker-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--marker-color, #888);
  background: rgba(6, 6, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--marker-color, #888);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--marker-color, #888) 36%, transparent),
    0 2px 8px rgba(0, 0, 0, 0.6);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.map-point-marker:hover .map-point-marker-bubble {
  transform: scale(1.14);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--marker-color, #888) 56%, transparent),
    0 4px 12px rgba(0, 0, 0, 0.7);
}

.map-point-marker.is-free .map-point-marker-bubble::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--marker-color, #888);
  opacity: 0.38;
  animation: map-point-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.map-point-marker.is-owned .map-point-marker-bubble,
.map-point-marker-bubble.is-owned {
  border-color: #4fc3f7;
  color: #4fc3f7;
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.52), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.map-point-marker.just-bought .map-point-marker-bubble {
  animation: map-point-buy-flash 0.8s ease-out;
}

@keyframes map-point-pulse {
  0%, 100% { transform: scale(1); opacity: 0.38; }
  50%       { transform: scale(1.4); opacity: 0.1; }
}

@keyframes map-point-buy-flash {
  0%   { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(1);   opacity: 1; }
}

.map-point-marker-price {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  background: rgba(6, 6, 10, 0.72);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Unowned slot markers — slightly smaller, dashed border */
.map-point-marker.is-slot .map-point-marker-bubble {
  width: 30px;
  height: 30px;
  font-size: 11px;
  border-style: dashed;
  border-width: 1.5px;
  opacity: 0.82;
}

.map-point-marker.is-slot:hover .map-point-marker-bubble {
  opacity: 1;
}

.map-marker-token-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-marker-token-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Route popup ─────────────────────────────────────────────────────────── */

.route-popup .leaflet-popup-content-wrapper {
  background: rgba(4, 10, 20, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  color: #e0f7fa;
  font-family: var(--font-mono);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.06), 0 0 24px rgba(0, 229, 255, 0.3), 0 8px 32px rgba(0,0,0,0.6);
  padding: 0;
}

.route-popup .leaflet-popup-content {
  margin: 0;
}

.route-popup .leaflet-popup-tip {
  background: rgba(4, 10, 20, 0.96);
}

.route-popup .leaflet-popup-close-button {
  color: rgba(0,229,255,0.5) !important;
  top: 6px !important;
  right: 8px !important;
}

.route-popup .leaflet-popup-close-button:hover {
  color: #00e5ff !important;
}

.zsd-popup {
  padding: 14px 16px;
}

.zsd-popup-title {
  font-size: 22px;
  font-weight: 700;
  color: #00e5ff;
  letter-spacing: 0.1em;
  text-shadow: 0 0 16px rgba(0,229,255,0.7), 0 0 32px rgba(0,229,255,0.3);
  line-height: 1;
  margin-bottom: 4px;
}

.zsd-popup-full {
  font-size: 9px;
  color: rgba(0,229,255,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.zsd-popup-desc {
  font-size: 11px;
  color: #80deea;
  margin-bottom: 10px;
  line-height: 1.5;
  font-family: inherit;
}

.zsd-popup-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.zsd-popup-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #00e5ff;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 3px;
  padding: 2px 6px;
}

/* ── Map point detail panel ────────────────────────────────────────────────── */

.map-point-panel {
  /* Паспорт объекта — узкая адаптация того же визуального языка, что и
     .mm-engine-actions/.mm-object-passport-* в match-map.css (режим 1×1):
     kicker-подпись, крупный заголовок, карточка редкости, акцент по цвету
     редкости. Здесь — боковая узкая панель (328px), а не широкий модал,
     поэтому раскладка однoколоночная. Цвет задаётся из script.js через
     --rarity/--rarity-rgb (openBusinessPointPanel), значения по умолчанию —
     нейтральный "point"-серый, пока панель ещё не открывали.
     */
  --rarity: #c4ccd0;
  --rarity-rgb: 196, 204, 208;
  display: none;
  flex-direction: column;
  border: 1px solid rgba(var(--rarity-rgb), 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(var(--rarity-rgb), 0.07), transparent 40%),
    rgba(8, 8, 10, 0.98);
  box-shadow: inset 2px 0 0 var(--rarity);
  overflow: hidden;
  overflow-y: auto;
  grid-column: 2;
  grid-row: 1;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.map-point-panel[aria-hidden="false"] {
  display: flex;
}

/* Hero image */
.map-point-image-wrap {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1080 / 1920;
  width: 100%;
  background: #0a0a0c;
  overflow: hidden;
}

.map-point-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 9px
    );
}

.map-point-panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}

.map-point-panel-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Body */
.map-point-panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 18px;
}

/* "ПАСПОРТ ОБЪЕКТА" — тот же приём, что .mm-engine-actions-kicker */
.map-point-kicker {
  color: var(--rarity);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  opacity: 0.85;
}

.map-point-kicker--stats {
  margin-top: 4px;
}

.map-point-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
}

.map-point-head::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 3px;
  background: var(--rarity);
  box-shadow: 0 0 12px rgba(var(--rarity-rgb), 0.5);
}

.map-point-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-point-id {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.28);
}

.map-point-status-chip {
  padding: 2px 9px;
  border-radius: 4px;
  border: 1px solid rgba(87, 255, 99, 0.45);
  color: #57ff63;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-point-status-chip.is-free {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.38);
}

/* Крупный уплотнённый заголовок — тот же приём, что .mm-engine-actions-title */
.map-point-name {
  margin: 0;
  font-family: "Arial Narrow", "Roboto Condensed", "DIN Condensed", Arial, sans-serif;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(var(--rarity-rgb), 0.16);
}

.map-point-subtitle {
  margin: -2px 0 0;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
}

.map-point-description {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  white-space: pre-line;
  border-left: 2px solid rgba(var(--rarity-rgb), 0.4);
  padding-left: 10px;
}

/* Карточка редкости — узкая адаптация .mm-object-rarity-badge из
   match-map.css (mark + label + common-name), цвет из --rarity/--rarity-rgb */
.map-point-rarity-badge {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 2px 10px;
  padding: 8px 10px;
  border: 1px solid var(--rarity);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(var(--rarity-rgb), 0.16), rgba(var(--rarity-rgb), 0.03)),
    rgba(3, 8, 11, 0.5);
  box-shadow: inset 0 0 16px rgba(var(--rarity-rgb), 0.08);
}

.map-point-rarity-mark {
  grid-row: 1 / span 2;
  color: var(--rarity);
  font-size: 16px;
  text-shadow: 0 0 10px currentColor;
}

.map-point-rarity-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.map-point-rarity-copy strong {
  color: var(--rarity);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-point-rarity-copy small {
  color: rgba(var(--rarity-rgb), 0.72);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-point-metro-bonus {
  margin: 6px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 8px;
  background: rgba(200, 0, 0, 0.08);
  border: 1px solid rgba(200, 0, 0, 0.2);
  border-radius: 4px;
}

.map-point-owner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.is-profile-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(200, 255, 0, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms, opacity 150ms;
}
.is-profile-link:hover {
  text-decoration-color: rgba(200, 255, 0, 0.9);
  opacity: 0.9;
}

.map-point-owner-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.map-point-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(var(--rarity-rgb), 0.16);
  border-radius: 6px;
  background: rgba(var(--rarity-rgb), 0.025);
}

.map-point-stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.map-point-stats dt {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.map-point-stats dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}

.map-point-stats dd em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.38);
}

.map-point-stat--full {
  grid-column: 1 / -1;
}

/* Блок реальной экономики (Ранговые битвы) — карточки в духе
   .mm-object-summary-card, цвет по редкости объекта (--rarity/--rarity-rgb),
   а не фиксированный акцент сайта. */
.map-point-economy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(var(--rarity-rgb), 0.3);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(var(--rarity-rgb), 0.09), rgba(var(--rarity-rgb), 0.015));
}

.map-point-economy-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-point-economy-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--rarity-rgb), 0.2);
  border-radius: 4px;
  background: rgba(3, 8, 11, 0.35);
}

.map-point-economy-card-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.map-point-economy-card strong {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.map-point-economy-card strong em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.38);
}

.map-point-economy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.map-point-economy-row > span:first-child {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.map-point-economy-action {
  border: 1px solid var(--rarity);
  border-radius: 6px;
  background: rgba(var(--rarity-rgb), 0.12);
  color: var(--rarity);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.map-point-economy-action:hover:not(:disabled) {
  background: rgba(var(--rarity-rgb), 0.22);
}

.map-point-economy-action:disabled {
  opacity: 0.45;
  cursor: default;
}

.map-point-economy-login-hint {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.map-point-district-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--map-filter-accent, #c8ff00);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--map-filter-accent, #c8ff00) 40%, transparent);
  transition: color 0.15s, text-decoration-color 0.15s;
}

.map-point-district-link:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.4);
}

.map-point-district-link:disabled {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  cursor: default;
}

.map-point-buy-btn {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  margin-top: 2px;
}

.map-point-buy-btn.is-owned {
  border-color: rgba(79, 195, 247, 0.4);
  color: #4fc3f7;
  cursor: default;
  background: rgba(79, 195, 247, 0.06);
}

.map-point-buy-btn:disabled:not(.is-owned) {
  opacity: 0.4;
}

/* ── ALTG balance badge ────────────────────────────────────────────────────── */

.map-altg-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(174, 0, 255, 0.38);
  border-radius: 6px;
  background: rgba(174, 0, 255, 0.07);
  font-size: 13px;
  font-weight: 700;
  color: #ae00ff;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.map-altg-badge > span:first-child {
  font-size: 11px;
  opacity: 0.7;
}

.map-altg-badge > span:last-child {
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* ── Territory legend ──────────────────────────────────────────────────────── */

.map-territory-legend {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(6, 6, 10, 0.86);
  backdrop-filter: blur(8px);
  font-size: 11px;
  min-width: 180px;
  pointer-events: none;
}

.map-territory-legend strong {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 8px;
}

.map-territory-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.map-territory-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.7);
}

.map-territory-legend li em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Owned district polygon — tighter dash pattern (used when border becomes visible on select) */
.spb-admin-district-polygon--owned {
  stroke-dasharray: 8 6;
}

/* ── District Economy Panel ───────────────────────────────────────────────── */

.dep {
  display: none;
  flex-direction: column;
  gap: 0;
  border: 1px solid color-mix(in srgb, var(--map-filter-accent, #c8ff00) 30%, rgba(255,255,255,0.08));
  border-radius: 10px;
  background: rgba(5, 7, 8, 0.97);
  overflow: hidden;
  overflow-y: auto;
  grid-column: 2;
  grid-row: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.dep[aria-hidden="false"] {
  display: flex;
}

/* Top bar */
.dep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 9px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}

.dep-location-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.dep-location-icon {
  color: var(--map-filter-accent, #c8ff00);
  font-size: 10px;
}

.dep-close-btn {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}

.dep-close-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* Header */
.dep-coat-of-arms {
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
  min-height: 0;
}

.dep-coat-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.dep-coat-img[src=""] {
  display: none;
}

.dep-header {
  padding: 14px 14px 12px;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--map-filter-accent, #c8ff00) 6%, transparent),
    transparent 60%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dep-name {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

.dep-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dep-rating-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dep-rating-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.dep-rating-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.dep-status-chip {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.4);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* AI Agent row */
.dep-agent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.016);
}

.dep-agent-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}


.dep-agent-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dep-agent-label {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.dep-agent-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Stats grid */
.dep-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dep-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 12px;
  background: rgba(5, 7, 8, 0.97);
}

.dep-stat--full {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.018);
}

.dep-stat dt {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.dep-stat dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.02em;
}

.dep-stat--full dd {
  font-size: 16px;
  color: color-mix(in srgb, var(--map-filter-accent, #c8ff00) 90%, #fff 10%);
}

/* Market indicators */
.dep-market {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
}

.dep-district-stats {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.dep-stats-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--map-filter-accent, #c8ff00) 80%, #fff 20%);
  text-align: left;
  transition: color 0.15s;
}

.dep-stats-toggle:hover {
  color: var(--map-filter-accent, #c8ff00);
}

.dep-toggle-arrow {
  font-size: 12px;
  line-height: 1;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.dep-stats-toggle[aria-expanded="true"] .dep-toggle-arrow {
  transform: rotate(180deg);
}

.dep-stat-grid[aria-hidden="true"] {
  display: none;
}

.dep-stat-grid[aria-hidden="false"] {
  padding: 0 14px 14px;
}

.dep-stat-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dep-stat-row {
  display: grid;
  grid-template-columns: 52px 1fr auto 28px;
  align-items: center;
  gap: 6px;
}

.dep-stat-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  font-family: var(--font-mono);
}

.dep-stat-name {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-stat-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.dep-stat-bar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dep-stat-val {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-align: right;
  font-family: var(--font-mono);
}

.dep-market-title {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.dep-market-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dep-market-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
}

.dep-market-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
}

.dep-bar-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.dep-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.dep-bar--demand {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--map-filter-accent, #c8ff00) 60%, #fff 40%),
    var(--map-filter-accent, #c8ff00));
  box-shadow: 0 0 6px color-mix(in srgb, var(--map-filter-accent, #c8ff00) 50%, transparent);
}

.dep-bar--liquidity {
  background: linear-gradient(90deg, #4fc3f7, #7ee8fa);
  box-shadow: 0 0 6px rgba(79,195,247,0.4);
}

.dep-bar--risk {
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}

/* Fullscreen positioning */
.universe-map-fullscreen .dep[aria-hidden="false"] {
  position: fixed;
  top: 90px;
  right: 18px;
  width: 300px;
  max-height: calc(100vh - 110px);
  z-index: 25;
}

@media (max-width: 1280px) {
  .universe-map-fullscreen .dep[aria-hidden="false"] {
    width: 270px;
    right: 14px;
  }
}

@media (max-width: 760px) {
  .universe-map-fullscreen .dep[aria-hidden="false"] {
    top: auto;
    bottom: 12px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 55vh;
  }

  .dep-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Filter district highlighting ─────────────────────────────────────────── */
/* Borders are invisible in all filter states — they only appear on district click */
/* (filter-district-active class still used by JS to track state, but no polygon visual effects) */

/* ── Filter Points Panel ───────────────────────────────────────────────────── */

.filter-points-panel {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.filter-points-panel[aria-hidden="false"] {
  display: flex;
}

.fpp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.fpp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.fpp-title {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fpp-count {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.fpp-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  max-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.fpp-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
}

.fpp-item:hover {
  background: rgba(255,255,255,0.05);
}

.fpp-item.is-owned {
  background: rgba(var(--fpp-accent, #c8ff00), 0.04);
}

.fpp-rarity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fpp-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.fpp-item-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fpp-item-meta {
  font-size: 9px;
  color: rgba(255,255,255,0.32);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fpp-item-price {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--fpp-accent, #c8ff00);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── NFT card: district companion list ─────────────────────────────────────── */

.map-point-district-list[aria-hidden="true"] {
  display: none;
}

.map-point-district-list {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.map-point-district-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
}

.map-point-district-list-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.map-point-district-list-count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.22);
}

.map-point-district-items {
  max-height: 220px;
}

/* Universe fullscreen: make the fpp panel appear in the left rail */
.universe-map-fullscreen .filter-points-panel[aria-hidden="false"] {
  max-height: 340px;
}

/* ── My points filter active ───────────────────────────────────────────────── */

.map-filter-button[data-map-my-points-filter].is-active {
  border-color: #4fc3f7;
  color: #4fc3f7;
  box-shadow: 0 0 18px rgba(79, 195, 247, 0.26);
}

@media (max-width: 760px) {
  .map-point-panel {
    padding: 12px;
    gap: 10px;
  }

  .map-altg-badge {
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* ── Skill Toast ─────────────────────────────────────────────────────────── */
.skill-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 20px;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(200, 255, 0, 0.5);
  border-radius: 6px;
  color: #c8ff00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.skill-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Skill Eye Marker ────────────────────────────────────────────────────── */
.map-skill-eye {
  width: 140px;
  height: 140px;
  pointer-events: none;
  animation: skill-eye-pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 14px #c8ff0099) drop-shadow(0 0 30px #c8ff0044);
}

.map-skill-eye .eye-ring-1 {
  animation: skill-ring-spin 8s linear infinite;
  transform-origin: 70px 70px;
}

.map-skill-eye .eye-ring-2 {
  animation: skill-ring-spin 14s linear infinite reverse;
  transform-origin: 70px 70px;
}

@keyframes skill-eye-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%       { transform: scale(1.08); opacity: 1;    }
}

@keyframes skill-ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Add Point Overlay ──────────────────────────────────────────────────────── */

.add-point-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  backdrop-filter: blur(3px);
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.add-point-overlay[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}

.add-point-panel {
  width: min(400px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #0c110d;
  border: 1px solid rgba(154, 212, 0, 0.3);
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(154, 212, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.6);
  transform: translateY(-14px);
  transition: transform 220ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 212, 0, 0.25) transparent;
}

.add-point-overlay[aria-hidden="false"] .add-point-panel {
  transform: translateY(0);
}

.add-point-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(154, 212, 0, 0.15);
}

.add-point-title {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acid-2, #9ad400);
}

.add-point-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: transparent;
  color: #c8d4c0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms, color 160ms;
}

.add-point-close:hover {
  border-color: rgba(154, 212, 0, 0.5);
  color: #fff;
}

.add-point-form {
  display: grid;
  gap: 14px;
  padding: 18px 20px 22px;
}

.add-point-field {
  display: grid;
  gap: 5px;
}

.add-point-section-title {
  padding-top: 12px;
  border-top: 1px solid rgba(154, 212, 0, 0.18);
  color: var(--acid-2, #9ad400);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.add-point-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.add-point-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aad90;
}

.add-point-required {
  color: rgba(154, 212, 0, 0.7);
}

.add-point-coords-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.add-point-coords-row .add-point-input {
  flex: 1;
  min-width: 0;
}

.add-point-pick-btn {
  flex-shrink: 0;
  padding: 0 12px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 5px;
  color: #00e5ff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.add-point-pick-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.7);
}

.add-point-pick-btn.is-active {
  background: rgba(0, 229, 255, 0.25);
  border-color: #00e5ff;
  color: #fff;
  animation: picker-pulse 1s ease-in-out infinite;
}

@keyframes picker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0, 229, 255, 0); }
}

/* ── ЗСД traffic simulation ────────────────────────────────── */

/* Lane A — cars south→north: dashoffset counts down */
.zsd-cars-fwd {
  animation: zsd-cars-fwd 1.6s linear infinite;
}

/* Lane B — cars north→south: dashoffset counts up */
.zsd-cars-rev {
  animation: zsd-cars-rev 1.9s linear infinite;
}

/* dashArray "8, 22" → period = 30px */
@keyframes zsd-cars-fwd {
  from { stroke-dashoffset: 30; }
  to   { stroke-dashoffset: 0;  }
}

@keyframes zsd-cars-rev {
  from { stroke-dashoffset: 0;  }
  to   { stroke-dashoffset: 30; }
}

/* Outer glow breathes slowly */
@keyframes zsd-glow-pulse {
  0%, 100% { opacity: 0.03; }
  50%       { opacity: 0.07; }
}

.zsd-outer-glow {
  animation: zsd-glow-pulse 3s ease-in-out infinite;
}
/* ────────────────────────────────────────────────────────── */

.picker-marker-pin {
  position: relative;
  width: 16px;
  height: 16px;
  background: #00e5ff;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.35), 0 0 12px rgba(0, 229, 255, 0.6);
  transition: box-shadow 0.2s, background 0.2s;
}

.picker-marker-pin:hover {
  background: #ff5050;
  box-shadow: 0 0 0 3px rgba(255, 80, 80, 0.5), 0 0 16px rgba(255, 80, 80, 0.7);
}

.picker-marker-coords {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #00e5ff;
  background: rgba(6, 12, 20, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 4px;
  padding: 3px 8px;
  pointer-events: none;
}

.picker-marker-pin:hover .picker-marker-coords {
  color: #ff5050;
  border-color: rgba(255, 80, 80, 0.4);
}

.add-point-pick-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #00e5ff;
  opacity: 0.8;
  font-style: italic;
  min-height: 16px;
}

.add-point-input,
.add-point-select {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(154, 212, 0, 0.28);
  border-radius: 5px;
  background: rgba(1, 4, 2, 0.74);
  color: #e1e8dc;
  font: inherit;
  font-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 160ms;
}

.add-point-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aad90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.add-point-select option {
  background: #0c110d;
  color: #e1e8dc;
}

.add-point-input:focus,
.add-point-select:focus {
  border-color: var(--acid-2, #9ad400);
  box-shadow: 0 0 12px rgba(154, 212, 0, 0.14);
}

.add-point-input::placeholder {
  color: rgba(154, 173, 144, 0.45);
}

.add-point-file {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px dashed rgba(154, 212, 0, 0.28);
  border-radius: 5px;
  background: rgba(1, 4, 2, 0.55);
  color: #cbd8c5;
  font: inherit;
  font-size: 11px;
}

.add-point-file::file-selector-button {
  margin-right: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(154, 212, 0, 0.35);
  border-radius: 4px;
  background: rgba(154, 212, 0, 0.08);
  color: var(--acid-2, #9ad400);
  cursor: pointer;
}

.add-point-private-note {
  font-size: 9px;
  color: #829078;
}

.add-point-input[type="number"] {
  -moz-appearance: textfield;
}
.add-point-input[type="number"]::-webkit-outer-spin-button,
.add-point-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.add-point-district-hint {
  min-height: 16px;
  font-size: 10px;
  color: #9aad90;
  letter-spacing: 0.04em;
}

.add-point-district-hint.is-found {
  color: var(--acid-2, #9ad400);
}

.add-point-district-hint.is-error {
  color: #c8a43a;
}

.add-point-status {
  display: block;
  min-height: 18px;
  font-size: 11px;
  color: #9aad90;
  text-align: center;
}

.add-point-status.is-error {
  color: #ff6b6b;
}

.add-point-status.is-success {
  color: var(--acid-2, #9ad400);
}

.add-point-submit {
  width: 100%;
  margin-top: 4px;
  cursor: pointer;
}

.add-point-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Add Point — image upload zone ─────────────────────────────────────────── */

.add-point-image-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1px dashed rgba(154, 212, 0, 0.28);
  border-radius: 6px;
  background: rgba(1, 4, 2, 0.55);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms, background 160ms;
}

.add-point-image-zone:hover,
.add-point-image-zone.is-drag-over {
  border-color: var(--acid-2, #9ad400);
  background: rgba(154, 212, 0, 0.05);
}

.add-point-image-zone.is-drag-over {
  border-style: solid;
}

.add-point-image-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.add-point-image-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px;
  color: #9aad90;
  font-size: 11px;
  text-align: center;
  pointer-events: none;
}

.add-point-image-icon {
  font-size: 22px;
  line-height: 1;
  opacity: 0.6;
}

.add-point-image-fmt {
  font-size: 9px;
  opacity: 0.55;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.add-point-image-preview {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.add-point-image-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.65);
  color: #e1e8dc;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: border-color 160ms, color 160ms;
}

.add-point-image-clear:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

/* ── Map point panel — hero image ───────────────────────────────────────────── */

.map-point-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0a0c;
}

.map-point-image-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.map-point-image-edit-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.62);
  color: #e1e8dc;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: border-color 160ms, color 160ms, background 160ms;
  z-index: 2;
}

.map-point-image-edit-btn:hover {
  border-color: var(--acid-2, #9ad400);
  color: var(--acid-2, #9ad400);
  background: rgba(0, 0, 0, 0.78);
}

.map-point-image-edit-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Delete button ───────────────────────────────────────────────────────────── */

.map-point-delete-btn {
  width: 100%;
  border-color: rgba(255, 50, 72, 0.35);
  color: #ff6b7a;
  background: rgba(255, 50, 72, 0.06);
}

.map-point-aks-edit-btn {
  width: 100%;
  border-color: rgba(154, 212, 0, 0.35);
  color: var(--acid-2, #9ad400);
  background: rgba(154, 212, 0, 0.06);
}

.map-point-delete-btn:hover,
.map-point-delete-btn:focus-visible {
  border-color: rgba(255, 50, 72, 0.7);
  color: #fff;
  background: rgba(255, 50, 72, 0.14);
}

.map-point-delete-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── View 3D button ──────────────────────────────────────────────────────────── */

.map-point-view3d-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 16px;
  border: 1px solid rgba(255, 210, 63, 0.45);
  border-radius: 6px;
  background: rgba(255, 210, 63, 0.07);
  color: #ffd23f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 160ms, background 160ms, color 160ms;
  margin-top: 2px;
}

.map-point-view3d-btn:hover,
.map-point-view3d-btn:focus-visible {
  border-color: #ffd23f;
  background: rgba(255, 210, 63, 0.14);
  color: #fff;
}

/* ── Building3d form section ─────────────────────────────────────────────────── */

.add-point-field-separator {
  grid-column: 1 / -1;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(255, 210, 63, 0.2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffd23f;
}

.add-point-building3d {
  display: grid;
  gap: 12px;
}

.add-point-textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}

/* ── Visualization block in point card ───────────────────────────────────────── */

.mp-viz-block {
  margin: 6px 0 2px;
  border: 1px solid rgba(255, 210, 63, 0.28);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 210, 63, 0.04);
}

.mp-viz-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 8px;
  border-bottom: 1px solid rgba(255, 210, 63, 0.15);
}

.mp-viz-icon {
  font-size: 13px;
  color: #ffd23f;
  line-height: 1;
}

.mp-viz-title {
  flex: 1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffd23f;
}

.mp-viz-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 210, 63, 0.6);
  border: 1px solid rgba(255, 210, 63, 0.25);
  border-radius: 3px;
  padding: 2px 6px;
}

/* CSS-only animated 3D cube preview */
.mp-viz-preview {
  position: relative;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #06070a;
}

.mp-viz-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 210, 63, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 210, 63, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

.mp-viz-cube {
  width: 36px;
  height: 36px;
  position: relative;
  transform-style: preserve-3d;
  animation: mp-viz-spin 8s linear infinite;
}

@keyframes mp-viz-spin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to   { transform: rotateX(-22deg) rotateY(360deg); }
}

.mp-viz-cube-face {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 210, 63, 0.55);
  background: rgba(255, 210, 63, 0.04);
  box-shadow: inset 0 0 8px rgba(255, 210, 63, 0.08);
}

.mp-viz-cube-face--front  { transform: translateZ(18px); }
.mp-viz-cube-face--back   { transform: rotateY(180deg) translateZ(18px); }
.mp-viz-cube-face--left   { transform: rotateY(-90deg) translateZ(18px); }
.mp-viz-cube-face--right  { transform: rotateY(90deg) translateZ(18px); }
.mp-viz-cube-face--top    { transform: rotateX(90deg) translateZ(18px); }

.mp-viz-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 210, 63, 0.15);
  color: #ffd23f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}

.mp-viz-btn:hover {
  background: rgba(255, 210, 63, 0.1);
  color: #fff;
}

/* ── Metro station markers ─────────────────────────────────────────────────── */

.metro-marker {
  --glow-color: #333;
  width: 52px;
  height: 52px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease;
  position: relative;
}

.metro-marker:hover {
  transform: scale(1.15);
}

.metro-marker-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

.metro-marker-label {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  background: rgba(6, 6, 10, 0.75);
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
}

/* ── Metro district selection state ─────────────────────────────────────── */

/* Metro markers: visibility controlled purely via JS setOpacity() + metro-in-district class */
.metro-marker-wrap {
  transition: opacity 200ms ease;
}

/* ── DEP metro control section ────────────────────────────────────────────── */

.dep-metro {
  margin: 0 12px 10px;
  padding: 10px 12px;
  background: rgba(200, 0, 0, 0.06);
  border: 1px solid rgba(200, 0, 0, 0.2);
  border-radius: 6px;
}

.dep-metro-title {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dep-metro-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dep-metro-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.dep-metro-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dep-metro-controller {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-metro-stations {
  font-size: 9px;
  color: #666;
}

.dep-metro-bonus {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* Zoom buttons hidden (2026-07-09): user zooms with the mouse wheel only.
   Markup stays — script.js map init requires these elements to exist. */
.map-zoom-control {
  display: none;
}


/* ============================================================
   ШАПКА — ЕДИНАЯ НА ВСЕХ ВКЛАДКАХ
   ------------------------------------------------------------
   По странице тему меняли ~11 блоков (.theme-*, .dzendex-command-page,
   :is(.characters-page,...), .universe-map-fullscreen, медиазапрос 1500px),
   из-за чего фон, высота, кегль навигации и вид кнопок разъезжались.
   Здесь шапка фиксируется как компонент: тема страницы на неё не влияет.
   Удвоенный класс (.topbar.topbar) поднимает вес выше .theme-x .topbar,
   но НЕ трогает раскладку полноэкранной карты (position/inset/z-index).
   ============================================================ */
.topbar.topbar {
  min-height: 78px;
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.012) 42%, rgba(0, 0, 0, 0.12) 100%),
    rgba(9, 10, 13, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: inset 0 1px 0 var(--glass-top), 0 10px 34px rgba(0, 0, 0, 0.55);
}

/* Вордмарк и подпись — одна отливка везде */
.topbar.topbar .brand-title {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 6%, #ececf1 30%, #a6a6b0 56%, #dcdce3 78%, #ffffff 98%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.topbar.topbar .brand-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--metal-muted-2);
  text-shadow: none;
}

/* Навигация: один кегль, один цвет, одна активная фаска.
   background: none гасит любые постраничные плашки под активным пунктом. */
.topbar.topbar .main-nav a {
  --nav-pad: 20px;
  padding: 0 var(--nav-pad);
  min-height: 78px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--metal-muted-2);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;
}

.topbar.topbar .main-nav a:hover,
.topbar.topbar .main-nav a.active {
  color: var(--metal-ink);
  background: none;
  text-shadow: none;
}

.topbar.topbar .main-nav a.active { color: #fff; }
.topbar.topbar .main-nav a::before { color: var(--metal-muted-2); font-size: 11px; }
.topbar.topbar .main-nav a.active::before { color: #fff; }

.topbar.topbar .main-nav a::after {
  left: var(--nav-pad);
  right: var(--nav-pad);
  height: 2px;
  background: linear-gradient(90deg, rgba(139, 139, 148, 0.25) 0%, #ffffff 50%, rgba(139, 139, 148, 0.25) 100%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35), 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* Кнопки — одинаковые везде, включая биржу с её монохромной темой */
.topbar.topbar .topbar-btn {
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  border-radius: 4px;
  text-shadow: none;
}

.topbar.topbar .topbar-btn--glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-top);
  color: #e6e6ea;
  font-weight: 400;
}

.topbar.topbar .topbar-btn--glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.topbar.topbar .topbar-btn--metal {
  background: var(--metal-face);
  border: 0;
  color: #0a0a0c;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 10px rgba(0, 0, 0, 0.6);
}

.topbar.topbar .topbar-btn--metal:hover { filter: brightness(1.08); }

/* Адаптив повторён с тем же весом — иначе поздние страничные медиазапросы
   (напр. .main-nav a{font-size:12px} на 1500px) снова разошлись бы. */
@media (max-width: 1400px) {
  .topbar.topbar .main-nav a { --nav-pad: 15px; font-size: 14px; letter-spacing: 0.08em; }
}

@media (max-width: 1180px) {
  .topbar.topbar .main-nav a { --nav-pad: 11px; font-size: 13px; letter-spacing: 0.06em; }
  .topbar.topbar .main-nav a::before { font-size: 9px; }
  .topbar.topbar .topbar-btn { padding: 9px 12px; letter-spacing: 0.1em; }
  .topbar.topbar .topbar-btn--glass .topbar-btn-label { display: none; }
}

@media (max-width: 860px) {
  .topbar.topbar { gap: 10px; padding: 0 12px; }
  .topbar.topbar .topbar-btn--metal .topbar-btn-label { display: none; }
}


/* ============================================================
   GEO-КОКПИТ — металл и стекло + сворачивание
   Палитра переведена с янтаря на монохром базы знаний; панель стала
   настоящим стеклом (как шапка), чтобы карта читалась под ней.
   ============================================================ */
.universe-map-fullscreen .left-rail > .panel.geo-cockpit {
  border: 1px solid var(--glass-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.012) 42%, rgba(0, 0, 0, 0.12) 100%),
    rgba(9, 10, 13, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: inset 0 1px 0 var(--glass-top), 0 26px 72px rgba(0, 0, 0, 0.55);
}

/* Кнопка сворачивания — стеклянная, в одном ряду с балансом */
.cockpit-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-top);
  color: #d7d7de;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cockpit-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cockpit-toggle-ico {
  display: block;
  font-size: 11px;
  line-height: 1;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.geo-cockpit.is-collapsed .cockpit-toggle-ico { transform: rotate(-90deg); }

/* Свёрнуто: остаётся только шапка, карта под панелью открывается */
.geo-cockpit.is-collapsed > *:not(.cockpit-head):not(.cockpit-accent) { display: none; }

.universe-map-fullscreen .left-rail > .panel.geo-cockpit.is-collapsed {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
}

/* .left-rail сам — fixed с одновременными top/bottom, поэтому не сжимается
   вместе с содержимым: без сброса bottom/height/backdrop-filter за свёрнутой
   шапкой остаётся размытый прямоугольник на всю высоту рельса. */
.universe-map-fullscreen .left-rail.left-rail--cockpit-collapsed {
  bottom: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ============================================================
   MATCH COMMAND DECK — масштабируемый выбор фигур
   ============================================================ */

.hm-match-overlay[data-hm-match-view="picker"] .hm-match-stage {
  width: min(1480px, calc(100vw - 180px));
  height: min(820px, calc(100dvh - 210px));
  min-height: 650px;
}

.hm-match-stage > .picker.on {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 30px 34px 28px;
  overflow: hidden;
}

.hm-match-picker-head {
  min-height: 80px;
  margin: 0 72px 18px 0;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
}

.hm-match-picker-head .hm-match-kicker {
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
}

.hm-match-picker-head h2 {
  font-size: clamp(34px, 2.5vw, 44px);
  line-height: 1;
  letter-spacing: 0.18em;
}

.hm-command-deck-status {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: #6a6a6a;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hm-command-deck-status b {
  color: #f2f2f2;
  font-weight: 500;
}

.hm-command-deck {
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(340px, 1.06fr) minmax(285px, 0.82fr);
  gap: clamp(18px, 1.6vw, 28px);
  min-height: 0;
  text-align: left;
}

.hm-command-catalog,
.hm-command-preview,
.hm-command-config {
  min-width: 0;
  min-height: 0;
}

.hm-command-catalog {
  display: grid;
  grid-template-rows: auto 48px auto minmax(0, 1fr) auto;
  gap: 10px;
}

.hm-command-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.hm-command-count,
.hm-command-live,
.hm-command-page-marker {
  color: #767676;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hm-command-live {
  color: #ececec;
  white-space: nowrap;
}

.hm-command-search {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-width: 0;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 180ms ease, background 180ms ease;
}

.hm-command-search:focus-within {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.035);
}

.hm-command-search > span:first-child {
  color: #d8d8d8;
  font-family: var(--font-mono);
  font-size: 20px;
  text-align: right;
}

.hm-command-search input {
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hm-command-search input::placeholder {
  color: #686868;
  opacity: 1;
}

.hm-command-filters {
  display: flex;
  gap: 7px;
  min-width: 0;
}

.hm-command-filters button {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #8c8c8c;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hm-command-filters button:hover,
.hm-command-filters button:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  color: #fff;
  outline: none;
}

.hm-command-filters button.is-active {
  border-color: #eee;
  background: #eee;
  color: #050505;
}

.hm-command-catalog .hm-match-roster {
  display: block;
  max-height: none;
  min-height: 0;
  padding: 8px 10px 8px 0;
  overflow: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.55) rgba(255, 255, 255, 0.08);
}

.hm-command-catalog .hm-match-roster::-webkit-scrollbar { width: 4px; }
.hm-command-catalog .hm-match-roster::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.08); }
.hm-command-catalog .hm-match-roster::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.55); }

.hm-command-catalog .hm-match-roster-card {
  position: relative;
  display: block;
  min-height: 64px;
  margin: 0 0 7px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.012);
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.hm-command-catalog .hm-match-roster-card::before,
.hm-command-catalog .hm-match-roster-card::after {
  display: none;
}

.hm-command-catalog .hm-match-roster-card.is-available {
  border-color: rgba(255, 255, 255, 0.42);
}

.hm-command-catalog .hm-match-roster-card.is-available:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.035);
}

.hm-command-catalog .hm-match-roster-card.is-selected {
  border-color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.015));
  box-shadow: inset 3px 0 #fff, 0 0 22px rgba(255, 255, 255, 0.045);
}

.hm-command-catalog .hm-match-roster-card.is-locked .hm-match-roster-body {
  opacity: 0.34;
  filter: none;
}

.hm-command-catalog .hm-match-roster-card.is-reserved .hm-match-roster-body {
  opacity: 0.48;
}

.hm-command-catalog .hm-match-roster-body {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 5px 40px 5px 5px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.hm-command-catalog .hm-match-roster-body:not(:disabled) {
  cursor: pointer;
}

.hm-command-catalog .hm-match-roster-body:disabled {
  cursor: not-allowed;
}

.hm-command-catalog .hm-match-roster-body:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.hm-command-catalog .hm-match-roster-photo {
  width: 50px;
  height: 50px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.2), transparent 16%),
    radial-gradient(ellipse at 50% 82%, rgba(255, 255, 255, 0.12), transparent 32%),
    #090909;
}

.hm-command-catalog .hm-match-roster-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.hm-command-catalog .hm-match-roster-photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #8f8f8f;
  font-family: var(--font-mono);
  font-size: 18px;
}

.hm-match-roster-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hm-command-catalog .hm-match-roster-name {
  overflow: hidden;
  color: #f2f2f2;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-command-catalog .hm-match-roster-role {
  overflow: hidden;
  color: #878787;
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-match-roster-status {
  color: #bebebe;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.is-locked .hm-match-roster-status {
  color: #fff;
  font-size: 17px;
}

.hm-match-favorite {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #686868;
  font-size: 18px;
  cursor: pointer;
}

.hm-match-favorite:hover,
.hm-match-favorite:focus-visible,
.hm-match-favorite.is-active {
  color: #fff;
  outline: none;
}

.hm-command-empty {
  margin: 0;
  padding: 28px 12px;
  color: #797979;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-align: center;
}

.hm-command-page-marker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  line-height: 1.2;
}

.hm-command-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.hm-command-media {
  position: relative;
  align-self: stretch;
  justify-self: center;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 54%, rgba(255, 255, 255, 0.13), transparent 48%),
    #040404;
  background-size: 28px 28px, 28px 28px, auto, auto;
  outline: none;
}

.hm-command-media:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hm-command-ratio {
  position: absolute;
  z-index: 8;
  top: 15px;
  right: 16px;
  color: #949494;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
}

.hm-command-media-corners {
  position: absolute;
  inset: 12px;
  z-index: 8;
  pointer-events: none;
  opacity: 0.62;
  background:
    linear-gradient(#fff, #fff) left top / 22px 1px no-repeat,
    linear-gradient(#fff, #fff) left top / 1px 22px no-repeat,
    linear-gradient(#fff, #fff) right top / 22px 1px no-repeat,
    linear-gradient(#fff, #fff) right top / 1px 22px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 22px 1px no-repeat,
    linear-gradient(#fff, #fff) left bottom / 1px 22px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 22px 1px no-repeat,
    linear-gradient(#fff, #fff) right bottom / 1px 22px no-repeat;
}

.hm-command-figure,
.hm-command-video,
.hm-command-cinematic,
.hm-command-waiting,
.hm-command-media-error {
  position: absolute;
  inset: 0;
}

.hm-command-figure {
  display: grid;
  place-items: center;
}

.hm-command-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: none;
}

.hm-command-figure img[hidden],
.hm-command-figure-placeholder[hidden] {
  display: none;
}

.hm-command-figure-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  text-align: center;
}

.hm-command-figure-placeholder strong {
  color: transparent;
  font-family: var(--font-sans);
  font-size: clamp(154px, 14vw, 230px);
  font-weight: 760;
  line-height: 0.82;
  background:
    linear-gradient(
      180deg,
      #555 0%,
      #f7f7f7 22%,
      #898989 43%,
      #fff 58%,
      #777 76%,
      #d8d8d8 100%
    );
  background-clip: text;
  -webkit-background-clip: text;
  filter:
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.28))
    drop-shadow(0 12px 24px rgba(0, 0, 0, 0.9));
}

.hm-command-video {
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: cover;
  filter: none;
}

.hm-command-cinematic {
  display: none;
  z-index: 5;
  align-content: end;
  padding: 30px 28px;
  pointer-events: none;
  background:
    linear-gradient(transparent 55%, rgba(0, 0, 0, 0.88)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.13) 4px);
  color: #fff;
}

.hm-command-cinematic p,
.hm-command-cinematic small,
.hm-command-cinematic strong {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hm-command-cinematic p { font-size: 11px; }
.hm-command-cinematic strong { justify-self: end; margin-top: 8px; font-size: 20px; font-weight: 400; }
.hm-command-cinematic small { margin-top: 8px; color: #b8b8b8; font-size: 9px; }

.hm-command-video-progress {
  height: 2px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
}

.hm-command-video-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.hm-command-waiting {
  z-index: 6;
  display: none;
  place-items: center;
  align-content: center;
  padding: 36px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1), transparent 36%),
    rgba(2, 2, 2, 0.94);
  color: #fff;
  text-align: center;
}

.hm-command-waiting p,
.hm-command-waiting small {
  margin: 0;
  color: #868686;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hm-command-waiting h3 {
  max-width: 340px;
  margin: 24px 0 18px;
  font-family: var(--font-mono);
  font-size: clamp(26px, 2.3vw, 38px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  outline: none;
}

.hm-command-waiting-code {
  margin-bottom: 6px;
  color: #797979;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.hm-command-waiting-code b {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.hm-command-waiting .hm-match-link-pulse {
  width: 78%;
  margin: 28px 0 20px;
}

.hm-command-media-error {
  z-index: 9;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 34px;
  background: rgba(3, 3, 3, 0.96);
  text-align: center;
}

.hm-command-media-error[hidden] { display: none; }

.hm-command-media-error p {
  max-width: 330px;
  margin: 0 0 8px;
  color: #e4e4e4;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.05em;
}

.hm-command-media-error button {
  min-width: 220px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.hm-command-media-error button:hover,
.hm-command-media-error button:focus-visible {
  background: #fff;
  color: #050505;
  outline: none;
}

.hm-command-media[data-hm-match-media-state="video"] .hm-command-video,
.hm-command-media[data-hm-match-media-state="video"] .hm-command-cinematic {
  display: grid;
}

.hm-command-media[data-hm-match-media-state="video"] .hm-command-figure,
.hm-command-media[data-hm-match-media-state="waiting"] .hm-command-figure,
.hm-command-media[data-hm-match-media-state="error"] .hm-command-figure {
  display: none;
}

.hm-command-media[data-hm-match-media-state="waiting"] .hm-command-waiting {
  display: grid;
}

.hm-command-identity {
  min-height: 51px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

.hm-command-identity strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(20px, 1.5vw, 26px);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: 0.18em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-command-identity span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #797979;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hm-command-config {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
  gap: 11px;
}

.hm-command-selected {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.016);
}

.hm-command-selected span,
.hm-command-selected small {
  display: block;
  color: #818181;
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hm-command-selected strong {
  display: block;
  margin: 7px 0 5px;
  overflow: hidden;
  color: #f2f2f2;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-command-style-prompt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(
      105deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.18) 42%,
      rgba(255, 255, 255, 0.035) 66%,
      rgba(255, 255, 255, 0.09) 100%
    );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.34),
    inset 0 -1px rgba(0, 0, 0, 0.9),
    0 0 22px rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono);
}

.hm-command-style-prompt[hidden] { display: none; }

.hm-command-style-prompt span {
  color: #969696;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.hm-command-style-prompt strong {
  color: transparent;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.11em;
  background: linear-gradient(180deg, #fff 0%, #8b8b8b 48%, #f5f5f5 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hm-command-style-prompt b {
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.hm-command-config .hm-match-style-picker {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  margin: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.hm-command-config .hm-match-style-picker[hidden] { display: none; }

.hm-command-config.is-style-prompt .hm-match-style-picker {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.012) 46%, rgba(255, 255, 255, 0.05));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.26),
    inset 0 -1px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 28px rgba(255, 255, 255, 0.1);
  animation: hm-style-prompt-pulse 2.4s ease-in-out infinite;
}

.hm-command-config.is-style-prompt .hm-match-style-btn {
  border-color: rgba(255, 255, 255, 0.45);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.018) 52%, rgba(255, 255, 255, 0.06));
  color: #e7e7e7;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
}

@keyframes hm-style-prompt-pulse {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.48);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.22),
      inset 0 -1px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.04),
      0 0 18px rgba(255, 255, 255, 0.06);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.42),
      inset 0 -1px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.09),
      0 0 32px rgba(255, 255, 255, 0.15);
  }
}

.hm-command-config .hm-match-style-btn {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.012);
  color: #8b8b8b;
  text-align: left;
}

.hm-command-config .hm-match-style-btn > span:first-child {
  color: #696969;
  font-family: var(--font-mono);
  font-size: 11px;
}

.hm-command-config .hm-match-style-btn > span:last-child {
  display: grid;
  gap: 7px;
}

.hm-command-config .hm-match-style-btn strong {
  color: inherit;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hm-command-config .hm-match-style-btn small {
  color: #797979;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.hm-command-config .hm-match-style-btn:hover,
.hm-command-config .hm-match-style-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.hm-command-config .hm-match-style-btn.is-selected {
  border-color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent);
  color: #fff;
  box-shadow: inset 2px 0 #fff;
}

.hm-command-opponent {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.012);
}

.hm-command-opponent .hm-command-section-head {
  color: #7b7b7b;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hm-command-opponent .hm-command-section-head b {
  color: #d9d9d9;
  font-weight: 500;
}

.hm-command-opponent .hm-match-opponent-card {
  display: block;
  min-height: 0;
  margin-top: 8px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #f2f2f2;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-command-opponent .hm-match-opponent-card::before { display: none; }

.hm-command-error {
  min-height: 18px;
  margin: 0;
  color: #dfdfdf;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.hm-command-error:not(:empty)::before {
  content: "[ ! ] ";
  color: #fff;
}

.hm-command-config .hm-match-ready-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px 12px 19px;
  border: 1px solid #fff;
  background: #efefef;
  color: #050505;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hm-command-config .hm-match-ready-btn small {
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: #747474;
  font-size: 7px;
  letter-spacing: 0.07em;
}

.hm-command-config .hm-match-ready-btn:hover:not(:disabled),
.hm-command-config .hm-match-ready-btn:focus-visible:not(:disabled) {
  background: #fff;
  color: #000;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.13);
  transform: none;
}

.hm-command-config .hm-match-ready-btn:disabled {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.025);
  color: #686868;
  opacity: 1;
}

.hm-match-close:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.hm-match-stage > .picker.is-media-locked .hm-command-catalog,
.hm-match-stage > .picker.is-media-locked .hm-command-config {
  opacity: 0.18;
  filter: none;
  pointer-events: none;
}

.hm-match-stage > .picker.is-media-locked .hm-command-preview {
  position: relative;
  z-index: 2;
}

@media (max-width: 1240px) {
  .hm-match-overlay[data-hm-match-view="picker"] .hm-match-stage {
    width: calc(100vw - 86px);
  }

  .hm-command-deck {
    grid-template-columns: minmax(270px, 0.88fr) minmax(310px, 1fr) minmax(250px, 0.78fr);
    gap: 16px;
  }

  .hm-command-catalog .hm-match-roster-name { font-size: 13px; }
  .hm-command-catalog .hm-match-roster-role { font-size: 10px; }
  .hm-command-config .hm-match-style-btn small { font-size: 11px; }
}

@media (max-width: 900px) {
  .hm-match-overlay[data-hm-match-view="picker"] {
    align-items: flex-start;
    overflow-y: auto;
  }

  .hm-match-overlay[data-hm-match-view="picker"] .hm-match-stage {
    width: calc(100vw - 28px);
    height: auto;
    min-height: calc(100dvh - 118px);
  }

  .hm-match-stage > .picker.on {
    position: relative;
    min-height: calc(100dvh - 118px);
    overflow: visible;
  }

  .hm-command-deck {
    grid-template-columns: 1fr;
  }

  .hm-command-catalog {
    min-height: 440px;
  }

  .hm-command-preview {
    min-height: 760px;
  }

  .hm-command-media {
    height: 660px;
  }

  .hm-command-config {
    min-height: 540px;
  }
}

@media (max-width: 560px) {
  .hm-match-stage > .picker.on { padding: 72px 16px 26px; }
  .hm-match-picker-head { margin-right: 0; }
  .hm-match-picker-head h2 { font-size: 28px; letter-spacing: 0.12em; }
  .hm-command-deck-status { display: none; }
  .hm-command-filters { flex-wrap: wrap; }
  .hm-command-preview { min-height: 660px; }
  .hm-command-media { height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-command-config.is-style-prompt .hm-match-style-picker {
    animation: none;
  }

  .hm-command-waiting .hm-match-link-pulse span {
    animation: none;
    transform: translateX(82%);
  }
}

/* Saint Petersburg viewport-streamed MapLibre 3D city */

.spb-3d-host,
.spb-3d-host.maplibregl-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  z-index: 4;
  overflow: hidden;
  background: #030b12;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.spb-3d-host[hidden],
.spb-3d-toggle[hidden],
.spb-3d-loading[hidden],
.spb-3d-legend[hidden],
.spb-3d-notice[hidden],
.spb-3d-tooltip[hidden] {
  display: none !important;
}

.spb-map-shell.is-spb-3d-active .spb-3d-host {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.spb-map-shell.is-spb-3d-active .spb-leaflet-map {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spb-map-shell.is-spb-3d-active .spb-map-grid {
  display: none;
}

.spb-map-shell.is-spb-3d-active .map-zoom-control {
  display: none;
}

.spb-3d-toggle,
.spb-3d-notice {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spb-3d-toggle {
  position: absolute;
  top: 12px;
  right: 164px;
  z-index: 12;
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid rgba(57, 191, 255, 0.76);
  border-radius: 6px;
  color: #dff7ff;
  background: linear-gradient(135deg, rgba(57, 191, 255, 0.2), transparent 68%), rgba(3, 13, 20, 0.94);
  box-shadow: inset 0 0 18px rgba(57, 191, 255, 0.08), 0 0 20px rgba(22, 153, 214, 0.2);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.spb-3d-toggle:hover,
.spb-3d-toggle:focus-visible,
.spb-3d-toggle[aria-pressed="true"] {
  color: #071015;
  background: #39bfff;
  box-shadow: 0 0 24px rgba(57, 191, 255, 0.52);
  outline: none;
}

.spb-3d-toggle:disabled {
  opacity: 0.58;
  cursor: wait;
}

.spb-3d-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 13;
  display: grid;
  min-width: 260px;
  justify-items: center;
  gap: 7px;
  padding: 18px 22px;
  border: 1px solid rgba(57, 191, 255, 0.62);
  border-radius: 7px;
  color: #e7f9ff;
  background: rgba(3, 12, 18, 0.92);
  box-shadow: 0 0 38px rgba(20, 145, 204, 0.24);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.spb-3d-loading strong {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.spb-3d-loading small {
  color: rgba(223, 247, 255, 0.62);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spb-3d-loading-pulse {
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: #39bfff;
  box-shadow: 0 0 20px #39bfff;
  animation: spb-3d-loading-pulse 920ms ease-in-out infinite alternate;
}

@keyframes spb-3d-loading-pulse {
  from { opacity: 0.35; transform: scaleX(0.45); }
  to { opacity: 1; transform: scaleX(1.35); }
}

.spb-3d-legend {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(57, 191, 255, 0.38);
  border-radius: 5px;
  color: rgba(231, 249, 255, 0.8);
  background: rgba(3, 12, 18, 0.84);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.spb-3d-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spb-3d-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  box-shadow: 0 0 9px currentColor;
}

.spb-3d-legend i.is-default {
  color: #53636c;
  background: #26343c;
}

.spb-3d-legend i.is-filtered {
  color: var(--active-map-filter-color, #9aa8af);
  background: var(--active-map-filter-color, #9aa8af);
}

.spb-3d-notice {
  position: absolute;
  top: 64px;
  right: 18px;
  z-index: 13;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(57, 191, 255, 0.58);
  border-radius: 5px;
  color: #dff7ff;
  background: rgba(3, 12, 18, 0.94);
  font-size: 9px;
  line-height: 1.5;
  cursor: pointer;
}

.spb-3d-notice[data-kind="error"] {
  border-color: rgba(255, 89, 89, 0.74);
  color: #ffd5d5;
}

.spb-3d-notice[data-kind="progress"] {
  opacity: 0.78;
  pointer-events: none;
}

.spb-3d-tooltip {
  position: absolute;
  z-index: 14;
  display: grid;
  min-width: 178px;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid rgba(57, 191, 255, 0.52);
  border-radius: 5px;
  color: #e7f9ff;
  background: rgba(3, 12, 18, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  pointer-events: none;
}

.spb-3d-tooltip strong {
  color: #39bfff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spb-3d-tooltip span,
.spb-3d-tooltip small {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(231, 249, 255, 0.68);
  font-size: 9px;
  line-height: 1.35;
}

.spb-3d-tooltip b {
  color: #f3fbff;
}

.spb-3d-host .maplibregl-canvas {
  outline: none;
}

.spb-3d-host .maplibregl-ctrl-attrib {
  color: rgba(223, 247, 255, 0.6);
  background: rgba(3, 12, 18, 0.7);
  font-size: 9px;
}

.universe-map-fullscreen .spb-3d-toggle {
  top: 16px;
  right: 500px;
}

.universe-map-fullscreen .spb-3d-legend,
.universe-map-fullscreen .spb-3d-notice {
  right: 338px;
}

@media (max-width: 1540px) {
  .universe-map-fullscreen .spb-3d-toggle {
    right: 370px;
  }

  .universe-map-fullscreen .spb-3d-legend,
  .universe-map-fullscreen .spb-3d-notice {
    right: 306px;
  }
}

@media (max-width: 900px) {
  .universe-map-fullscreen .spb-3d-toggle,
  .spb-3d-toggle {
    top: 66px;
    right: 10px;
  }

  .spb-3d-legend {
    display: none !important;
  }

  .universe-map-fullscreen .spb-3d-notice,
  .spb-3d-notice {
    top: 112px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spb-3d-host {
    transition: none;
  }

  .spb-3d-loading-pulse {
    animation: none;
  }
}
