:root {
  color-scheme: dark;
  --bg: #0a0c0f;
  --text: #e8edf2;
  --muted: #9da8b3;
  --accent: #ff3b42;
  --accent-dim: #e1262e;
  --discord: #5865f2;
  --glass-fill: rgba(255, 255, 255, 0.09);
  --glass-fill-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.28);
  --radius: 20px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 24px;
  --tabbar-h: 96px;
  --shell-max: 1280px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }

/* Programmatic focus: no white box. Keyboard: subtle red ring. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgba(255, 59, 66, 0.85);
  outline-offset: 2px;
}
#content,
#content:focus,
#content:focus-visible,
#content:focus-within,
h2:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
h2:focus-visible {
  outline: 2px solid rgba(255, 59, 66, 0.85);
  outline-offset: 3px;
  border-radius: 4px;
}

/* —— Ambient glows (behind content) —— */
.bg-glow {
  position: fixed; pointer-events: none; z-index: 0;
  border-radius: 50%; filter: blur(100px);
}
.bg-glow--red {
  width: 520px; height: 480px; left: -160px; top: -40px;
  background: radial-gradient(circle, #ff3b42 0%, #a01018 55%, transparent 70%);
  opacity: 0.34;
}
.bg-glow--magenta {
  width: 380px; height: 360px; left: 18%; top: 42%;
  background: radial-gradient(circle, #c41e6a 0%, transparent 70%);
  opacity: 0.18;
}
.bg-glow--blue {
  width: 480px; height: 420px; right: -120px; bottom: -40px;
  background: radial-gradient(circle, #3d7ab8 0%, #1a3a5c 55%, transparent 70%);
  opacity: 0.30;
}

/* —— Glass primitives —— */
.glass-surface {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .glass-surface {
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(30px) saturate(140%);
    backdrop-filter: blur(30px) saturate(140%);
  }
}
.glass-bar, .glass-panel, .glass-chip, .glass-card, .glass-inset,
.card, .entry, .tabbar-pill, .tab-search, .search-wrap, .user-chip, .user-menu {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 var(--glass-highlight);
}
@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .glass-bar, .glass-panel, .glass-chip, .glass-card,
  .card, .entry, .tabbar-pill, .tab-search, .search-wrap, .user-chip, .user-menu {
    background: rgba(255, 255, 255, 0.09);
    -webkit-backdrop-filter: blur(30px) saturate(140%);
    backdrop-filter: blur(30px) saturate(140%);
  }
}

/* —— Top bar —— */
.topbar {
  position: sticky; top: 14px; z-index: 40;
  margin: 14px auto 0;
  width: calc(100% - 32px);
  max-width: var(--shell-max);
  padding: 8px 14px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 999px; min-height: 52px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  box-shadow: 0 0 16px rgba(255, 59, 66, 0.35);
}
.brand-text { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.topnav { display: flex; gap: 2px; margin-left: 8px; flex-wrap: wrap; }
.topnav a {
  color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
}
.topnav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.topnav a.active {
  color: #fff;
  background: rgba(255, 59, 66, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 59, 66, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-wrap {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
}
.search-wrap .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search-wrap input {
  border: 0; background: transparent; color: var(--text); font: inherit; width: 140px; outline: none;
}
.auth-slot { display: flex; align-items: center; position: relative; }

.btn, button.btn {
  font: inherit; cursor: pointer; border-radius: 999px; padding: 8px 14px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.08); color: var(--text);
}
.btn:hover { background: rgba(255,255,255,0.12); }
.btn-accent {
  background: var(--accent); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 0 20px rgba(255, 59, 66, 0.35);
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-discord { background: var(--discord); border-color: transparent; color: #fff; font-weight: 600; font-size: 13px; }
.btn-ghost { background: transparent; }

/* User chip + menu */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 8px 3px 3px; border-radius: 999px;
  font-size: 13px; cursor: pointer; color: inherit; font: inherit;
}
.user-chip .avatar, .user-chip img.avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, #5865f2, #ff3b42);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-chip .uname { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .chev { color: var(--muted); font-size: 10px; margin-left: 2px; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 160px; padding: 6px; border-radius: 14px;
  display: grid; gap: 2px;
}
.user-menu button {
  border: 0; background: transparent; color: var(--text); font: inherit;
  text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.user-menu button:hover { background: rgba(255,255,255,0.08); }
.user-menu button.danger { color: var(--accent); }

/* —— Layout —— */
.shell {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(240px, 28%) 1fr;
  gap: 20px;
  max-width: var(--shell-max);
  margin: 24px auto 48px;
  padding: 0 var(--gutter);
  width: 100%;
}
.sidebar {
  border-radius: var(--radius); padding: 28px 24px; align-self: start;
  position: sticky; top: 90px;
}
.sidebar h1 { font-size: 28px; line-height: 1.1; margin: 10px 0 16px; }
.sidebar p:not(.eyebrow) { color: var(--muted); line-height: 1.55; font-size: 14px; }
.eyebrow {
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 0;
}
.notice, .glass-inset {
  margin-top: 16px; padding: 14px; border-radius: 14px; font-size: 13px; line-height: 1.5;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.content {
  min-width: 0;
  padding: 10px 12px 56px;
}
.content > .eyebrow { margin-bottom: 6px; }
.content h2 {
  font-size: 30px; margin: 0 0 24px; font-weight: 700; letter-spacing: -0.02em;
}
.content h3 { font-size: 18px; margin: 28px 0 10px; }

/* —— Cards —— */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card-grid .card-feature { grid-column: 1 / -1; }

.glass-card, .card, .entry {
  display: grid; gap: 8px; text-align: left; width: 100%;
  padding: 18px 20px; border-radius: 18px; text-decoration: none; color: inherit;
  cursor: pointer; font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.glass-card:hover, .card:hover, .entry:hover {
  border-color: rgba(255, 59, 66, 0.45);
  background: rgba(255, 255, 255, 0.1);
}
.card-feature {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 28px 28px; min-height: 140px; border-radius: 22px;
}
.card-feature .card-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.card-feature .card-desc { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 4px 0 0; max-width: 52ch; }
.card .eyebrow, .entry span, .glass-card .eyebrow {
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.card b, .entry b, .card-title { font-size: 16px; font-weight: 650; }
.card small, .entry small, .meta { color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: var(--muted);
}
.chip-accent { color: #fff; background: rgba(255,59,66,0.28); border-color: rgba(255,59,66,0.4); }
.chip-class-euclid { color: #f0c14a; border-color: rgba(240,193,74,0.35); }
.chip-class-keter { color: #ff6b6b; border-color: rgba(255,107,107,0.35); }
.chip-class-safe { color: #6bcb77; border-color: rgba(107,203,119,0.35); }
.list { display: grid; gap: 10px; }
.empty {
  border: 1px dashed rgba(255,255,255,0.15); border-radius: 16px; padding: 28px;
  color: var(--muted); text-align: center;
  background: rgba(255,255,255,0.03);
}

article.prose { line-height: 1.75; color: #c7d0d8; }
article.prose h1, article.prose h2, article.prose h3 { color: var(--text); margin-top: 1.4em; }
article.prose a { color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filter-pill {
  border-radius: 999px; padding: 8px 14px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px;
}
.filter-pill.active {
  color: #fff; background: rgba(255,59,66,0.22); border-color: rgba(255,59,66,0.4);
}
.filters select, .filters input, .editor input, .editor select, .editor textarea,
label.field input, label.field select, label.field textarea {
  width: 100%; border: 1px solid rgba(255,255,255,0.12); background: rgba(8,10,14,0.55);
  color: var(--text); padding: 10px 12px; border-radius: 12px; font: inherit;
}
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .filters select, .filters input, .editor input, .editor select, .editor textarea,
  label.field input, label.field select, label.field textarea {
    backdrop-filter: blur(12px);
  }
}
.filters input { flex: 1; min-width: 180px; }
.filters select { min-width: 160px; width: auto; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions .btn.active, .actions button.active {
  background: rgba(255,59,66,0.25); border-color: rgba(255,59,66,0.45); color: #fff;
}

.editor { display: grid; gap: 14px; }
.editor label.field { display: grid; gap: 6px; color: var(--muted); font-size: 0.88rem; }
.editor textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch;
}
.split .pane {
  border-radius: 14px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05); padding: 12px; min-height: 320px; overflow: auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
  .split .pane {
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    backdrop-filter: blur(16px) saturate(130%);
  }
}
.split .pane textarea {
  width: 100%; height: 100%; min-height: 300px; border: 0; background: transparent;
  color: var(--text); font: inherit; resize: vertical; outline: none;
}
.split-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted);
  margin-bottom: 8px; text-transform: uppercase;
}

/* —— Mobile tab bar —— */
.mobile-tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 18px; z-index: 50;
  justify-content: center; align-items: center; gap: 8px; padding: 0 16px;
  pointer-events: none;
}
.mobile-tabbar > * { pointer-events: auto; }
.tabbar-pill {
  display: flex; align-items: stretch; gap: 0; padding: 6px;
  border-radius: 999px; max-width: 100%;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-width: 64px; padding: 8px 10px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-size: 10px; font-weight: 600;
  border: 0; background: transparent;
}
.tab .icon { width: 22px; height: 22px; }
.tab.active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 0 1px rgba(255, 59, 66, 0.18);
}
.tab-search {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); cursor: pointer; padding: 0;
}
.tab-search .icon { width: 22px; height: 22px; }

dialog#search-dialog {
  border-radius: 18px; padding: 18px; width: min(480px, calc(100vw - 32px));
  border: 1px solid var(--glass-border); color: var(--text);
  background: rgba(16, 20, 25, 0.92);
}
@supports ((-webkit-backdrop-filter: blur(24px)) or (backdrop-filter: blur(24px))) {
  dialog#search-dialog {
    background: rgba(255,255,255,0.08);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
  }
}
dialog#search-dialog::backdrop { background: rgba(0,0,0,0.55); }
.search-dialog-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search-dialog-form input { flex: 1; min-width: 140px; }

.more-menu { display: grid; gap: 8px; }
.more-menu a {
  display: block; padding: 16px; border-radius: 14px; text-decoration: none; color: inherit;
}

/* Mobile info chip (collapsed sidebar) */
.mobile-info-chip {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--muted);
  align-items: flex-start;
  gap: 10px;
}
.mobile-info-chip button {
  margin-left: auto; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; flex-shrink: 0;
}

@media (max-width: 900px) {
  :root { --gutter: 20px; --tabbar-h: 120px; }
  .shell { grid-template-columns: 1fr; margin: 16px auto 24px; gap: 12px; }
  .shell.home-mobile .sidebar { display: none; }
  .shell.home-mobile .mobile-info-chip:not(.is-dismissed) { display: flex; }
  .topnav { display: none; }
  .search-wrap { display: none; }
  .brand-text { display: inline; }
  .user-chip .uname { max-width: 72px; }
  .mobile-tabbar { display: flex; }
  body { padding-bottom: calc(var(--tabbar-h) + 20px); }
  .shell { padding-left: 16px; padding-right: 16px; }
  .content {
    padding: 8px 4px calc(var(--tabbar-h) + 56px);
  }
  .glass-card, .card, .entry { padding: 16px 16px; }
  .card-feature { padding: 20px 18px; }
  .tabbar-pill, .tab-search {
    background: rgba(12, 15, 20, 0.82) !important;
  }
  @supports ((-webkit-backdrop-filter: blur(30px)) or (backdrop-filter: blur(30px))) {
    .tabbar-pill, .tab-search {
      background: rgba(10, 12, 16, 0.72) !important;
      -webkit-backdrop-filter: blur(28px) saturate(150%);
      backdrop-filter: blur(28px) saturate(150%);
    }
  }
  .card-grid { grid-template-columns: 1fr; }
  .card-feature {
    grid-template-columns: 1fr;
    padding: 20px;
    min-height: 0;
  }
  .card-feature .btn-accent { width: 100%; text-align: center; }
  .split { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 520px) {
  .topbar { width: calc(100% - 20px); margin-top: 10px; padding: 7px 10px; }
  .content h2 { font-size: 24px; }
  .sidebar h1 { font-size: 24px; }
  .card-feature .card-title { font-size: 18px; }
}



/* —— Zone badge —— */
.zone-badge {
  display: inline-grid; place-items: center;
  min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 0 16px rgba(255, 59, 66, 0.45);
}
.brand-mark.zone-badge { min-width: 32px; height: 32px; font-size: 13px; }

/* —— Zone switcher —— */
.zone-switcher { position: relative; margin-left: 8px; flex-shrink: 0; }
.zone-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: rgba(255,255,255,0.06) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  color: inherit; font: inherit;
  padding: 4px 10px 4px 4px; cursor: pointer; border-radius: 999px;
}
.zone-btn:hover { background: rgba(255,255,255,0.1) !important; }
.zone-btn .zone-label { font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-btn .chev { color: var(--muted); font-size: 10px; }
.zone-menu {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 80;
  min-width: 280px; max-width: min(340px, 92vw); padding: 10px;
  border-radius: 18px;
  background: rgba(16,20,25,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  backdrop-filter: blur(30px) saturate(140%);
  display: grid; gap: 4px;
}
.zone-menu.hidden, .zone-menu[hidden],
.zone-sheet.hidden, .zone-sheet[hidden],
.zone-sheet-backdrop.hidden, .zone-sheet-backdrop[hidden] { display: none !important; }
.zone-menu-title {
  margin: 2px 8px 8px; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.zone-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  border: 0; background: transparent; color: var(--text); font: inherit;
  text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer; width: 100%;
}
.zone-row:hover { background: rgba(255,255,255,0.06); }
.zone-row.is-active {
  background: rgba(211,19,28,0.22);
  box-shadow: inset 0 0 0 1px rgba(255,59,66,0.35);
}
.zone-row.is-disabled { opacity: 0.72; cursor: default; }
.zone-row-text { display: grid; gap: 2px; min-width: 0; }
.zone-row-text b { font-size: 14px; }
.zone-row-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #6b7280; box-shadow: 0 0 0 3px rgba(107,114,128,0.15);
}
.zone-dot.on {
  background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2), 0 0 10px rgba(34,197,94,0.55);
}
.zone-check { color: var(--accent); font-weight: 800; font-size: 16px; }

.nav-servers.hidden, .nav-access.hidden, .nav-editor.hidden { display: none !important; }

/* —— Mobile zone sheet —— */
.zone-sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.55);
}
.zone-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  max-height: min(78vh, 560px); overflow: auto;
  border-radius: 22px 22px 0 0; padding: 10px 16px 28px;
  background: rgba(14,16,22,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: 0;
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}
.zone-sheet-handle {
  width: 42px; height: 4px; border-radius: 999px; margin: 4px auto 14px;
  background: rgba(255,255,255,0.22);
}
.zone-sheet h2 { margin: 0 0 4px; font-size: 22px; }
.zone-sheet-list { display: grid; gap: 8px; margin-top: 14px; }
.zone-sheet-list .zone-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

/* —— Key / rename modals —— */
dialog.key-modal {
  border: 1px solid rgba(255,59,66,0.35);
  border-radius: 22px; padding: 0; max-width: min(440px, calc(100vw - 32px));
  background: rgba(16,18,24,0.92);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06), 0 0 40px rgba(255,59,66,0.15);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
}
dialog.key-modal::backdrop { background: rgba(0,0,0,0.62); }
.key-modal-form { display: grid; gap: 12px; padding: 22px; }
.key-modal-form h2 { margin: 0; font-size: 22px; }
.key-modal-form .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; }
.key-warn {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,59,66,0.12); border: 1px solid rgba(255,59,66,0.35);
  font-size: 13px; line-height: 1.45;
}
#key-modal-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  word-break: break-all;
}

