:root {
  color-scheme: dark;
  --void: #08090b;
  --bg: #0e1013;
  --surf-1: #14171b;
  --surf-2: #1a1e23;
  --surf-3: #222831;
  --surf-inset: #0b0d10;
  --line-1: #1c2127;
  --line-2: #2a313a;
  --line-3: #3b444f;
  --tx-hi: #edf1f5;
  --tx: #c0c8d1;
  --tx-dim: #8b949e;
  --tx-mute: #5c646d;
  --tx-on-red: #fff4f5;
  --red: #ff2e3f;
  --red-hi: #ff5a67;
  --red-600: #d91324;
  --red-deep: #7a0b16;
  --red-wash: #25090d;
  --ok: #3ecf8e;
  --warn: #e9a83a;
  --sleep: #6e8bff;
  --off: #6a727b;
  --blue: #5fa8ff;
  --f-ui: "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-num: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --rail: 64px;
  --topbar: 56px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 24px);
  scrollbar-color: var(--line-3) var(--surf-inset);
  scrollbar-width: auto;
  scrollbar-gutter: stable;
}

*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: var(--surf-inset); }
*::-webkit-scrollbar-thumb { background: var(--line-3); border: 3px solid var(--surf-inset); border-radius: var(--radius); }
*::-webkit-scrollbar-thumb:hover { background: var(--tx-dim); }
*::-webkit-scrollbar-thumb:active { background: var(--tx); }
@media (forced-colors: active) { html { scrollbar-color: auto; } }

body {
  margin: 0;
  min-width: 320px;
  background: var(--void);
  color: var(--tx);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

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

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 80px;
  padding: 9px 14px;
  background: var(--red);
  color: var(--tx-on-red);
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

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

.app-shell {
  min-height: 100vh;
}

.rail {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surf-inset);
  border-right: 1px solid var(--line-1);
}

.rail-logo {
  position: relative;
  width: 100%;
  height: var(--topbar);
  display: grid;
  place-items: center;
  color: var(--tx-hi);
  border-bottom: 1px solid var(--line-1);
  font-family: var(--f-num);
  font-size: 19px;
  font-weight: 700;
}

.rail-logo i {
  position: absolute;
  width: 6px;
  height: 6px;
  top: 15px;
  right: 13px;
  background: var(--red);
}

.rail-nav {
  width: 100%;
  padding-top: 22px;
  display: grid;
  gap: 6px;
}

.rail-link {
  position: relative;
  width: 100%;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--tx-mute);
  transition: color 120ms ease, background 120ms ease;
}

.rail-link:hover,
.rail-link.is-active {
  background: var(--surf-1);
  color: var(--tx-hi);
}

.rail-link.is-active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  background: var(--red);
}

.rail-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.rail-status {
  margin-top: auto;
  height: 64px;
  display: grid;
  place-items: center;
}

.status-shape,
.address-signal {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  background: currentColor;
}

.status-online { color: var(--ok); }
.status-sleeping { color: var(--sleep); }
.status-starting { color: var(--warn); }
.status-degraded,
.status-offline { color: var(--red); }
.status-unknown { color: var(--off); }

.status-shape.status-online,
.address-signal.status-online { border-radius: 50%; }

.status-shape.status-sleeping { border-radius: 50% 0 50% 50%; }

.topbar {
  position: fixed;
  z-index: 25;
  inset: 0 0 auto var(--rail);
  height: var(--topbar);
  padding: 0 24px;
  display: flex;
  align-items: center;
  background: rgba(11, 13, 16, 0.96);
  border-bottom: 1px solid var(--line-1);
}

.wordmark {
  color: var(--tx-hi);
  font-weight: 750;
  letter-spacing: .22em;
  font-size: 15px;
  white-space: nowrap;
}

.wordmark i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 2px;
  background: var(--red);
  vertical-align: 2px;
}

.breadcrumb {
  color: var(--tx-mute);
  margin-left: 12px;
  font-family: var(--f-num);
  font-size: 11px;
  letter-spacing: .08em;
}

.address-copy {
  height: 32px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surf-1);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.address-copy:hover {
  background: var(--surf-2);
  border-color: var(--line-3);
}

.address-copy .address-signal {
  width: 6px;
  height: 6px;
  color: var(--red);
  border-radius: 50%;
}

.address-value,
.topbar time {
  font-family: var(--f-num);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.address-copy svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--tx-dim);
  stroke-width: 1.5;
}

.account-button {
  height: 32px;
  max-width: 210px;
  margin-right: 15px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--tx-dim);
  cursor: pointer;
}
.account-button:hover { color: var(--tx-hi); border-color: var(--red-deep); }
.account-button span { color: var(--red-hi); font: 16px/1 var(--f-num); }
.account-button b { overflow: hidden; font: 650 8px var(--f-num); letter-spacing: .07em; text-overflow: ellipsis; white-space: nowrap; }
.account-button.is-linked { color: var(--ok); border-color: rgba(62, 207, 142, .3); background: rgba(62, 207, 142, .05); }
.account-button.is-linked span { color: var(--ok); }

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.topbar time {
  color: var(--tx-dim);
}

.status-pill {
  min-height: 22px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-family: var(--f-num);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
}

.status-planned {
  color: var(--tx-dim);
}

main {
  margin-left: var(--rail);
  padding-top: var(--topbar);
  overflow: hidden;
}

.hero,
.section,
.site-footer {
  width: min(100% - 48px, 1512px);
  margin-inline: auto;
}

.hero {
  min-height: 520px;
  padding: 92px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  gap: 84px;
  align-items: center;
  border-bottom: 1px solid var(--line-1);
}

.eyebrow,
.section-index,
.panel-kicker,
.metric-top,
.metric-unit,
.live-indicator,
.panel-note {
  margin: 0;
  color: var(--tx-dim);
  font-family: var(--f-num);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--red-hi);
}

.eyebrow span {
  width: 22px;
  height: 1px;
  background: var(--red);
}

