:root {
  --bg: #121410;
  --bg-raise: #1b2019;
  --ink: #f3efe4;
  --muted: #b4b8aa;
  --line: rgba(243, 239, 228, 0.14);
  --brass: #d4b06a;
  --brass-deep: #8a6a32;
  --ink-on-brass: #1c160c;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --danger: #efb2a4;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(212, 176, 106, 0.09), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  box-shadow: inset 0 3px 0 var(--brass);
}

body, .top, .foot { display: flow-root; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--brass);
  color: var(--ink-on-brass);
  padding: 0.5rem 0.75rem;
  z-index: 5;
  border-radius: 6px;
}

.skip:focus { top: 0.75rem; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18, 20, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-inner, .foot .top-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mark {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--brass);
  color: var(--ink-on-brass);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 620;
  border-radius: 5px 5px 12px 5px;
}

.brand-name { font-size: 1.05rem; }

.top-note {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.who {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.who-name { font-weight: 600; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a3128;
  border: 1px solid var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(212, 176, 106, 0.55);
  color: #f0d7a2;
  border-radius: 999px;
  padding: 0.12rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3.5rem;
}

.hero { max-width: 40rem; margin-bottom: 1.75rem; }

.hero.tight { margin-bottom: 1.1rem; }

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--brass);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 520; letter-spacing: -0.03em; }

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.15rem, 5vw, 3.55rem);
  line-height: 1.08;
}

h2 { margin: 0 0 0.75rem; font-size: 1.45rem; line-height: 1.2; }

.lede { margin: 0 0 1.2rem; font-size: 1.12rem; color: var(--ink); }

.lede strong { color: #f0d7a2; }

.fine { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.95rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--brass);
  color: var(--ink-on-brass);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: #e3c483; }

.btn-discord { background: var(--discord); color: #fff; }

.btn-discord:hover { background: var(--discord-hover); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-quiet:hover { background: rgba(243, 239, 228, 0.06); }

.btn.is-loading,
.btn.is-active {
  background: #e3c483;
  color: #1a1408;
  border-color: #e3c483;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.45em;
  border: 2px solid rgba(26, 20, 8, 0.25);
  border-top-color: #1a1408;
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: det-spin 0.7s linear infinite;
}
@keyframes det-spin { to { transform: rotate(360deg); } }
.btn:disabled { opacity: 0.85; cursor: wait; }

.banner, .callout, .panel, .notice {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raise);
  box-shadow: var(--shadow);
}

.banner, .notice {
  padding: 1rem 1.15rem;
  margin-bottom: 1.4rem;
  max-width: 44rem;
}

.banner h2, .callout h2 { font-size: 1.25rem; }

.banner p, .callout p { margin: 0.35rem 0 0; }

.banner-warn { border-color: rgba(212, 176, 106, 0.45); }

.missing {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.missing code, .lede code, p code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.86em;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.callout {
  border-left: 3px solid var(--brass);
  padding: 1.05rem 1.15rem 1.15rem;
  margin: 0 0 1.2rem;
  box-shadow: none;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel { padding: 1.15rem 1.2rem 1.25rem; }

.panel p { margin: 0.4rem 0 0; }

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

.levels, .plain { list-style: none; margin: 0; padding: 0; }

.levels li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.levels li span { color: var(--muted); text-align: right; }

.plain li {
  padding: 0.35rem 0 0.35rem 1rem;
  position: relative;
}

.plain li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--brass);
  position: absolute;
  left: 0;
  top: 0.75rem;
}

.facts { margin: 0; }

.facts div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

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

.facts dd { margin: 0; font-weight: 600; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raise);
}

table { width: 100%; border-collapse: collapse; min-width: 40rem; }

th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 0.9rem;
}