/* —— Servers page —— */
.servers-create {
  display: grid; gap: 12px; padding: 18px; border-radius: 18px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
}
.servers-create-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.server-card {
  display: grid; gap: 14px; padding: 16px 18px; border-radius: 18px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
}
.server-card-top {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between;
}
.server-card-id { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; }
.server-card-id b { font-size: 16px; }
.server-path { color: var(--muted); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(34,197,94,0.15); color: #4ade80;
}
.status-pill.off { background: rgba(107,114,128,0.2); color: #9ca3af; }
.server-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.server-actions .btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.server-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.server-stat {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.06);
  display: grid; gap: 2px;
}
.server-stat strong { font-size: 18px; }
.server-stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.server-sync { font-size: 12px; color: var(--muted); }

.editor-zone-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 10px; vertical-align: middle;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: rgba(255,59,66,0.16); border: 1px solid rgba(255,59,66,0.35);
  font-size: 13px; font-weight: 600;
}

@media (max-width: 860px) {
  .zone-switcher { margin-left: 4px; }
  .zone-btn { padding: 3px 8px 3px 3px; }
  .zone-btn .zone-label { max-width: 88px; font-size: 12px; }
  .zone-badge { min-width: 24px; height: 24px; font-size: 11px; }
  .brand-mark.zone-badge { min-width: 28px; height: 28px; }
  .topnav .nav-servers, .topnav .nav-access, .topnav .nav-editor { display: none; }
  .zone-menu { display: none !important; } /* mobile uses bottom sheet */
  .servers-create-fields { grid-template-columns: 1fr; }
  .server-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-card-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 860px) {
  .server-actions .btn .btn-label { font-size: 12px; }
  .server-card[data-compact] {}
}
@media (max-width: 520px) {
  .server-actions .btn[data-rename] .btn-label { font-size: 0; }
  .server-actions .btn[data-rename]::after { content: 'Имя'; font-size: 12px; }
  .server-actions .btn[data-regen] .btn-label { font-size: 0; }
  .server-actions .btn[data-regen]::after { content: 'Ключ'; font-size: 12px; }
  .server-actions .btn[data-toggle] .btn-label { font-size: 0; }
  .server-actions .btn[data-toggle]::after { content: 'Откл.'; font-size: 12px; }
  .server-actions .btn[data-toggle][data-status="disabled"]::after { content: 'Вкл.'; }
}

.servers-create .btn-accent { width: 100%; justify-content: center; text-align: center; }
#key-modal-copy.btn-accent { width: 100%; justify-content: center; }
.editor-zone-badge .zone-badge { min-width: 24px; height: 24px; font-size: 11px; }
@media (max-width: 860px) {
  .shell:has(#sv-list) .sidebar .notice { display: none; }
}