h1 {
  max-width: 800px;
  margin: 18px 0 18px;
  color: var(--tx-hi);
  font-size: clamp(48px, 6.1vw, 88px);
  font-weight: 680;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero-lede {
  max-width: 610px;
  margin: 0;
  color: var(--tx-dim);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.button:active { transform: translateY(1px); }
.button-primary { background: var(--red); color: var(--tx-on-red); }
.button-primary:hover { background: var(--red-600); }
.button-secondary { background: transparent; border-color: var(--line-2); color: var(--tx); }
.button-secondary:hover { background: var(--surf-1); border-color: var(--line-3); }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.hero-readout {
  position: relative;
  border: 1px solid var(--line-2);
  background: var(--surf-inset);
}

.hero-readout::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 2px;
  background: var(--red);
}

.readout-head,
.panel-header {
  min-height: 43px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-1);
}

.readout-head {
  color: var(--tx-mute);
  font-family: var(--f-num);
  font-size: 10px;
  letter-spacing: .1em;
}

.readout-main {
  min-height: 136px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-status-glyph {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid var(--line-3);
}

.hero-status-glyph::before,
.hero-status-glyph::after {
  content: "";
  position: absolute;
  background: var(--off);
}

.hero-status-glyph::before { inset: 16px; }
.hero-status-glyph::after { width: 14px; height: 2px; right: -7px; top: 25px; }
.hero-status-glyph.is-online::before,
.hero-status-glyph.is-online::after { background: var(--ok); }
.hero-status-glyph.is-offline::before,
.hero-status-glyph.is-offline::after { background: var(--red); }

.readout-main strong {
  display: block;
  color: var(--tx-hi);
  font-family: var(--f-num);
  font-size: 20px;
  letter-spacing: .03em;
}

.readout-main span:last-child {
  display: block;
  margin-top: 7px;
  color: var(--tx-dim);
  font-size: 12px;
}

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

.readout-grid div {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--line-1);
}

.readout-grid div:last-child { border-right: 0; }
.readout-grid dt { color: var(--tx-mute); font-family: var(--f-num); font-size: 9px; letter-spacing: .08em; }
.readout-grid dd { margin: 5px 0 0; color: var(--tx-hi); font-family: var(--f-num); font-size: 14px; font-variant-numeric: tabular-nums; }

.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line-1);
}

.section-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.section-heading h2 {
  margin: 7px 0 0;
  color: var(--tx-hi);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.section-heading > p {
  max-width: 460px;
  margin: 0;
  color: var(--tx-dim);
  font-size: 13px;
  text-align: right;
}

.section-index { color: var(--red-hi); }

.world-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  border-left: 1px solid var(--line-2);
}

.world-card {
  position: relative;
  min-width: 0;
  min-height: 148px;
  padding: 17px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  background: var(--surf-1);
  transition: background 120ms ease;
}

.world-card:hover { background: var(--surf-2); }
.world-card.is-online::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 2px;
  background: var(--red);
}

.world-card-head,
.world-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.world-card-title {
  color: var(--tx-hi);
  font-size: 14px;
  font-weight: 650;
}

.world-card .status-pill { padding-inline: 6px; font-size: 9px; }
.world-card-subtitle { margin: 7px 0 25px; color: var(--tx-dim); font-size: 12px; }
.world-card-foot { align-items: end; }
.world-card-stat strong { display: block; color: var(--tx-hi); font: 600 18px/1 var(--f-num); }
.world-card-stat span { display: block; margin-top: 6px; color: var(--tx-mute); font: 9px/1 var(--f-num); letter-spacing: .08em; }
.world-card-meta { color: var(--tx-mute); font: 10px/1.4 var(--f-num); text-align: right; }

.skeleton {
  opacity: .42;
  animation: breathe 1.4s ease-in-out infinite alternate;
}

@keyframes breathe { to { opacity: .72; } }

.live-indicator {
  color: var(--tx-dim);
}

.live-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: var(--red);
  border-radius: 50%;
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse { 50% { opacity: .35; } }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line-2);
  border-top: 1px solid var(--line-2);
}

.metric-card {
  position: relative;
  min-height: 164px;
  padding: 16px 17px;
  overflow: hidden;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  background: var(--surf-1);
}

.metric-top { display: flex; justify-content: space-between; }
.metric-delta { color: var(--tx-mute); }
.metric-delta.is-up { color: var(--warn); }
.metric-delta.is-good { color: var(--ok); }

.metric-card > strong {
  position: relative;
  z-index: 2;
  display: block;
  width: fit-content;
  margin-top: 21px;
  color: var(--tx-hi);
  font-family: var(--f-num);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.metric-unit {
  position: relative;
  z-index: 2;
  display: block;
  width: fit-content;
  margin-top: 10px;
  color: var(--tx-mute);
  font-size: 9px;
}

.spark-chart {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 48%;
  height: 58px;
}

.ops-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 20px;
}

.panel {
  background: var(--surf-1);
  border: 1px solid var(--line-1);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  min-height: 53px;
  padding-inline: 16px;
}

.panel-header h3 {
  margin: 3px 0 0;
  color: var(--tx-hi);
  font-size: 14px;
  font-weight: 620;
}

.chart-legend {
  display: flex;
  gap: 14px;
  color: var(--tx-dim);
  font: 10px var(--f-num);
}

.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 2px; background: var(--warn); }
.chart-legend .legend-ram { background: var(--blue); }

.large-chart-wrap {
  position: relative;
  height: 330px;
  background: var(--surf-inset);
}

.large-chart { width: 100%; height: 100%; }
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--tx-mute);
  font: 10px var(--f-num);
  letter-spacing: .08em;
}
.chart-empty.is-hidden { display: none; }

.side-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.panel-count { color: var(--tx-hi); font: 600 13px var(--f-num); }
.player-list { min-height: 120px; }
.player-row {
  position: relative;
  min-height: 48px;
  padding: 7px 14px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-1);
  width: 100%;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  text-align: left;
  cursor: pointer;
}
.player-row:disabled { cursor: default; }
.player-row:last-child { border-bottom: 0; }
.player-row:hover { background: var(--surf-2); }
.player-row:hover::before { content: ""; position: absolute; inset: 7px auto 7px 0; width: 2px; background: var(--red); }
.player-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--surf-3);
  border: 1px solid var(--line-3);
  color: var(--tx-hi);
  font: 650 11px var(--f-num);
}
.player-name { min-width: 0; color: var(--tx-hi); font: 12px var(--f-num); overflow: hidden; text-overflow: ellipsis; }
.player-world { color: var(--tx-mute); font: 9px var(--f-num); letter-spacing: .05em; text-transform: uppercase; }

