:root {
  --bg: #0b100e;
  --bg-2: #121a16;
  --surface: #18211c;
  --surface-2: #1f2a24;
  --line: #2c3a31;
  --text: #f0ead8;
  --muted: #9aa892;
  --gold: #e6c36a;
  --leaf: #8fce6e;
  --ember: #e07a4d;
  --sky: #7eb6d8;
  --danger: #d96a5b;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --radius: 0.75rem;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --content: 88rem;
  --header-h: 3.35rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(230, 195, 106, 0.08), transparent 50%),
    radial-gradient(900px 600px at 100% 0%, rgba(70, 120, 90, 0.18), transparent 45%),
    var(--bg);
  color: var(--text);
  font: 16px/1.45 "Source Sans 3", system-ui, sans-serif;
}
img { max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 650; margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-5) var(--space-6) var(--space-3);
}
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-mark {
  width: 2.6rem; height: 2.6rem; border-radius: 30%;
  background: conic-gradient(from 200deg, var(--gold), #7a4a18, var(--leaf), var(--gold));
  box-shadow: inset 0 0 0 3px #0b100e, 0 0 0 1px #e6c36a55;
}
.eyebrow { margin: 0; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.7rem; }
h1 { font-size: 1.7rem; }
.vitals { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
}
.metric b { color: var(--gold); }
.connect { margin: 0; color: var(--muted); font-size: 0.9rem; }

.tab-spacer { flex: 1; min-width: 0.5rem; }
.tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0 var(--space-6) var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}
.tabs button, .seg button, .zoom-btns button, .toolbar button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}
.tabs button.active, .seg button.active {
  background: var(--gold);
  color: #1a1406;
  border-color: var(--gold);
}
button:focus-visible, input:focus-visible, select:focus-visible, label.check:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.site-header, .tabs, main, .site-footer {
  width: 100%;
  max-width: var(--content);
  margin-left: auto;
  margin-right: auto;
}
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: var(--space-2);
}

main { padding: 0 var(--space-6) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.panel { display: flex; flex-direction: column; gap: var(--space-3); }
.section-title { font-size: 1.05rem; color: var(--gold); }
.check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  user-select: none;
}

.toolbar, .block-head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.toolbar.wrap { flex-wrap: wrap; }
.layers { display: flex; gap: 0.7rem; color: var(--muted); font-size: 0.9rem; }
.seg { display: flex; }
.seg button { border-radius: 0; }
.seg button:first-child { border-radius: 999px 0 0 999px; }
.seg button:last-child { border-radius: 0 999px 999px 0; }
input[type="search"], select, .picker-wrap input {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.45rem 0.7rem;
  min-width: 12rem;
}