td {
  padding: 0.8rem 0.9rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.mono {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.82rem;
}

.empty {
  margin: 0;
  padding: 1.3rem 1.15rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.foot p { margin: 0.15rem 0; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .levels li { flex-direction: column; gap: 0.15rem; }
  .levels li span { text-align: left; }
  .actions .btn, .actions form { width: 100%; }
  .actions form .btn { width: 100%; }
  h1 { font-size: 2.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.map-panel { margin: 1.25rem 0 2rem; }
.map-stage { position: relative; border: 1px solid rgba(212,176,106,.25); border-radius: 14px; overflow: hidden; background: #0c0e0a; }
.map-frame { margin: 0; }
.map-frame img { display: block; width: 100%; height: auto; }
.map-frame figcaption { padding: .75rem 1rem; color: #d7c9a6; font-size: .95rem; border-top: 1px solid rgba(212,176,106,.18); }
.map-overlay { pointer-events: none; position: absolute; inset: 0 0 12% 0; }
.map-overlay .dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.55); }
.map-overlay .dot.death { background: #c42428; }
.map-overlay .dot.kill { background: #ff6b3d; }
.map-overlay .dot.ko { background: #f0c14a; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.85rem 0;
  font-weight: 600;
}
.field .muted { font-weight: 500; color: var(--muted); }
.field input, .field select {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f120e;
  color: var(--ink);
}

/* —— App shell (side nav) —— */
body.shell {
  display: grid;
  grid-template-columns: 15.5rem 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "nav top"
    "nav main"
    "nav foot";
  min-height: 100vh;
  box-shadow: none;
}
body.shell .top { grid-area: top; }
body.shell .wrap { grid-area: main; max-width: none; width: 100%; }
body.shell .foot { grid-area: foot; }
body.shell .side {
  grid-area: nav;
  background: #0e110d;
  border-right: 1px solid var(--line);
  padding: 1rem 0.85rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  font-weight: 700;
}
.side-brand img {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(212,176,106,.45);
}
.side-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.side-nav a, .side-nav button.nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.side-nav a:hover, .side-nav button.nav-link:hover { background: rgba(243,239,228,.06); color: var(--ink); }
.side-nav a.active {
  background: rgba(212,176,106,.16);
  color: #f0d7a2;
  font-weight: 700;
}
.side-nav .soon { opacity: 0.55; font-size: 0.78rem; margin-left: auto; }
.side-foot { margin-top: auto; padding: 0.4rem; color: var(--muted); font-size: 0.82rem; }
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
body.shell .top .brand { display: none; }
body.shell .wrap.map-wide { padding-top: 1.1rem; }

.svrn-mark { background: transparent !important; border: 0 !important; overflow: visible !important; }
.svrn-mark-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  transform: none;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
.svrn-mark-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: rgba(12,14,10,.92);
  border: 1px solid var(--c, #f3efe4);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55);
  color: var(--c, #f3efe4);
}
.svrn-mark-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f3efe4;
  background: rgba(12,14,10,.92);
  border: 1px solid rgba(226,182,87,.45);
  border-radius: 3px;
  padding: 0.08rem 0.34rem;
  white-space: nowrap;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.leaflet-marker-icon.svrn-mark { overflow: visible; pointer-events: none !important; }
.svrn-mark-dot { pointer-events: auto; }
.svrn-name-label {
  position: absolute;
  left: 7px;
  top: 7px;
  margin: 0;
  pointer-events: none;
  z-index: 2;
}
.svrn-leader {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.svrn-leader line {
  stroke: rgba(212, 176, 106, 0.9);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.svrn-layers {
  min-width: 10.5rem;
  padding: 0.35rem 0.45rem 0.45rem;
  background: rgba(12,14,10,.94) !important;
  border: 1px solid rgba(212,176,106,.35) !important;
  border-radius: 10px !important;
  color: #f3efe4;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.svrn-layers-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.3rem 0.35rem;
  border: 0;
  border-radius: 7px;
  background: rgba(212,176,106,.12);
  color: var(--brass, #d4b06a);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.svrn-layers-toggle span { color: #f3efe4; }
.svrn-layers.is-collapsed { min-width: 0; padding: 0.25rem; }
.svrn-layers.is-collapsed .svrn-layers-body { display: none; }
.svrn-layers.is-collapsed .svrn-layers-toggle span { display: none; }
.svrn-layers-body { margin-top: 0.35rem; }
.svrn-layer {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.35rem;
  align-items: center;
  margin: 0.18rem 0;
  font-size: 0.86rem;
  cursor: pointer;
}
.svrn-layer input { accent-color: #d4b06a; }
.svrn-layer-glyph { display: inline-flex; width: 14px; height: 14px; }
.svrn-layer-name { color: #f3efe4; }
.svrn-layer-count { color: var(--muted, #9aa3b2); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.svrn-mark-kill .svrn-mark-dot {
  border-color: #ff7a18;
  background: rgba(40, 18, 6, 0.95);
}
.svrn-mark-kill .svrn-mark-label {
  border-color: rgba(255, 122, 24, 0.55);
  color: #ffc28a;
}
.svrn-legend {
  min-width: 9.5rem;
  max-width: 12rem;
  padding: 0.35rem 0.45rem 0.45rem;
  background: rgba(12,14,10,.94) !important;
  border: 1px solid rgba(212,176,106,.35) !important;
  border-radius: 10px !important;
  color: #f3efe4;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.svrn-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.25rem 0.3rem;
  border: 0;
  border-radius: 7px;
  background: rgba(212,176,106,.12);
  color: var(--brass, #d4b06a);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
.svrn-legend-toggle span { color: #f3efe4; }
.svrn-legend.is-collapsed { min-width: 0; padding: 0.25rem; }
.svrn-legend.is-collapsed .svrn-legend-body { display: none; }
.svrn-legend.is-collapsed .svrn-legend-toggle span { display: none; }
.svrn-legend-body {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}
.svrn-legend-body li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.22rem 0;
  font-size: 0.78rem;
  color: #f3efe4;
}
.svrn-legend-glyph { display: inline-flex; width: 14px; height: 14px; flex: 0 0 auto; }
.leaflet-control-layers {
  background: rgba(12,14,10,.94) !important;
  color: #f3efe4 !important;
  border: 1px solid rgba(212,176,106,.35) !important;
}
.leaflet-control-layers-toggle {
  background-color: rgba(12,14,10,.94) !important;
  border: 1px solid rgba(212,176,106,.45) !important;
  border-radius: 8px !important;
  width: 36px !important;
  height: 36px !important;
}
.leaflet-control-layers label { color: #f3efe4 !important; }
.det-dot { background: transparent !important; border: 0 !important; overflow: visible; pointer-events: none !important; }
.det-dot-inner {
  position: relative;
  width: 0;
  height: 0;
  pointer-events: none;
}
.det-dot-inner i {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #121410;
  pointer-events: auto;
  cursor: pointer;
}
.det-leader {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  overflow: visible;
  pointer-events: none;
}
.det-leader line {
  stroke: rgba(243, 239, 228, 0.75);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.det-dot-label {
  position: absolute;
  left: 5px;
  top: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #f3efe4;
  background: rgba(12,14,10,.88);
  border: 1px solid rgba(243,239,228,.28);
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  white-space: nowrap;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  pointer-events: none;
}
.det-ev, .det-ev-glyph { cursor: pointer; }
.det-ev-glyph {
  display: inline-flex;
  filter: drop-shadow(0 0 2px #000);
}
.det-search-wrap {
  position: relative;
  z-index: 40;
  width: 100%;
  min-width: 0;
}
.det-search-wrap .det-label { margin-bottom: 0.25rem; }
.det-search {
  display: block;
  width: 100%;
  min-width: 260px;
  box-sizing: border-box;
  background: var(--bg, #0f120e);
  color: var(--ink, #f3efe4);
  border: 1px solid var(--line, rgba(212,176,106,.35));
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.det-suggest {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  position: fixed;
  max-height: min(40vh, 18rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0.3rem;
  border: 1px solid rgba(212,176,106,.45);
  border-radius: 10px;
  background: rgba(12,14,10,.98);
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  z-index: 6000;
  min-width: 260px;
  box-sizing: border-box;
}
.det-suggest[hidden] { display: none !important; }
.det-suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f3efe4;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.25;
  padding: 0.65rem 0.7rem;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
}
.det-suggest-item .det-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.det-suggest-item.is-active,
.det-suggest-item:hover,
.det-suggest-item:focus {
  background: rgba(212,176,106,.18);
  outline: none;
}
.det-suggest-empty {
  color: var(--muted, #9aa3b2);
  font-size: 0.9rem;
  padding: 0.65rem 0.7rem;
}
.map-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin: 0.55rem 0 0;
}
.map-coords {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.9rem;
  color: #f0d7a2;
  min-width: 10rem;
}
.bases-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1rem;
}
.bases-toolbar input, .bases-toolbar select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f120e;
  color: var(--ink);
  min-height: 42px;
}
.bases-toolbar input { flex: 1 1 14rem; }
.bases-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 1rem;
}
.bases-list { max-height: min(70vh, 720px); overflow: auto; }
.base-row {
  display: block;
  padding: 0.7rem 0.8rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.base-row:hover { background: rgba(243,239,228,.05); }
.base-row strong { display: block; }
.base-row .meta { color: var(--muted); font-size: 0.88rem; }
.kind-pill {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(125,207,182,.45);
  color: #b7ebe0;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  margin-right: 0.35rem;
}

@media (max-width: 900px) {
  body.shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "main"
      "foot";
  }
  body.shell .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(18rem, 86vw);
    z-index: 20;
    transform: translateX(-105%);
    transition: transform .2s ease;
    height: 100vh;
  }
  body.shell.nav-open .side { transform: translateX(0); }
  body.shell.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 15;
  }
  .menu-toggle { display: inline-flex; }
  body.shell .top .brand { display: inline-flex; }
  .bases-grid { grid-template-columns: 1fr; }
}

/* Tracker */
.det-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 1rem;
  align-items: start;
}
.det-side {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(78vh, 820px);
  overflow: auto;
}
.det-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.det-label input,
.det-transport select {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font: inherit;
}
.det-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.det-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-height: 7.5rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
}
.det-selected:empty { display: none; }
.det-sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.2rem 0.2rem 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(212,176,106,.35);
  background: rgba(12,14,10,.9);
  color: #f3efe4;
  font-size: 0.8rem;
  line-height: 1.2;
}
.det-sel-chip .det-chip {
  flex: 0 0 auto;
}
.det-sel-chip .det-sel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}
.det-sel-chip .det-sel-x {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  min-width: 1.65rem;
  border: 0;
  border-radius: 999px;
  background: rgba(243,239,228,.08);
  color: #f3efe4;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.det-sel-chip .det-sel-x:hover,
.det-sel-chip .det-sel-x:focus {
  background: rgba(239,178,164,.25);
  color: #efb2a4;
  outline: none;
}
.det-suggest-item.is-on .det-name::after {
  content: " · on";
  color: var(--brass, #d4b06a);
  font-weight: 600;
}

.det-players {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.35rem;
}
.det-player {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 0.45rem;
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.det-player:hover, .det-player.on { background: rgba(212, 176, 106, 0.12); }
.det-chip { width: 10px; height: 10px; border-radius: 50%; }
.det-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.det-count { color: var(--muted); font-size: 0.78rem; }
.det-types {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  margin: 0;
  display: grid;
  gap: 0.25rem;
}
.det-types legend { padding: 0 0.25rem; color: var(--brass); font-size: 0.85rem; }
.det-types label { display: flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; }
.det-player-actions, .det-event-actions { margin: 0.15rem 0 0.35rem; }
.det-event-actions { margin-bottom: 0.45rem; }
.det-transport {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.45rem;
  align-items: center;
}
.det-transport #det-clock { grid-column: 1 / -1; margin: 0; }
@media (max-width: 860px) {
  .det-layout { grid-template-columns: 1fr; }
  .det-side { max-height: none; }
  .det-map { height: min(55vh, 480px) !important; }
}

/* Live map — phone: compact panels, tall map, quieter labels */
@media (max-width: 767px) {
  body.shell.page-map .wrap.map-wide {
    padding: 0.45rem 0.55rem 0.65rem;
  }
  body.shell.page-map .hero.tight {
    margin-bottom: 0.35rem;
  }
  body.shell.page-map .hero.tight .eyebrow,
  body.shell.page-map .hero.tight .lede {
    display: none;
  }
  body.shell.page-map .hero.tight h1 {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.2;
  }
  body.shell.page-map .map-panel {
    margin: 0.25rem 0 0.55rem;
  }
  body.shell.page-map .map-canvas {
    height: calc(100dvh - 6.75rem) !important;
    min-height: 18rem;
    border-radius: 10px;
  }
  body.shell.page-map .map-hud {
    margin-top: 0.35rem;
    gap: 0.35rem 0.75rem;
  }
  body.shell.page-map .map-coords,
  body.shell.page-map .map-status {
    font-size: 0.78rem;
  }
  body.shell.page-map .map-events {
    margin: 0.4rem 0 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  body.shell.page-map .foot {
    display: none;
  }
  .svrn-layers,
  .svrn-legend {
    min-width: 0;
  }
  .svrn-layers.is-collapsed,
  .svrn-legend.is-collapsed {
    padding: 0.2rem !important;
    border-radius: 10px !important;
  }
  .svrn-layers.is-collapsed .svrn-layers-toggle,
  .svrn-legend.is-collapsed .svrn-legend-toggle {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
  }
  .svrn-layers:not(.is-collapsed),
  .svrn-legend:not(.is-collapsed) {
    min-width: min(11.5rem, 72vw);
    max-width: min(14rem, 82vw);
    max-height: min(60vh, 22rem);
    overflow: auto;
  }
  .svrn-mark-label {
    font-size: 9px;
    padding: 0 0.22rem;
    max-width: 6.25rem;
  }
  .svrn-labels-hidden .svrn-mark-label,
  .svrn-labels-hidden .svrn-leader {
    display: none;
  }
  .svrn-labels-hidden .svrn-mark.is-tapped .svrn-mark-label,
  .svrn-labels-hidden .svrn-mark.is-tapped .svrn-leader {
    display: block;
  }
}

/* Live map player card — mobile bottom sheet / desktop side panel */
.svrn-player-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(0, 0, 0, 0.45);
}
.svrn-player-card {
  position: fixed;
  z-index: 1200;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(24rem, 92vw);
  max-height: 100vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-raise);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem 1.25rem;
  color: var(--ink);
}
.svrn-player-card-handle {
  display: none;
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0.15rem auto 0.55rem;
}
.svrn-player-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 650;
  padding-right: 2rem;
}
.svrn-player-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.svrn-player-card-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  min-width: 44px;
  min-height: 44px;
}
.svrn-player-card .pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.svrn-player-card .pill-on {
  border-color: rgba(125, 207, 182, 0.55);
  color: #7dcfb6;
}
.svrn-player-card .pill-kill { color: #ff7a18; border-color: rgba(255, 122, 24, 0.45); }
.svrn-player-card .pill-death { color: #efb2a4; border-color: rgba(239, 178, 164, 0.45); }
.svrn-player-card .ban-on { color: #efb2a4; }
.svrn-combat {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}
.svrn-player-card .svrn-affiliation {
  margin: 0.55rem 0 0;
}
.svrn-player-card .svrn-affiliation.is-conflict {
  color: #efb2a4;
}
.svrn-player-group {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.svrn-player-actions {
  display: grid;
  gap: 0.5rem;
}
.svrn-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.svrn-field input,
.svrn-field select,
.svrn-field textarea {
  background: #10140f;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  font: inherit;
  min-height: 44px;
}
.svrn-field textarea { min-height: 5.5rem; resize: vertical; }
.svrn-player-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #242a21;
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
}
.svrn-player-card .btn.tap { width: 100%; }
.svrn-player-card .btn.danger {
  background: rgba(180, 64, 48, 0.28);
  border-color: rgba(239, 178, 164, 0.35);
  color: #efb2a4;
}
.svrn-player-card .btn.link {
  width: 100%;
}
.svrn-player-card .tiny { font-size: 0.8rem; margin: 0; }
.svrn-player-card .muted { color: var(--muted); }
.svrn-player-card .danger { color: #efb2a4; }

/* Phone: bottom sheet */
@media (max-width: 767px) {
  .svrn-player-card {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: min(78vh, 40rem);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .svrn-player-card-handle { display: block; }
}

/* Watched glow + logout fade */
.svrn-mark.is-watched .svrn-mark-dot,
.svrn-mark-inner.svrn-mark-watch .svrn-mark-dot {
  box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.35), 0 0 14px 4px rgba(255, 92, 92, 0.55);
  border-radius: 999px;
}
.svrn-mark-inner.svrn-mark-logout {
  opacity: 0.55;
}
.svrn-mark-inner.svrn-mark-logout.is-stale {
  opacity: 0.32;
  filter: grayscale(0.4);
}
.svrn-mark-inner.is-nonmember .svrn-mark-dot {
  outline: 2px dashed rgba(239, 178, 164, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Measure tool */
.svrn-measure {
  margin-top: 0.4rem !important;
  background: var(--bg-raise);
  border: 1px solid var(--line) !important;
  border-radius: 10px;
  overflow: hidden;
  max-width: min(16rem, 70vw);
}
.svrn-measure-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.55rem 0.7rem;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
}
.svrn-measure-toggle.is-on {
  color: #d4b06a;
  background: rgba(212, 176, 106, 0.12);
}
.svrn-measure-hud {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 0.7rem 0.55rem;
  line-height: 1.35;
}
.svrn-measure-hud:empty { display: none; }
.svrn-measure-handle {
  background: none !important;
  border: none !important;
}
.svrn-measure-handle-knob {
  display: block;
  width: 16px;
  height: 16px;
  margin: 6px;
  border-radius: 50%;
  background: #ffe566;
  border: 3px solid #16120c;
  box-shadow: 0 0 0 3px rgba(255, 229, 102, 0.35);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}
.svrn-measure-handle:hover .svrn-measure-handle-knob,
.svrn-measure-handle.is-hot .svrn-measure-handle-knob,
.svrn-measure-ring-hot .svrn-measure-handle-knob {
  width: 20px;
  height: 20px;
  margin: 4px;
}
.svrn-measure-handle.is-dragging .svrn-measure-handle-knob { cursor: grabbing; }


/* Base view — close-up box for staff */
.bv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: end;
  margin: 0.8rem 0 1rem;
}
.bv-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.bv-filters input,
.bv-filters select {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #0f120e;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
}
.bv-filters input[type="number"] { width: 7.2rem; }
.bv-filters fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0;
  padding: 0.35rem 0.7rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
}
.bv-filters legend { padding: 0 0.25rem; color: var(--brass); }
.bv-filters fieldset label {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
}
.bv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: start;
}
.bv-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  /* Sand, not dark green — a pending closeup used to flash a solid green stage. */
  background: #c6b89a;
  border: 1px solid rgba(212, 176, 106, 0.35);
  border-radius: 14px;
  overflow: hidden;
}
.bv-canvas, .bv-icons, .bv-dots, .bv-buildings, .bv-tile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bv-canvas {
  inset: 58px;
  width: auto;
  height: auto;
}
.bv-tile {
  inset: auto;
  object-fit: fill;
  /* Don't smooth-upscale native tiles; close-up uses a high-res image when available. */
  image-rendering: auto;
  pointer-events: none;
  z-index: 0;
}
.bv-closeup {
  position: absolute;
  inset: auto;
  object-fit: fill;
  /* Bitmap is sized at CSS × DPR (snapped up), so this is a downscale or 1:1, not an 840 upscale. */
  image-rendering: auto;
  pointer-events: none;
  z-index: 2;
}
.bv-closeup-prev { z-index: 1; }
.bv-world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  cursor: grab;
  touch-action: none;
}
.bv-world.is-panning { cursor: grabbing; }
.bv-stage { touch-action: none; }
/* N/E/S/W step buttons removed — hide if a cached page still emits them. */
.bv-arrow { display: none !important; }
.bv-buildings { pointer-events: none; }
.bv-buildings polygon {
  fill: rgba(214, 206, 186, 0.22);
  stroke: rgba(52, 44, 32, 0.95);
  stroke-width: 0.55;
  stroke-linejoin: miter;
}
.bv-dots { pointer-events: none; }
.bv-icons { pointer-events: none; }
.bv-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 999px;
  border: 2px solid var(--c, #cacec0);
  background: rgba(18, 20, 16, 0.88);
  color: var(--c, #cacec0);
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  place-items: center;
}
.bv-icon.is-on {
  outline: 3px solid #e2b657;
  outline-offset: 3px;
  background: rgba(226, 182, 87, 0.45);
  animation: bv-pulse 0.8s ease-out 1;
}
.bv-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: #1b2019;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1rem;
}
.bv-arrow {
  position: absolute;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--brass);
  background: rgba(18, 20, 16, 0.9);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.bv-arrow.is-disabled { opacity: 0.4; }
.bv-n { top: 8px; left: 50%; transform: translateX(-50%); }
.bv-s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.bv-w { left: 8px; top: 50%; transform: translateY(-50%); }
.bv-e { right: 8px; top: 50%; transform: translateY(-50%); }
.bv-scale {
  position: absolute;
  z-index: 4;
  left: 8px;
  bottom: 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: #f3efe4;
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.bv-scale i {
  display: block;
  width: 72px;
  height: 4px;
  background: #f3efe4;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.bv-coverage {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(212, 176, 106, 0.12);
  border: 1px solid rgba(212, 176, 106, 0.35);
}
.bv-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  padding: 0.7rem 0 0;
  margin: 0;
  font-size: 0.85rem;
}
.bv-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.bv-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  display: inline-block;
}
.bv-swatch-wall { background: #cfbb87; }
.bv-swatch-gate { background: #dbc892; }
.bv-swatch-watchtower { background: #bfad80; }
.bv-swatch-tent { background: #a9b980; }
.bv-swatch-fireplace { background: #e78b53; }
.bv-swatch-storage { background: #65c0c9; }
.bv-swatch-shelter { background: #98b883; }
.bv-swatch-garden { background: #9caf68; }
.bv-swatch-other { background: #cacec0; }
.bv-swatch-player { background: rgba(90, 196, 204, 0.9); }
.bv-side { max-height: min(78vh, 920px); overflow: auto; }
.bv-side h2 { margin: 0.8rem 0 0.35rem; font-size: 1.05rem; }
.bv-side h2:first-child { margin-top: 0; }
.bv-cluster {
  border-top: 1px solid var(--line);
  padding: 0.55rem 0;
}
.bv-cluster.is-on {
  background: rgba(226, 182, 87, 0.34);
  border: 2px solid #e2b657;
  box-shadow: 0 0 0 3px rgba(226, 182, 87, 0.55);
  animation: bv-pulse 0.8s ease-out 1;
}
@keyframes bv-pulse {
  from { box-shadow: 0 0 0 6px rgba(226, 182, 87, 0.85); }
  to { box-shadow: 0 0 0 2px rgba(226, 182, 87, 0.35); }
}
.bv-exitbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  padding: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
  background: rgba(18, 20, 16, 0.96);
  border: 1px solid rgba(226, 182, 87, 0.65);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.bv-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0.55rem 1rem;
  font-weight: 700;
  background: #e2b657;
  color: #121410;
  border: 1px solid #c49a3c;
  border-radius: 999px;
  text-decoration: none;
}
.bv-back:hover, .bv-back:focus-visible {
  background: #f0c86a;
  color: #121410;
}
.bv-exit-hint {
  color: #cacec0;
  font-size: 0.86rem;
}
.bv-stage-wrap { position: relative; }
.bv-back-fab {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  font-weight: 700;
  font-size: 0.92rem;
  background: rgba(226, 182, 87, 0.95);
  color: #121410;
  border: 1px solid #c49a3c;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.bv-back-fab:hover, .bv-back-fab:focus-visible {
  background: #f0c86a;
  color: #121410;
}
.bv-player-dots {
  /* Match .bv-canvas inset so % coords align with the terrain box. */
  position: absolute;
  inset: 58px;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: 6;
}
.bv-icons { z-index: 3; }
.bv-player-dot {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
.bv-player-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #5ac4cc;
  box-shadow: 0 0 0 2px #121410, 0 0 0 3px rgba(90, 196, 204, 0.55);
}
.bv-player-tip {
  display: none;
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  background: #121410;
  color: #f3efe4;
  border: 1px solid #e2b657;
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
}
.bv-player-dot:hover .bv-player-tip,
.bv-player-dot:focus-visible .bv-player-tip,
.bv-player-dot.is-on .bv-player-tip,
.bv-player-dot.is-named .bv-player-tip { display: block; }
.bv-cluster h3 { margin: 0 0 0.3rem; font-size: 0.92rem; }
.bv-cluster ul, .bv-players { margin: 0; padding-left: 1.1rem; }
.bv-cluster li, .bv-players li { margin: 0.25rem 0; font-size: 0.9rem; }
.bv-delta {
  display: block;
  color: #e7b571;
  font-size: 0.82rem;
}
.bv-gaps-wrap { margin-top: 0.8rem; }
.bv-gaps-wrap summary { cursor: pointer; font-weight: 600; }
.bv-gaps-wrap ul { padding-left: 1.1rem; }
@media (max-width: 860px) {
  .bv-layout { grid-template-columns: 1fr; }
  .bv-side { max-height: none; }
  .bv-filters input[type="datetime-local"] { max-width: 100%; }
  body.shell.page-base-view .top { position: static; }
  body.shell.page-base-view .foot { display: none; }
  body.shell.page-base-view .hero.tight .lede { font-size: 0.95rem; }
}

/* Base view + live map polish — narrow / touch */
@media (max-width: 767px) {
  .bv-arrow {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }
  .bv-player-dot {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
  }
  .bv-filters label {
    min-height: 44px;
  }
  .bv-filters input,
  .bv-filters select,
  .bv-filters button {
    min-height: 44px;
  }
  .bv-back, .bv-back-fab {
    min-height: 44px;
    padding: 0.55rem 1rem;
  }
  body.shell.page-map .map-hud .btn {
    min-height: 44px;
    padding: 0.55rem 0.9rem;
  }
  .svrn-layers-toggle,
  .svrn-legend-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

.svrn-player-dm {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(212, 176, 106, 0.28);
}
.svrn-player-dm textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: #121410;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}
.svrn-player-card .tiny { font-size: 0.8rem; }
.svrn-player-card .danger.tiny { color: #efb2a4; }

/* Incident view chip — compact, draggable, collapsible */
.svrn-incident-chip {
  position: absolute;
  z-index: 1150;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  display: grid;
  gap: 0.28rem;
  padding: 0.35rem 1.6rem 0.4rem 1.55rem;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--ink);
  max-width: calc(100% - 0.9rem);
  box-sizing: border-box;
}
.svrn-incident-chip.svrn-draggable { position: absolute; }
.svrn-incident-chip-body {
  display: grid;
  gap: 0.05rem;
  font-size: 0.72rem;
  line-height: 1.25;
}
.svrn-incident-chip-body strong { font-size: 0.8rem; font-weight: 700; }
.svrn-incident-chip .svrn-drag-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 0;
  border-bottom: 0;
  border-radius: 12px 0 8px 0;
  background: transparent;
  letter-spacing: 0;
  font-size: 0.65rem;
}
.svrn-incident-min {
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0 12px 0 8px;
}
.svrn-incident-tab {
  display: none;
  align-items: center;
  max-width: 46vw;
  margin: 0;
  padding: 0.4rem 0.65rem;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svrn-incident-chip.is-collapsed {
  padding: 0;
  gap: 0;
  width: auto;
  min-width: 7rem;
  max-width: 46vw;
  left: auto;
  right: 0;
  border-radius: 10px 0 0 10px;
}
.svrn-incident-chip.is-collapsed .svrn-incident-main,
.svrn-incident-chip.is-collapsed .svrn-drag-handle,
.svrn-incident-chip.is-collapsed .svrn-incident-min {
  display: none;
}
.svrn-incident-chip.is-collapsed .svrn-incident-tab,
.svrn-incident-tab:not([hidden]) {
  display: inline-flex;
}
.svrn-incident-chip .btn {
  min-height: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #242a21;
  color: var(--ink);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  flex: 1 1 0;
}
.svrn-incident-mode .svrn-layers,
.svrn-incident-mode .svrn-legend,
.svrn-incident-mode .svrn-measure,
.svrn-incident-mode .svrn-toolstrip,
.svrn-incident-mode .svrn-float {
  display: none !important;
}
@media (min-width: 768px) {
  .svrn-incident-chip {
    left: auto;
    right: 0.75rem;
    bottom: 0.75rem;
    width: min(20rem, 38vw);
  }
}

/* Draggable map panels + grouped layers */
.svrn-draggable {
  position: relative;
}
.svrn-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: grab;
  font: inherit;
  letter-spacing: 0.08em;
  touch-action: none;
}
.svrn-drag-handle:active { cursor: grabbing; }
.svrn-layers-body,
.svrn-legend-body {
  overflow: auto;
  overscroll-behavior: contain;
}
.svrn-layers-body.is-up,
.svrn-legend-body.is-up {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raise);
  box-shadow: var(--shadow);
}
.svrn-layer-group {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0;
}
.svrn-layer-group summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.45rem 0.55rem 0.25rem;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.svrn-layer-group summary::-webkit-details-marker { display: none; }
.svrn-layer-group-body { display: grid; }


/* 30-min time scrubber */
.svrn-scrub {
  min-width: min(92vw, 320px);
  padding: 8px 10px 6px;
  background: rgba(18, 16, 14, 0.92);
  border: 1px solid rgba(212, 176, 106, 0.35);
  border-radius: 10px;
  color: #f0e6d2;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}
.svrn-scrub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}
.svrn-scrub-title { font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #d4b06a; }
.svrn-scrub-label { flex: 1; opacity: 0.9; }
.svrn-scrub-live {
  border: 0;
  background: #d4b06a;
  color: #1a140c;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.svrn-scrub-range { width: 100%; accent-color: #d4b06a; }
.svrn-scrub-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.65;
  margin-top: 2px;
}
@media (max-width: 700px) {
  .svrn-scrub { min-width: min(96vw, 360px); }
}

.svrn-incident-actions { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0; }
.svrn-assess-out {
  margin: 4px 0 0;
  max-height: 30vh;
  overflow: auto;
  padding: 6px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  color: #f0e6d2;
}

/* Left tool strip + floating panels (replaces fixed staff desk / pulse) */
.svrn-tool-root {
  position: absolute;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}
.svrn-tool-root > * { pointer-events: auto; }
.svrn-toolstrip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100% - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px;
  background: rgba(12, 14, 10, 0.94);
  border: 1px solid rgba(212, 176, 106, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.svrn-toolstrip-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 4px 2px 3px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d4b06a;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  cursor: pointer;
}
.svrn-toolstrip-btn svg { display: block; }
.svrn-toolstrip-btn:hover,
.svrn-toolstrip-btn.is-on {
  background: rgba(212, 176, 106, 0.18);
  color: #f3efe4;
}
.svrn-float {
  position: absolute;
  z-index: 1105;
  left: 56px;
  top: 8px;
  display: flex;
  flex-direction: column;
  min-width: 12.5rem;
  max-width: min(22rem, calc(100% - 64px));
  max-height: min(72%, 28rem);
  background: rgba(12, 14, 10, 0.94);
  border: 1px solid rgba(212, 176, 106, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #f3efe4;
  pointer-events: auto;
  overflow: hidden;
}
.svrn-float[hidden] { display: none !important; }
.svrn-float-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 2px 4px 2px 0;
  border-bottom: 1px solid var(--line, rgba(212,176,106,.28));
  background: rgba(255, 255, 255, 0.04);
}
.svrn-float-bar .svrn-drag-handle {
  width: 28px;
  min-height: 32px;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--muted, #9aa3b2);
  flex: 0 0 auto;
}
.svrn-float-title {
  flex: 1 1 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass, #d4b06a);
  min-width: 0;
}
.svrn-float-pin,
.svrn-float-close {
  border: 0;
  background: transparent;
  color: var(--muted, #9aa3b2);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 32px;
  min-width: 32px;
  padding: 0 6px;
  border-radius: 6px;
  cursor: pointer;
}
.svrn-float-pin.is-on,
.svrn-float.is-pinned .svrn-float-pin {
  color: #d4b06a;
  background: rgba(212, 176, 106, 0.16);
}
.svrn-float-close { font-size: 1.1rem; font-weight: 500; }
.svrn-float-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.4rem 0.55rem 0.55rem;
  touch-action: pan-y;
}
.svrn-float .svrn-layers-body,
.svrn-float .svrn-legend-body {
  margin: 0;
  max-height: none;
  position: static;
}
.svrn-float .svrn-measure-hud { padding: 0; }
.svrn-float .svrn-scrub { min-width: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.svrn-tool-help { margin: 0 0 0.45rem; font-size: 0.78rem; color: var(--muted, #9aa3b2); line-height: 1.35; }
.svrn-pulse-body { font-size: 12px; line-height: 1.4; white-space: normal; }
.svrn-staff-desk-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.svrn-summary-body { margin-bottom: 6px; line-height: 1.35; }
.svrn-actions-list { list-style: none; padding: 0; margin: 0; max-height: 22vh; overflow: auto; }
.svrn-actions-list li { margin: 0 0 6px; }
.svrn-dossier { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.svrn-dossier li { margin: 0 0 4px; }
.svrn-incident-mode .svrn-toolstrip,
.svrn-incident-mode .svrn-float {
  display: none !important;
}
@media (max-width: 767px) {
  .svrn-toolstrip {
    left: 6px;
    right: 6px;
    top: auto;
    bottom: 6px;
    flex-direction: row;
    justify-content: flex-start;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 14px;
    padding: 4px 6px;
  }
  .svrn-toolstrip-btn { width: 48px; flex: 0 0 auto; }
  .svrn-float {
    left: 6px;
    top: 6px;
    max-width: calc(100% - 12px);
    max-height: calc(100% - 70px);
  }
}

.svrn-scrub-play-row { margin-top: 8px; }
.svrn-scrub-play-row .btn.tap,
#svrn-measure-line,
#svrn-measure-circle {
  min-height: 36px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid rgba(212,176,106,.35);
  background: transparent;
  color: #f0e6d2;
  border-radius: 8px;
  cursor: pointer;
}
.svrn-scrub-play-row .btn.tap.is-on,
#svrn-measure-line.is-on,
#svrn-measure-circle.is-on {
  background: rgba(212,176,106,.2);
  color: #d4b06a;
}
#pc-tools-msg .btn { margin-left: 4px; min-height: 36px; }

/* Slim player card — header + Jump / Dossier / More */
.svrn-player-card .pc-head h2 { margin: 0 0 6px; padding-right: 2rem; }
.svrn-player-card .pc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.svrn-player-card .pc-meta b { color: var(--ink); font-weight: 600; }
.svrn-player-card .pc-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.svrn-player-card .pc-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dcfb6;
  display: inline-block;
}
.svrn-player-card .pc-house.is-conflict { color: #efb2a4; }
.svrn-player-card .pc-primary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0 8px;
}
.svrn-player-card .pc-primary .btn {
  width: auto;
  min-height: 48px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.svrn-player-card .pc-btn-jump {
  background: var(--brass);
  color: var(--ink-on-brass);
  border-color: transparent;
}
.svrn-player-card .pc-btn-more { color: var(--brass); }
.svrn-player-card .pc-hint { margin: 0 0 8px; }
.svrn-player-card .pc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.svrn-player-card .pc-tab {
  flex: 1;
  margin: 0;
  padding: 10px 4px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 40px;
}
.svrn-player-card .pc-tab.is-on {
  color: var(--brass);
  border-bottom-color: var(--brass);
}
.svrn-player-card .pc-pane {
  display: grid;
  gap: 8px;
  padding: 12px 0 0;
}
.svrn-player-card .pc-pane[hidden] { display: none; }
.svrn-player-card .pc-item {
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-weight: 600;
}
.svrn-player-card .pc-item em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  text-align: right;
}
.svrn-player-card #pc-more-panel { margin-top: 4px; }
.svrn-player-card #pc-more-panel[hidden] { display: none; }

/* High-contrast measure labels drawn on the line / circle */
.svrn-measure-label {
  background: transparent !important;
  border: 0 !important;
}
.svrn-measure-label span {
  display: inline-block;
  transform: translate(-50%, -130%);
  background: #16120c;
  color: #ffe566;
  border: 1px solid #ffe566;
  padding: 1px 7px 2px;
  border-radius: 6px;
  font: 700 11px/1.2 "Fira Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.svrn-replay-hud {
  display: block;
  margin: 0.45rem 0 0;
  line-height: 1.4;
  white-space: normal;
}
.svrn-replay-hud.is-empty {
  color: #e2b657;
}
.svrn-raid-clock { margin-top: 0.2rem; }
#svrn-float-replay .svrn-field { display: block; margin: 0 0 0.45rem; }
#svrn-float-replay .svrn-field select { width: 100%; margin-top: 0.2rem; }
#svrn-raid-scrub { width: 100%; accent-color: #d4b06a; }
.svrn-raid-speed.is-on {
  background: rgba(212, 176, 106, 0.22);
  color: #ffe566;
}


/* Pass 10 (staged): small on-map Base view button, only at max tile zoom */
.map-baseview-ctl {
  display: none;
  margin: 10px 10px 18px 10px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.map-baseview-ctl.is-visible { display: block; }
a.map-baseview-btn,
.map-baseview-ctl a.map-baseview-btn {
  display: inline-block;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  line-height: 1.2 !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #f6efe4 !important;
  background: rgba(28, 22, 16, 0.78) !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255, 245, 230, 0.28);
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
a.map-baseview-btn:hover,
a.map-baseview-btn:focus {
  background: rgba(40, 32, 22, 0.9) !important;
  color: #fff8ee !important;
}
@media (pointer: coarse) {
  a.map-baseview-btn,
  .map-baseview-ctl a.map-baseview-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}