.empty-state {
  min-height: 160px;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--tx-mute);
  text-align: center;
}
.empty-state.compact { min-height: 120px; }
.empty-state p { margin: 8px 0 0; font-size: 12px; }
.empty-glyph { color: var(--line-3); font: 28px var(--f-num); }

.event-log { margin: 0; padding: 6px 14px; list-style: none; }
.event-log li { min-height: 35px; display: grid; grid-template-columns: 52px 1fr; align-items: center; border-bottom: 1px solid var(--line-1); }
.event-log li:last-child { border-bottom: 0; }
.event-log time { color: var(--tx-mute); font: 10px var(--f-num); }
.event-log span { color: var(--tx-dim); font-size: 11px; }
.event-log strong { color: var(--tx); font-weight: 500; }

.bluemap-panel { overflow: hidden; }
.bluemap-header { background: var(--surf-1); }
.bluemap-actions { display: flex; align-items: center; gap: 9px; }
.bluemap-open { min-height: 32px; padding-inline: 11px; font-family: var(--f-num); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.bluemap-frame-shell { position: relative; height: 720px; background: var(--surf-inset); }
.bluemap-frame-shell iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--surf-inset); }
.bluemap-gate { position: absolute; inset: 0; z-index: 2; padding: 28px; display: grid; place-content: center; justify-items: center; background: radial-gradient(circle at 50% 45%, rgba(255, 46, 63, .09), transparent 28%), linear-gradient(rgba(11, 13, 16, .9), rgba(11, 13, 16, .97)), repeating-linear-gradient(45deg, transparent 0 34px, rgba(255, 255, 255, .018) 34px 35px); text-align: center; transition: opacity 180ms ease; }
.bluemap-gate.is-hidden { opacity: 0; pointer-events: none; }
.bluemap-gate-glyph { width: 68px; height: 68px; margin-bottom: 20px; display: grid; place-items: center; border: 1px solid var(--red-deep); color: var(--red-hi); font: 34px/1 var(--f-num); transform: rotate(45deg); }
.bluemap-gate-glyph::first-letter { transform: rotate(-45deg); }
.bluemap-gate h4 { margin: 7px 0 4px; color: var(--tx-hi); font-size: clamp(26px, 4vw, 42px); letter-spacing: -.04em; }
.bluemap-gate > p:not(.panel-kicker) { max-width: 430px; margin: 0 0 24px; color: var(--tx-dim); }
.bluemap-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--surf-inset); color: var(--tx-mute); font: 10px var(--f-num); letter-spacing: .08em; pointer-events: none; transition: opacity 180ms ease; }
.bluemap-loading span { width: 8px; height: 8px; background: var(--red); animation: live-pulse 1s ease-in-out infinite; }
.bluemap-loading.is-hidden { opacity: 0; }
.bluemap-footer { min-height: 34px; padding: 0 14px; display: flex; align-items: center; gap: 24px; background: var(--surf-2); border-top: 1px solid var(--line-1); color: var(--tx-mute); font: 9px var(--f-num); letter-spacing: .04em; }
.bluemap-note { margin-left: auto; }

.bases-panel { margin-top: 20px; overflow: hidden; }
.bases-actions { display: flex; align-items: center; gap: 10px; }
.bases-actions .button { min-height: 32px; padding-inline: 11px; font: 8px var(--f-num); letter-spacing: .06em; text-transform: uppercase; }
.base-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.base-list > .empty-state { grid-column: 1 / -1; }
.base-list code { color: var(--tx); font: 10px var(--f-num); }
.base-card { min-height: 142px; padding: 20px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 15px; align-items: start; border-right: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }
.base-card:nth-child(2n) { border-right: 0; }
.base-card-icon { width: 38px; height: 38px; display: grid; place-items: center; background: var(--red-wash); border: 1px solid var(--red-deep); color: var(--red-hi); font: 19px var(--f-num); }
.base-card-copy { min-width: 0; }
.base-card-copy > span { color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .06em; }
.base-card-copy h4 { margin: 5px 0 3px; color: var(--tx-hi); font-size: 15px; }
.base-card-copy p { margin: 0; color: var(--tx-dim); font-size: 10px; line-height: 1.5; }
.base-card-actions { display: grid; justify-items: end; gap: 8px; }
.base-card-actions button { padding: 3px 0; background: transparent; border: 0; color: var(--tx-mute); font: 8px var(--f-num); cursor: pointer; }
.base-card-actions button:hover { color: var(--red-hi); }
.bases-footer { min-height: 36px; padding: 0 16px; display: flex; align-items: center; background: var(--surf-inset); color: var(--tx-mute); font-size: 9px; }

.map-panel { overflow: visible; }
.map-header { border-radius: var(--radius) var(--radius) 0 0; background: var(--surf-1); }
.map-actions { display: flex; align-items: center; gap: 5px; }
.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--tx-dim);
  cursor: pointer;
}
.icon-button:hover { background: var(--surf-2); color: var(--tx-hi); border-color: var(--line-3); }
.zoom-readout { min-width: 48px; color: var(--tx-dim); font: 10px var(--f-num); text-align: center; }

.map-body { position: relative; height: 560px; display: grid; grid-template-columns: 188px minmax(0, 1fr); }
.map-sidebar { position: relative; z-index: 2; padding: 18px 14px; background: var(--surf-1); border-right: 1px solid var(--line-1); }
.map-sidebar fieldset { margin: 0 0 25px; padding: 0; border: 0; }
.map-sidebar legend { margin-bottom: 10px; color: var(--tx-mute); font: 650 9px var(--f-num); letter-spacing: .12em; }
.map-world-tabs { display: grid; gap: 3px; }
.map-world-button {
  position: relative;
  min-height: 33px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--tx-dim);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.map-world-button:hover,
.map-world-button[aria-selected="true"] { background: var(--surf-2); color: var(--tx-hi); }
.map-world-button[aria-selected="true"]::before { content: ""; position: absolute; inset: 6px auto 6px 0; width: 2px; background: var(--red); }
.map-sidebar label { min-height: 30px; display: flex; align-items: center; gap: 9px; color: var(--tx-dim); font-size: 11px; cursor: pointer; }
.map-sidebar input { appearance: none; width: 13px; height: 13px; display: grid; place-items: center; border: 1px solid var(--line-3); border-radius: 2px; background: var(--surf-inset); }
.map-sidebar input:checked::before { content: ""; width: 7px; height: 7px; background: var(--red); }
.map-facts { position: absolute; right: 14px; bottom: 18px; left: 14px; padding-top: 14px; display: grid; grid-template-columns: 1fr auto; row-gap: 7px; border-top: 1px solid var(--line-1); }
.map-facts span { color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .08em; }
.map-facts strong { color: var(--tx); font: 10px var(--f-num); font-weight: 500; text-align: right; }