.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr); gap: var(--space-4); }
.map-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: var(--space-2); }
.map-stage {
  height: min(72vh, 46rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #070a08;
  cursor: grab;
  touch-action: none;
  box-shadow: var(--shadow);
}
.map-stage.drag { cursor: grabbing; }
.map-inner { position: relative; width: 2048px; height: 2048px; transform-origin: 0 0; }
.map-inner img { width: 2048px; height: 2048px; display: block; user-select: none; }
#map-pins, #map-rings { position: absolute; inset: 0; }
#map-rings { z-index: 1; pointer-events: none; }
.base-ring {
  position: absolute;
  border: 2px solid rgba(230, 195, 106, 0.55);
  background: rgba(230, 195, 106, 0.08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.pin {
  position: absolute;
  padding: 0;
  appearance: none;
  transform: translate(-50%, -50%) scale(calc(1 / var(--z, 0.45)));
  transform-origin: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #12140fe6;
  border: 1.5px solid #3a4a40;
  z-index: 3;
  display: grid;
  place-items: center;
}
.pin.ico img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
}
.pin.base { z-index: 4; border-color: var(--gold); }
.pin.ft, .pin.watch, .pin.tree {
  z-index: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.pin.ft img, .pin.watch img, .pin.tree img { width: 26px; height: 26px; }
.pin.tower, .pin.boss { width: 32px; height: 32px; z-index: 5; border-color: var(--ember); }
.pin.tower img, .pin.boss img { width: 28px; height: 28px; }
.pin.player {
  width: 30px;
  height: 30px;
  background: var(--c, var(--gold));
  border-color: #0b100e;
  box-shadow: 0 0 0 2px #e6c36a88;
  z-index: 6;
}
.pin.player .face {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}
.pin.player:not(.on) { filter: saturate(0.75); opacity: 0.88; }
.pin.player.on {
  box-shadow: 0 0 0 2px #0b100e, 0 0 0 4px var(--c, var(--leaf)), 0 0 16px var(--c, var(--leaf));
}
.pin.sel { z-index: 8; box-shadow: 0 0 0 2px var(--gold); }
.pin.mine { border-color: #bfe7ff; z-index: 4; }
.pin.locked { opacity: 0.28; }
.pin.beaten { border-color: var(--leaf); }
.pin .lv, .pin .done {
  position: absolute;
  font-style: normal;
  font-weight: 700;
  line-height: 1.1;
  pointer-events: none;
}
.pin .lv {
  top: -7px;
  right: -10px;
  font-size: 0.58rem;
  background: #12140ff2;
  color: var(--gold);
  border: 1px solid #6a5420;
  border-radius: 4px;
  padding: 1px 3px;
}
.pin.beaten .lv { color: var(--leaf); border-color: #3a5a32; }
.pin .done {
  left: -5px;
  top: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--leaf);
  color: #0b100e;
  font-size: 0.62rem;
  display: grid;
  place-items: center;
}
.pin .have {
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  pointer-events: none;
}
.pin .have i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--gold));
  border: 1px solid #0b100e;
  font-style: normal;
}
.pin span, .pin .tip {
  display: none;
  position: absolute;
  left: 118%;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  background: #12140ff2;
  color: var(--text);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  pointer-events: none;
}
.pin:hover span, .pin.sel span, .pin.player span { display: block; }
.map-stage { position: relative; }
.map-legend {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  background: #12140fe6;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  pointer-events: none;
  z-index: 8;
}
.map-legend img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  margin-right: 0.2rem;
  vertical-align: -3px;
}
.side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  min-height: 12rem;
  max-height: min(72vh, 46rem);
  overflow: auto;
}
.side h2, .side h3 { margin-bottom: 0.5rem; }
.side h3 { margin-top: 1.2rem; font-size: 1rem; color: var(--gold); }
.side h3:first-child { margin-top: 0; }
.map-card { margin-bottom: 0.8rem; }
.map-card header { display: flex; align-items: center; gap: 0.55rem; }
.map-card .who {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c, var(--gold)); color: #0b100e;
  font-size: 0.72rem; font-weight: 700; flex: 0 0 auto;
}
.map-stats {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0.45rem 0 0.2rem;
}
.map-stats span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.map-stats b { color: var(--gold); font-weight: 600; }
.party-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.party-chip {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.1rem 0.45rem 0.1rem 0.15rem;
  font-size: 0.75rem;
}
.party-chip img { width: 22px; height: 22px; }
.place-list { display: flex; flex-direction: column; gap: 0.3rem; }
.place {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.35rem 0.5rem;
}
.place.sel { border-color: var(--gold); background: #2a2618; }
.place .mark {
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c, var(--gold)); color: #0b100e;
  font-size: 0.62rem; font-weight: 700;
}
.place .mark.base { border-radius: 0.3rem 0.3rem 0.3rem 0; }
.place img { width: 22px; height: 22px; object-fit: contain; }
.place strong { font-size: 0.88rem; display: block; line-height: 1.2; }
.map-card header img { width: 40px; height: 40px; object-fit: contain; }
.place .sub { font-size: 0.72rem; color: var(--muted); }
.goto-map {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
}
.side-label {
  margin: 0.7rem 0 0.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  font-family: "Source Sans 3", system-ui, sans-serif;
}
.who-list { display: flex; flex-direction: column; gap: 0.28rem; margin-top: 0.35rem; }
.who-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 0.5rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.82rem;
}
button.who-row { cursor: pointer; }
.who-row img { width: 22px; height: 22px; object-fit: contain; }
.who-row.yes { border-color: #3a5a32; }
.who-row.mid { border-color: #6a5420; }
.who-row.no { opacity: 0.55; }
.who-row .sub { font-size: 0.72rem; color: var(--muted); }
.who-row.yes .sub { color: var(--leaf); }
.who-row.mid .sub { color: var(--gold); }

.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-4); }

