: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); }

.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,.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);
}
.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; }
.det-dot-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  transform: translate(-5px, -5px);
  pointer-events: auto;
  cursor: pointer;
}
.det-dot-inner i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #121410;
  flex: 0 0 auto;
}
.det-dot-label {
  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);
}
.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 {
    display: none;
  }
  .svrn-labels-hidden .svrn-mark.is-tapped .svrn-mark-label {
    display: inline;
  }
}

/* Live map player card */
.svrn-player-card {
  position: fixed;
  z-index: 1200;
  right: 0.75rem;
  bottom: 0.75rem;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 32rem);
  overflow: auto;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem 1rem;
  color: var(--ink);
}
.svrn-player-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 650;
}
.svrn-player-card h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.svrn-player-card-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.svrn-player-card .pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  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.35rem;
  font-size: 0.92rem;
}
.svrn-player-actions {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.svrn-field {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.svrn-field input,
.svrn-field select {
  background: #10140f;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
}
.svrn-player-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #242a21;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.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; }
@media (max-width: 767px) {
  .svrn-player-card {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    max-height: min(62vh, 28rem);
  }
}