.map-viewport {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background-color: var(--surf-inset);
  cursor: crosshair;
  user-select: none;
}
.map-viewport.is-dragging { cursor: grabbing; }
#map-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(11, 13, 16, .82); color: var(--tx-mute); font: 10px var(--f-num); letter-spacing: .08em; }
.map-loading.is-hidden { display: none; }
.map-loading span { width: 8px; height: 8px; background: var(--red); animation: live-pulse 1s ease-in-out infinite; }
.map-compass { position: absolute; top: 18px; right: 18px; width: 32px; height: 47px; color: var(--tx-dim); font: 9px var(--f-num); text-align: center; pointer-events: none; }
.map-compass i { display: block; width: 1px; height: 29px; margin: 5px auto 0; background: var(--line-3); }
.map-compass i::before { content: ""; display: block; width: 5px; height: 5px; background: var(--red); transform: translate(-2px, -1px) rotate(45deg); }
.map-scale { position: absolute; right: 18px; bottom: 16px; min-width: 108px; padding-top: 5px; border-top: 2px solid var(--tx-dim); color: var(--tx-dim); font: 9px var(--f-num); text-align: center; pointer-events: none; }
.map-status { min-height: 34px; padding: 0 14px; display: flex; align-items: center; gap: 24px; background: var(--surf-2); border-top: 1px solid var(--line-1); border-radius: 0 0 var(--radius) var(--radius); color: var(--tx-mute); font: 9px var(--f-num); letter-spacing: .04em; }
.map-status b { color: var(--tx); font-weight: 500; }
.map-source { margin-left: auto; }

.community-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, .8fr); gap: 20px; }
.ranking-tabs { padding: 10px 12px; display: flex; gap: 6px; overflow-x: auto; background: var(--surf-inset); border-top: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }
.ranking-tab { min-height: 30px; padding: 0 11px; flex: 0 0 auto; background: transparent; border: 1px solid var(--line-2); border-radius: 3px; color: var(--tx-mute); font: 9px var(--f-num); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.ranking-tab:hover { border-color: var(--line-3); color: var(--tx); }
.ranking-tab.is-active { background: var(--red-wash); border-color: var(--red-deep); color: var(--red-hi); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 35px; color: var(--tx-mute); background: var(--surf-inset); font: 650 9px var(--f-num); letter-spacing: .09em; text-align: left; }
td { height: 48px; color: var(--tx-dim); font: 12px var(--f-num); }
th, td { padding: 0 14px; border-bottom: 1px solid var(--line-1); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surf-2); }
th:nth-child(n+3), td:nth-child(n+3) { text-align: right; }
td:first-child { width: 50px; color: var(--tx-mute); }
.rank-player { display: flex; align-items: center; gap: 10px; color: var(--tx-hi); }
.rank-player .player-avatar { flex: 0 0 auto; }
.rank-player b { padding: 2px 5px; color: var(--ok); background: rgba(62, 207, 142, .08); border: 1px solid rgba(62, 207, 142, .25); font: 7px var(--f-num); letter-spacing: .06em; }
.table-loading { height: 180px; color: var(--tx-mute); text-align: center !important; }
.leaderboard-footer { min-height: 38px; padding: 0 14px; display: flex; align-items: center; color: var(--tx-mute); background: var(--surf-inset); border-top: 1px solid var(--line-1); font-size: 9px; }