.breed-hero {
  display: flex;
  align-items: end;
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.picker-wrap { position: relative; flex: 1; min-width: 14rem; }
.block-head .picker-wrap { z-index: 6; min-width: 12rem; }
.picker-wrap label { display: block; color: var(--muted); font-size: 0.8rem; margin-bottom: 0.3rem; }
.times { font-family: Fraunces, serif; font-size: 1.6rem; color: var(--gold); padding-bottom: 0.4rem; }
.child-slot { min-width: 12rem; min-height: 5.5rem; }
.menu {
  position: absolute;
  z-index: 20;
  left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  max-height: 16rem;
  overflow: auto;
  box-shadow: var(--shadow);
}
.menu button {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; text-align: left;
  background: transparent; color: var(--text);
  border: 0; padding: 0.4rem 0.6rem;
}
.menu button:hover, .menu button.active { background: #2a3a31; }
.pal-mini { display: flex; align-items: center; gap: 0.6rem; }
.pal-mini img, .pal-card img, .dex-cell img { width: 44px; height: 44px; object-fit: contain; }
.have { color: var(--leaf); }
.child-card, .pal-card, .player-card, .path-card, .work-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem;
}
.path-card { margin-bottom: 0.6rem; }
.path-steps { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.pal-grid, .dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}
.dex-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.pal-card { display: flex; flex-direction: column; gap: 0.35rem; }
.pal-card header { display: flex; gap: 0.6rem; align-items: center; }
.iv { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 0.3rem; align-items: center; font-size: 0.78rem; color: var(--muted); }
.bar { height: 0.35rem; background: #2a3328; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #6a8f3d, var(--gold)); }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #2a3328;
  margin: 0.1rem 0.15rem 0 0;
}
.tag.lucky { background: #3d3314; color: var(--gold); }
.tag.boss { background: #3a221c; color: var(--ember); }
.el { font-size: 0.72rem; color: var(--sky); }
.dex-cell {
  text-align: center;
  padding: 0.45rem 0.2rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.72rem;
}
.dex-cell.missing { opacity: 0.38; filter: grayscale(1); }
.dex-cell.owned { border-color: #4a6a38; }

.work-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  background: var(--bg);
  padding: var(--space-2) 0 var(--space-3);
}
.work-dash {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: var(--space-4);
  align-items: start;
}
.work-main, .work-side { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.work-side { position: sticky; top: calc(var(--header-h) + 3.6rem); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}
.work-card { display: flex; flex-direction: column; gap: 0.45rem; }
.work-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.work-card header strong {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.work-ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
  image-rendering: auto;
}
.work-ico.sm { width: 18px; height: 18px; vertical-align: -3px; }
.work-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.work-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.88rem;
}
.work-row img { width: 36px; height: 36px; }
.work-lv {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-weight: 600;
}
.work-card.ok { border-color: #3a5a32; }
.work-card.thin { border-color: #6a5420; }
.work-card.missing { border-color: #6a3030; background: #1b1414; }
.work-card.weak { border-color: #6a5420; }
.work-card.surplus { border-color: #3a5a6a; }
.work-card.idle { opacity: 0.55; }
.swaps { display: flex; flex-direction: column; gap: var(--space-2); }
.work-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.65rem;
}
.swap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.swap.fill { border-color: #6a3030; }
.swap.upgrade { border-color: #6a5420; }
.swap.slot { border-color: #3a5a6a; }
.swap-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.swap-head strong {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.swap-act {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.swap-delta {
  margin-left: auto;
  font-family: Fraunces, Georgia, serif;
  color: var(--leaf);
  font-size: 1.25rem;
  font-weight: 650;
}
.swap-delta.slot { color: var(--sky); font-size: 1rem; }
.swap-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.45rem;
}
.swap-face {
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.55rem 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  min-width: 0;
}
.swap-face strong { font-size: 0.92rem; line-height: 1.2; }
.swap-face.to { border-color: #4a6a38; background: #182416; }
.swap-face.empty {
  border-style: dashed;
  background: #141816;
  justify-content: center;
}
.swap-empty {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1b1414;
  margin-bottom: 0.15rem;
}
.swap-empty .work-ico { width: 32px; height: 32px; }
.swap-ico { width: 56px; height: 56px; object-fit: contain; }
.swap-work { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.15rem; }
.swap-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 3.2rem;
}
.swap-arrow {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.7rem;
  color: var(--gold);
  line-height: 1;
}
.swap-cmp {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.85rem;
}
.swap-cmp.up { color: var(--leaf); font-weight: 700; }
.pips { display: inline-flex; gap: 3px; align-items: end; }
.pips i {
  width: 0.42rem;
  height: 0.68rem;
  border-radius: 1px;
  background: #2a3328;
}
.pips i.on { background: var(--gold); }
.work-crew-title { margin-top: 0; font-size: 1.05rem; }
.work-crew {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-2);
}
.work-inv-head { margin-top: var(--space-3); }
.shared-chest {
  margin-top: var(--space-3);
  padding: 0.85rem 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid #6a5420;
  border-radius: var(--radius);
}
.shared-chest .work-inv-head {
  margin-top: 0.85rem;
  align-items: baseline;
}
.shared-chest .work-inv-head:first-child { margin-top: 0; }
.shared-chest .section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.shared-chest .muted { margin: 0; }
.shared-chest .inv-grid { margin-top: 0.55rem; }
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.45rem;
}
.inv-cell {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 0.4rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.82rem;
}
.inv-cell img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.inv-cell .n { color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 600; }

.nutri {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.nutri-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.nutri-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}
.nutri-col h4 { margin: 0 0 0.35rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.nutri-col .big { font-size: 1.25rem; font-family: Fraunces, Georgia, serif; color: var(--gold); }
.nutri-bar {
  height: 0.45rem;
  background: #2a3328;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}
.nutri-bar > i { display: block; height: 100%; }
.nutri-chart { width: 100%; }
.nutri-chart-title {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  font-family: "Source Sans 3", system-ui, sans-serif;
}
.nutri-chart svg {
  width: 100%;
  height: 168px;
  display: block;
  background: #101714;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}
.nutri-chart.empty {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101714;
  border: 1px dashed var(--line);
  border-radius: 0.55rem;
}
.nutri-chart .grid { stroke: #2c3a31; stroke-width: 1; }
.nutri-chart .axis { fill: #9aa892; font-size: 11px; font-family: "Source Sans 3", sans-serif; }
.nutri-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.45rem; font-size: 0.82rem; color: var(--muted); }
.nutri-leg { display: flex; align-items: center; gap: 0.35rem; }
.nutri-leg i { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; }
.nutri-bar .in { background: var(--leaf); }
.nutri-bar .out { background: var(--ember); }
.nutri-feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.nutri-feed-head h4 { margin: 0; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.nutri-feed { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nutri-pill {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.5rem 0.15rem 0.2rem;
  font-size: 0.8rem;
}
.nutri-pill img { width: 22px; height: 22px; }
.work-crew .work-row { background: var(--surface); border: 1px solid var(--line); border-radius: 0.55rem; padding: 0.35rem 0.45rem; }
.gap-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.tag.missing { background: #3a221c; color: var(--danger); }
.tag.weak { background: #3d3314; color: var(--gold); }
.tag.thin { background: #3d3314; color: var(--gold); }
.tag.ok { background: #24331c; color: var(--leaf); }
.tag.surplus { background: #1c2c33; color: var(--sky); }
.tag.starve { background: #3a221c; color: var(--ember); }

.player-card { margin-bottom: var(--space-3); }
.player-card h2 { font-size: 1.2rem; }
.dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #555; margin-right: 0.35rem; }
.dot.on { background: var(--leaf); box-shadow: 0 0 8px var(--leaf); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.35rem 0.3rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 0.75rem; }

.site-footer { color: var(--muted); font-size: 0.82rem; padding: 0 var(--space-6) var(--space-6); }

body.tab-map {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.tab-map .site-header {
  max-width: none;
  padding: 0.4rem 1rem 0.25rem;
}
body.tab-map .site-header h1 { font-size: 1.15rem; }
body.tab-map .brand-mark { width: 1.8rem; height: 1.8rem; }
body.tab-map .connect { display: none; }
body.tab-map .metric { padding: 0.2rem 0.55rem; font-size: 0.8rem; }
body.tab-map .tabs {
  max-width: none;
  padding: 0.25rem 1rem 0.45rem;
}
body.tab-map .site-footer { display: none; }
body.tab-map main {
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.35rem 0.75rem 0.65rem;
  display: flex;
}
body.tab-map #tab-map {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
body.tab-map .map-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) 18.5rem;
  gap: 0.65rem;
}
body.tab-map .map-col { height: 100%; }
body.tab-map .map-stage {
  flex: 1;
  min-height: 0;
  height: auto;
}
body.tab-map .side {
  max-height: none;
  height: 100%;
}

@media (max-width: 900px) {
  .map-layout, .split, .work-dash { grid-template-columns: 1fr; }
  .work-side { position: static; }
  .site-header { padding: var(--space-4); }
  main, .tabs, .site-footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .map-stage { height: 60vh; }
  .nutri-chart svg { height: 150px; }
  body.tab-map { height: auto; overflow: auto; }
  body.tab-map main { display: block; height: auto; }
  body.tab-map .map-layout { height: auto; grid-template-columns: 1fr; }
  body.tab-map .map-stage { height: 72vh; }
  body.tab-map .side { height: auto; max-height: 28rem; }
}
@media (max-width: 520px) {
  .swap-body { grid-template-columns: 1fr; }
  .swap-mid { flex-direction: row; }
}
