:root {
  color-scheme: dark;
  --night-bg: #0b1017;
  --night-surface: #121b24;
  --night-text: #edf2f5;
  --night-muted: #aebbc7;
  --night-accent: #b9e8aa;
  --night-line: #273747;
  --night-gutter: clamp(14px, 2.4vw, 36px);
  --night-width: 1600px;
}
html, body.orbital-theme { background: var(--night-bg); }
body.orbital-theme { margin: 0; color: var(--night-text); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.orbital-theme :focus-visible { outline: 2px solid var(--night-accent); outline-offset: 4px; }
.orbital-theme ::selection { background: var(--night-accent); color: var(--night-bg); }
.orbital-theme .skip-link { color: var(--night-bg); background: var(--night-accent); }
.night-header, .night-footer {
  box-sizing: border-box;
  position: relative;
  z-index: 3;
  width: min(var(--night-width), calc(100% - var(--night-gutter) * 2));
  margin-inline: auto;
}
.night-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 22px;
  align-items: center;
  margin-top: max(15px, env(safe-area-inset-top));
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--night-line);
  border-radius: 21px;
  background: #101822;
}
.night-header a, .night-footer a { text-decoration: none; }
.night-brand {
  display: flex; align-items: center; gap: 10px; min-height: 46px;
  white-space: nowrap; color: var(--night-text);
}
.night-brand-icon { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #344844; border-radius: 11px; background: #192a2a; color: var(--night-accent); flex: none; }
.night-brand-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.night-brand strong { display: block; line-height: 1.18; font-size: 17px; font-weight: 760; }
.night-brand small { display: block; color: var(--night-muted); margin-top: 3px; font: 600 8px/1.1 system-ui,sans-serif; letter-spacing: .18em; }
.night-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.night-nav a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
  border: 1px solid transparent; border-radius: 12px; padding: 5px 13px;
  color: var(--night-muted); white-space: nowrap; font-size: 13px; font-weight: 650;
}
.night-nav a:hover, .night-nav a[aria-current] { background: #1a2733; border-color: var(--night-line); color: var(--night-text); }
.night-nav a[aria-current] { color: var(--night-accent); }
.night-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 18px; border-top: 1px solid var(--night-line); padding: 7px 0 max(12px,env(safe-area-inset-bottom)); margin-top: 20px; }
.night-footer nav { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.night-footer a { color: var(--night-muted); display: inline-flex; align-items: center; min-height: 42px; font-size: 12px; }
.night-footer > a { color: var(--night-text); font-weight: 680; }
.night-footer a:hover { color: var(--night-accent); }
.orbital-theme.dashboard-catalog > .edition > :is(.night-header,.night-footer), .orbital-history .page-frame > :is(.night-header,.night-footer) { width: 100%; }
@media (max-width: 680px) {
  .night-header { grid-template-columns: minmax(0, 1fr); gap: 4px; border-radius: 16px; padding: 6px 7px 7px; }
  .night-brand { padding-inline: 6px; min-height: 41px; }
  .night-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .night-nav a { min-height: 38px; padding: 4px; border-radius: 8px; font-size: 12px; }
}