.community-side { display: grid; gap: 20px; }
.featured-event { padding: 20px 18px 16px; display: flex; gap: 16px; align-items: center; }
.event-date { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-content: center; background: var(--red-wash); border: 1px solid var(--red-deep); text-align: center; }
.event-date strong { color: var(--tx-hi); font: 650 23px/1 var(--f-num); }
.event-date span { margin-top: 5px; color: var(--red-hi); font: 8px/1 var(--f-num); letter-spacing: .1em; }
.featured-event p { margin: 0; color: var(--tx-hi); font-size: 13px; font-weight: 600; }
.featured-event div > span { display: block; margin-top: 6px; color: var(--tx-dim); font-size: 11px; }
.event-progress { height: 2px; margin: 0 18px; background: var(--line-2); }
.event-progress i { display: block; width: 62%; height: 100%; background: var(--red); }
.event-progress i.is-empty { width: 0; }
.event-footnote { margin: 13px 18px 18px; color: var(--tx-mute); font-size: 10px; line-height: 1.5; }
.achievement-grid { padding: 17px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.achievement { aspect-ratio: 1; min-width: 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: var(--surf-2); border: 1px solid var(--line-2); color: var(--tx-mute); opacity: .45; }
.achievement.is-earned { position: relative; color: var(--tx-hi); border-color: var(--red-deep); opacity: 1; }
.achievement.is-earned::after { content: ""; position: absolute; top: 0; right: 0; width: 7px; height: 7px; background: var(--red); }
.achievement span { font: 600 17px var(--f-num); }
.achievement small { color: var(--tx-mute); font: 7px var(--f-num); letter-spacing: .08em; }

.modpack-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 20px; }
.modpack-hero { min-height: 420px; padding: 34px; display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 38px; background: radial-gradient(circle at 20% 50%, rgba(255, 46, 63, .13), transparent 38%), var(--surf-1); }
.modpack-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: var(--surf-inset); border: 1px solid var(--red-deep); box-shadow: 0 22px 60px rgba(0, 0, 0, .35); }
.modpack-art::before, .modpack-art::after { content: ""; position: absolute; width: 75%; height: 75%; border: 1px solid var(--line-3); transform: rotate(45deg); }
.modpack-art::after { width: 48%; height: 48%; border-color: var(--red-deep); }
.modpack-art span { position: relative; z-index: 2; color: var(--tx-hi); font: 800 82px/1 var(--f-num); letter-spacing: -.1em; }
.modpack-art i { position: absolute; z-index: 2; right: 12px; bottom: 10px; padding: 3px 7px; background: var(--red); color: white; font: normal 9px var(--f-num); }
.modpack-copy h3 { max-width: 440px; margin: 9px 0 12px; color: var(--tx-hi); font-size: clamp(28px, 3vw, 44px); line-height: 1.04; letter-spacing: -.04em; }
.modpack-copy > p { max-width: 540px; margin: 0; color: var(--tx-dim); font-size: 12px; }
.modpack-facts { margin: 25px 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.modpack-facts div { min-height: 62px; padding: 11px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.modpack-facts dt { color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .08em; }
.modpack-facts dd { margin: 6px 0 0; color: var(--tx-hi); font: 11px var(--f-num); }
.modpack-download { width: fit-content; }
.button.is-disabled { opacity: .45; pointer-events: none; }
.install-steps { margin: 0; padding: 9px 17px 17px; list-style: none; }
.install-steps li { padding: 17px 0; display: grid; grid-template-columns: 36px 1fr; gap: 12px; border-bottom: 1px solid var(--line-1); }
.install-steps li > span { color: var(--red-hi); font: 10px var(--f-num); }
.install-steps strong { color: var(--tx-hi); font-size: 12px; }
.install-steps p { margin: 5px 0 0; color: var(--tx-mute); font-size: 10px; }
.install-steps code { color: var(--tx); font: 10px var(--f-num); }
.mod-list-preview { padding: 16px; display: flex; flex-wrap: wrap; gap: 5px; background: var(--surf-inset); border-top: 1px solid var(--line-1); }
.mod-list-preview span, .mod-list-preview b { max-width: 100%; padding: 4px 6px; overflow: hidden; background: var(--surf-2); border: 1px solid var(--line-2); color: var(--tx-mute); font: 8px var(--f-num); text-overflow: ellipsis; white-space: nowrap; }
.mod-list-preview b { color: var(--red-hi); font-weight: 500; }

.modpack-updates { margin-top: 20px; }
.modpack-update-controls { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 20px 24px 0; }
.modpack-update-controls > label { flex: 1; max-width: 560px; color: var(--tx); font-size: 13px; }
.modpack-update-controls select { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 10px; background: var(--surf-inset); border: 1px solid var(--line-3); color: var(--tx-hi); cursor: pointer; }
.modpack-help { margin: 12px 24px 16px; color: var(--tx-dim); font-size: 13px; min-height: 40px; }
.modpack-update-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 16px 24px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--surf-inset); }
.modpack-filter { display: flex; align-items: center; gap: 9px; cursor: pointer; color: var(--tx-hi); font-size: 13px; }
.modpack-filter input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); cursor: pointer; }
#modpack-update-status { flex: 1 1 270px; margin: 0; color: var(--tx-dim); font-size: 13px; min-height: 20px; }
.mod-file-list { margin: 0; padding: 0 24px; list-style: none; }
.mod-file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.mod-file-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.mod-file-heading strong { color: var(--tx-hi); font-size: 15px; overflow-wrap: anywhere; }
.mod-change { padding: 3px 7px; border: 1px solid var(--line-3); color: var(--tx-dim); font-size: 11px; }
.mod-change-new { color: var(--ok); border-color: var(--ok); }
.mod-change-updated { color: var(--warn); border-color: var(--warn); }
.mod-file-meta, .mod-file-name, .mod-replace { display: block; margin-top: 7px; color: var(--tx-dim); font: 11px/1.6 var(--f-num); overflow-wrap: anywhere; }
.mod-replace { color: var(--warn); }
.mod-file-actions { display: grid; justify-items: end; gap: 10px; }
.mod-file-actions .button { min-height: 42px; font-size: 12px; }
.mod-file-actions .button[aria-busy="true"] { opacity: .6; cursor: progress; }
.mod-download-status { max-width: 240px; min-height: 18px; color: var(--tx-dim); font-size: 12px; text-align: right; }
.mod-remember-one { min-height: 32px; padding: 4px 0; border: 0; background: transparent; color: var(--tx-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 12px; }
.mod-remember-one:hover { color: var(--tx-hi); }
.mod-remember-one:active { color: var(--red-hi); }
.mod-remember-one:disabled { color: var(--ok); cursor: default; text-decoration: none; }
.modpack-updates button:disabled, .modpack-updates select:disabled, .modpack-updates input:disabled { cursor: default; opacity: .6; }
.modpack-empty, .modpack-removed { margin: 0; padding: 24px; color: var(--tx-dim); font-size: 13px; }
.modpack-removed { color: var(--warn); overflow-wrap: anywhere; }
.modpack-more { margin: 20px 24px 0; }
.modpack-install-hint { margin: 0; padding: 24px; font-size: 13px; color: var(--tx-dim); }
.modpack-updates [hidden] { display: none !important; }
@media (max-width: 680px) {
  .modpack-update-controls { align-items: stretch; flex-direction: column; padding-inline: 16px; }
  .modpack-update-controls > label { max-width: none; }
  .modpack-help { margin-inline: 16px; }
  .modpack-update-summary, .modpack-install-hint, .modpack-empty, .modpack-removed { padding-inline: 16px; }
  .mod-file-list { padding-inline: 16px; }
  .mod-file-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .mod-file-actions { grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .mod-download-status { grid-column: 1 / -1; max-width: none; text-align: left; }
  .modpack-more { margin-inline: 16px; }
}

.profile-dialog { width: min(840px, calc(100% - 28px)); max-height: min(88vh, 860px); padding: 0; overflow: auto; background: var(--surf-1); border: 1px solid var(--line-3); border-radius: var(--radius); color: var(--tx); box-shadow: 0 30px 100px rgba(0, 0, 0, .7); }
.profile-dialog::backdrop { background: rgba(3, 4, 6, .82); backdrop-filter: blur(8px); }
.profile-close { position: sticky; z-index: 4; top: 12px; float: right; width: 34px; height: 34px; margin: 12px 12px -46px 0; background: var(--surf-3); border: 1px solid var(--line-3); color: var(--tx-dim); font: 22px/1 var(--f-ui); cursor: pointer; }
.profile-close:hover { color: var(--tx-hi); border-color: var(--red-deep); }
.profile-loading { min-height: 440px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--tx-mute); font: 10px var(--f-num); letter-spacing: .08em; }
.profile-loading span { width: 8px; height: 8px; background: var(--red); animation: live-pulse 1s infinite; }
.profile-header { min-height: 180px; padding: 34px; display: flex; align-items: center; gap: 24px; background: radial-gradient(circle at 10% 50%, rgba(255, 46, 63, .14), transparent 35%), var(--surf-inset); border-bottom: 1px solid var(--line-2); }
.profile-avatar { width: 92px; height: 92px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surf-2); border: 1px solid var(--red-deep); color: var(--tx-hi); font: 750 31px var(--f-num); box-shadow: inset 0 0 0 8px var(--surf-inset); }
.profile-header h2 { margin: 5px 0; color: var(--tx-hi); font-size: 38px; line-height: 1; letter-spacing: -.04em; }
.profile-header code { color: var(--tx-mute); font: 9px var(--f-num); }
.skin-stage { position: relative; width: 150px; height: 180px; padding: 0; overflow: hidden; box-shadow: none; }
.skin-canvas { position: relative; z-index: 2; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.skin-canvas:active { cursor: grabbing; }
.skin-fallback { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; background: var(--surf-2); color: var(--tx-hi); font: 750 31px var(--f-num); }
.skin-fallback.is-hidden { display: none; }
.skin-stage small { position: absolute; z-index: 3; right: 7px; bottom: 6px; color: var(--tx-mute); font: 7px var(--f-num); letter-spacing: .06em; pointer-events: none; }
.profile-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-identity b, .profile-identity > span { padding: 3px 6px; color: var(--ok); background: rgba(62, 207, 142, .06); border: 1px solid rgba(62, 207, 142, .25); font: 7px var(--f-num); letter-spacing: .06em; }
.profile-identity > span { color: var(--tx-mute); background: transparent; border-color: var(--line-2); }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line-1); }
.profile-metrics div { min-height: 94px; padding: 18px; border-right: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }
.profile-metrics span { display: block; color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .08em; }
.profile-metrics strong { display: block; margin-top: 10px; color: var(--tx-hi); font: 600 20px var(--f-num); }
.profile-extra { padding: 13px 18px; display: flex; flex-wrap: wrap; gap: 9px 22px; background: var(--surf-inset); border-bottom: 1px solid var(--line-1); color: var(--tx-mute); font: 8px var(--f-num); }
.profile-extra b { margin-left: 5px; color: var(--tx); font-weight: 500; }
.profile-worlds { padding: 22px; }
.profile-worlds h3 { margin: 0 0 13px; color: var(--tx-hi); font-size: 13px; }

.account-dialog { width: min(980px, calc(100% - 28px)); }
.account-hero { min-height: 235px; padding: 46px 54px 36px; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 26px; align-items: start; background: radial-gradient(circle at 10% 30%, rgba(255, 46, 63, .15), transparent 34%), var(--surf-inset); border-bottom: 1px solid var(--line-2); }
.account-hero-glyph { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid var(--red-deep); color: var(--red-hi); font: 32px var(--f-num); }
.account-hero h2 { max-width: 650px; margin: 8px 0 9px; color: var(--tx-hi); font-size: clamp(34px, 5vw, 54px); line-height: .98; letter-spacing: -.05em; }
.account-hero p:last-child { max-width: 590px; margin: 0; color: var(--tx-dim); }
.link-flow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); }
.link-steps { margin: 0; padding: 28px 34px; list-style: none; border-right: 1px solid var(--line-1); }
.link-steps li { min-height: 75px; padding: 13px 0; display: grid; grid-template-columns: 44px 1fr; gap: 10px; border-bottom: 1px solid var(--line-1); }
.link-steps li:last-child { border-bottom: 0; }
.link-steps li > span { color: var(--red-hi); font: 10px var(--f-num); }
.link-steps strong { color: var(--tx-hi); font-size: 12px; }
.link-steps p { margin: 5px 0 0; color: var(--tx-mute); font-size: 10px; }
.link-steps code { color: var(--tx); font: 10px var(--f-num); }
.link-form { padding: 42px 28px; background: var(--surf-2); }
.link-form label, .base-editor label { display: block; margin-bottom: 7px; color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .08em; }
.link-form input { width: 100%; height: 60px; padding: 0 14px; background: var(--surf-inset); border: 1px solid var(--line-3); color: var(--tx-hi); font: 650 25px var(--f-num); letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.link-form .button { width: 100%; margin-top: 10px; }
.account-profile-header { min-height: 230px; }
.account-player-copy { min-width: 0; }
.account-player-copy > p { max-width: 550px; margin: 10px 0; color: var(--tx-dim); }
.text-button { padding: 4px 0; background: transparent; border: 0; color: var(--tx-mute); font: 8px var(--f-num); text-decoration: underline; cursor: pointer; }
.text-button:hover { color: var(--red-hi); }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); }
.base-editor, .own-bases { padding: 28px; }
.base-editor { border-right: 1px solid var(--line-1); }
.base-editor h3, .own-bases h3 { margin: 5px 0 20px; color: var(--tx-hi); font-size: 21px; }
.base-editor label { margin: 0 0 13px; }
.base-editor input, .base-editor textarea, .base-editor select { width: 100%; margin-top: 6px; padding: 10px 11px; background: var(--surf-inset); border: 1px solid var(--line-3); border-radius: 0; color: var(--tx-hi); resize: vertical; }
.base-editor input, .base-editor select { min-height: 40px; }
.base-editor select { color-scheme: dark; }
.coordinate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.base-editor .button { width: 100%; }
.own-bases { background: var(--surf-inset); }
.own-bases ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-1); }
.own-bases li { min-height: 60px; padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-1); }
.own-bases li div { min-width: 0; }
.own-bases li strong, .own-bases li span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.own-bases li strong { color: var(--tx-hi); font-size: 11px; }
.own-bases li span { margin-top: 4px; color: var(--tx-mute); font: 8px var(--f-num); }
.own-bases li button { padding: 5px 0; background: transparent; border: 0; color: var(--red-hi); font: 7px var(--f-num); cursor: pointer; }
.own-bases .account-empty { justify-content: center; color: var(--tx-mute); font-size: 10px; text-align: center; }

.site-footer { min-height: 148px; display: flex; align-items: center; gap: 28px; }
.site-footer p { color: var(--tx-mute); font-size: 11px; }
.footer-address { margin-left: auto; padding: 8px 0; background: transparent; border: 0; color: var(--tx-dim); font: 11px var(--f-num); cursor: pointer; }
.footer-address span { margin-left: 12px; color: var(--red-hi); font-size: 8px; letter-spacing: .08em; }
.footer-admin { margin-left: auto; padding: 7px 9px; border: 1px solid var(--line-2); color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .08em; }
.footer-admin:hover { color: var(--tx-hi); border-color: var(--line-3); }
.footer-admin + .footer-address { margin-left: 0; }

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  padding: 12px 15px 12px 17px;
  background: var(--surf-3);
  border: 1px solid var(--line-3);
  border-left: 2px solid var(--red);
  color: var(--tx-hi);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

.admin-body { min-height: 100vh; background: radial-gradient(circle at 50% -20%, rgba(255, 46, 63, .11), transparent 38%), var(--void); }
.admin-topbar { height: 58px; padding: 0 max(20px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; gap: 15px; background: var(--surf-inset); border-bottom: 1px solid var(--line-1); }
.admin-topbar > span { color: var(--tx-mute); font: 9px var(--f-num); letter-spacing: .08em; }
.admin-topbar > a:last-child { margin-left: auto; color: var(--tx-dim); font: 9px var(--f-num); }
.admin-topbar > a:last-child:hover { color: var(--tx-hi); }
.admin-main { width: min(calc(100% - 32px), 1180px); margin: 0 auto; padding: 70px 0 100px; }
.admin-login { width: min(100%, 560px); margin: 7vh auto 0; padding: 42px; background: linear-gradient(145deg, rgba(255, 46, 63, .055), transparent 42%), var(--surf-1); }
.admin-lock { width: 54px; height: 54px; margin-bottom: 28px; display: grid; place-items: center; background: var(--red-wash); border: 1px solid var(--red-deep); color: var(--red-hi); }
.admin-login h1, .admin-heading h1 { margin: 8px 0 10px; color: var(--tx-hi); font-size: clamp(36px, 5vw, 64px); line-height: .95; letter-spacing: -.05em; }
.admin-login > p:not(.section-index) { margin: 0; color: var(--tx-dim); }
.admin-login form { margin-top: 38px; }
.admin-login label { display: block; margin-bottom: 8px; color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .08em; }
.admin-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-input-row input { min-width: 0; padding: 0 13px; background: var(--surf-inset); border: 1px solid var(--line-3); border-radius: 3px; color: var(--tx-hi); }
.form-message { min-height: 20px; margin: 10px 0 0; color: var(--red-hi); font: 9px var(--f-num); letter-spacing: .03em; }
.admin-heading { margin-bottom: 42px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.admin-heading-actions { display: flex; align-items: center; gap: 10px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .65fr); gap: 20px; }
.upload-form { padding: 22px; }
.file-drop { min-height: 210px; padding: 30px; display: grid; place-content: center; justify-items: center; background: var(--surf-inset); border: 1px dashed var(--line-3); text-align: center; cursor: pointer; transition: border-color 120ms, background 120ms; }
.file-drop:hover { background: var(--red-wash); border-color: var(--red-deep); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop-icon { width: 43px; height: 43px; margin-bottom: 13px; display: grid; place-items: center; background: var(--surf-2); border: 1px solid var(--line-3); color: var(--red-hi); font: 24px/1 var(--f-ui); }
.file-drop strong { max-width: 100%; color: var(--tx-hi); font: 12px var(--f-num); overflow-wrap: anywhere; }
.file-drop small { max-width: 390px; margin-top: 8px; color: var(--tx-mute); font-size: 9px; }
.admin-check { min-height: 48px; display: flex; align-items: center; gap: 10px; color: var(--tx-dim); font-size: 10px; cursor: pointer; }
.admin-check input { position: absolute; opacity: 0; }
.admin-check span { width: 15px; height: 15px; display: grid; place-items: center; background: var(--surf-inset); border: 1px solid var(--line-3); }
.admin-check input:checked + span::after { content: ""; width: 7px; height: 7px; background: var(--red); }
.restart-preview { margin: 4px 0 18px; padding: 14px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; background: var(--red-wash); border: 1px solid var(--red-deep); }
.restart-preview i { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--red-deep); color: var(--red-hi); font: normal 600 14px var(--f-num); }
.restart-preview strong { color: var(--tx-hi); font-size: 11px; }
.restart-preview p { margin: 4px 0 0; color: var(--tx-mute); font-size: 9px; }
.upload-submit { width: 100%; }
.upload-progress { height: 3px; margin-top: 13px; overflow: hidden; background: var(--line-2); }
.upload-progress i { display: block; width: 0; height: 100%; background: var(--red); transition: width 250ms ease; }
.admin-side { display: grid; align-content: start; gap: 20px; }
.admin-status-card dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-1); }
.admin-status-card dl div { min-height: 76px; padding: 14px 10px; border-right: 1px solid var(--line-1); }
.admin-status-card dl div:last-child { border-right: 0; }
.admin-status-card dt { color: var(--tx-mute); font: 7px var(--f-num); }
.admin-status-card dd { margin: 9px 0 0; color: var(--tx-hi); font: 10px var(--f-num); }
.admin-restart { width: calc(100% - 28px); margin: 17px 14px 8px; }
.admin-status-card > p { margin: 8px 14px 16px; color: var(--tx-mute); font-size: 9px; }
.admin-password-card form { padding: 16px; }
.admin-password-card label { display: block; margin: 13px 0 6px; color: var(--tx-mute); font: 8px var(--f-num); letter-spacing: .07em; }
.admin-password-card label:first-child { margin-top: 0; }
.admin-password-card input { width: 100%; min-height: 38px; padding: 0 10px; background: var(--surf-inset); border: 1px solid var(--line-3); border-radius: 3px; color: var(--tx-hi); }
.admin-password-card small { display: block; margin: 10px 0 14px; color: var(--tx-mute); font-size: 8px; line-height: 1.5; }
.admin-password-card .button { width: 100%; }
.admin-mods-panel { margin-top: 20px; }
.admin-mod-name { color: var(--tx-hi); overflow-wrap: anywhere; }
.pack-flag { padding: 3px 6px; color: var(--tx-mute); background: var(--surf-inset); border: 1px solid var(--line-2); font: 7px var(--f-num); }
.pack-flag.is-included { color: var(--ok); border-color: rgba(62, 207, 142, .25); }
.button:disabled { opacity: .45; cursor: wait; }

@media (max-width: 1199px) {
  .hero { grid-template-columns: 1fr 420px; gap: 44px; }
  .world-strip { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .ops-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .community-grid { grid-template-columns: 1fr; }
  .community-side { grid-template-columns: 1fr 1fr; }
  .modpack-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
  :root { --rail: 0px; }
  .rail { inset: auto 0 0 0; width: 100%; height: 58px; flex-direction: row; border-top: 1px solid var(--line-1); border-right: 0; }
  .rail-logo, .rail-status { display: none; }
  .rail-nav { height: 100%; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
  .rail-link { height: 100%; }
  .rail-link.is-active::before { inset: auto 18px 0; width: auto; height: 2px; }
  .topbar { left: 0; padding-inline: 16px; }
  .breadcrumb, .topbar time { display: none; }
  .address-copy { margin-left: auto; margin-right: 12px; }
  main { padding-bottom: 58px; }
  .hero, .section, .site-footer { width: min(100% - 32px, 760px); }
  .hero { min-height: auto; padding: 72px 0 56px; grid-template-columns: 1fr; gap: 44px; }
  h1 { font-size: clamp(50px, 12vw, 76px); }
  .section { padding: 58px 0; }
  .section-heading { align-items: start; }
  .world-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .world-card { min-width: 270px; scroll-snap-align: start; }
  .map-body { height: 480px; grid-template-columns: 150px minmax(0, 1fr); }
  .bluemap-frame-shell { height: 620px; }
  .base-list { grid-template-columns: 1fr; }
  .base-card { border-right: 0; }
  .account-grid, .link-flow { grid-template-columns: 1fr; }
  .link-steps, .base-editor { border-right: 0; border-bottom: 1px solid var(--line-1); }
  .map-status { gap: 14px; }
  .map-source { display: none; }
}

@media (max-width: 639px) {
  .topbar { gap: 10px; }
  .wordmark { font-size: 13px; }
  .address-value { display: none; }
  .address-copy { width: 34px; padding: 0; justify-content: center; }
  .address-copy .address-signal { display: none; }
  .account-button { width: 34px; padding: 0; margin-right: 7px; justify-content: center; }
  .account-button b { display: none; }
  .topbar-meta { gap: 0; }
  .hero, .section, .site-footer { width: calc(100% - 24px); }
  .hero { padding-top: 54px; }
  h1 { font-size: 48px; }
  .hero-lede { font-size: 14px; }
  .hero-actions { display: grid; }
  .readout-main { min-height: 112px; padding: 18px; }
  .hero-status-glyph { width: 44px; height: 44px; }
  .hero-status-glyph::before { inset: 13px; }
  .hero-status-glyph::after { top: 20px; }
  .readout-grid div { padding: 12px 10px; }
  .readout-grid dt { font-size: 7px; }
  .readout-grid dd { font-size: 11px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; text-align: left; }
  .world-card { min-width: 78%; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 150px; padding: 13px; }
  .metric-card > strong { font-size: 30px; }
  .spark-chart { width: 58%; opacity: .65; }
  .side-stack, .community-side { grid-template-columns: 1fr; }
  .modpack-hero { padding: 24px; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
  .large-chart-wrap { height: 240px; }
  .map-header { align-items: center; }
  .bluemap-header { align-items: center; }
  .bluemap-header .status-pill { display: none; }
  .bluemap-open { min-height: 34px; }
  .bluemap-frame-shell { height: 560px; }
  .bluemap-gate { padding: 18px; }
  .base-card { grid-template-columns: 38px minmax(0, 1fr); padding: 15px 12px; }
  .base-card-actions { grid-column: 2; width: 100%; display: flex; justify-content: space-between; }
  .bases-actions .panel-count { display: none; }
  .bluemap-footer { min-height: 48px; flex-wrap: wrap; gap: 4px 14px; padding-block: 7px; }
  .bluemap-note { width: 100%; margin-left: 0; }
  .map-body { height: 390px; display: block; }
  .map-sidebar { position: absolute; z-index: 4; top: 53px; left: 1px; width: 138px; height: 390px; padding: 13px 10px; background: rgba(20, 23, 27, .96); }
  .map-facts { display: none; }
  .map-viewport { height: 100%; margin-left: 138px; }
  .map-status { min-height: 46px; padding: 6px 10px; flex-wrap: wrap; gap: 4px 14px; }
  .achievement-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px; gap: 5px; }
  th, td { padding-inline: 9px; }
  th:nth-child(4), td:nth-child(4) { display: none; }
  .site-footer { min-height: 180px; flex-direction: column; justify-content: center; gap: 9px; }
  .site-footer p { margin: 0; }
  .footer-address { margin: 0; }
  .footer-admin { margin: 8px 0 0; }
  .profile-header { padding: 24px 18px; }
  .profile-avatar { width: 70px; height: 70px; }
  .profile-avatar.skin-stage { width: 112px; height: 145px; }
  .profile-header h2 { font-size: 30px; }
  .profile-identity code { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
  .profile-metrics { grid-template-columns: repeat(2, 1fr); }
  .account-hero { padding: 34px 20px 28px; grid-template-columns: 1fr; }
  .account-hero-glyph { width: 50px; height: 50px; }
  .link-steps, .link-form, .base-editor, .own-bases { padding: 22px 18px; }
  .account-profile-header { align-items: start; }
  .coordinate-grid { gap: 5px; }
  .modpack-hero { display: block; }
  .modpack-art { width: 150px; margin-bottom: 26px; }
  .admin-main { width: calc(100% - 24px); padding-top: 38px; }
  .admin-login { padding: 26px 20px; }
  .admin-input-row { grid-template-columns: 1fr; }
  .admin-input-row input { min-height: 44px; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-heading-actions { width: 100%; justify-content: space-between; }
  .upload-form { padding: 13px; }
  .file-drop { min-height: 180px; padding: 20px 12px; }
  .admin-mods-panel th:nth-child(4), .admin-mods-panel td:nth-child(4) { display: none; }
}

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

@media (prefers-contrast: more) {
  :root { --line-1: #3b444f; --line-2: #505b68; --tx-dim: #c0c8d1; --tx-mute: #8b949e; }
}
