/* PROXIMA // Encounter map (js/encounter.js). Calm, low-contrast styling:
   thin grid, muted terrain, team-colored tokens, no glow or motion. */

.pxe {
  --pxe-bg: hsl(var(--th-bh) calc(14% * var(--th-bs)) 6.5%);
  --pxe-panel: hsl(var(--th-bh) calc(13% * var(--th-bs)) 9%);
  --pxe-raise: hsl(var(--th-bh) calc(12% * var(--th-bs)) 12.5%);
  --pxe-line: hsl(var(--th-bh) calc(10% * var(--th-bs)) 20%);
  --pxe-grid: hsl(var(--th-bh) calc(8% * var(--th-bs)) 100% / 0.07);
  --pxe-text: #dde2dc;
  --pxe-dim: #8f9993;
  --pxe-accent: hsl(var(--th-h) calc(62% * var(--th-s)) calc(64% + var(--th-l)));
  --pxe-accent-soft: hsl(var(--th-h) calc(55% * var(--th-s)) calc(55% + var(--th-l)) / 0.14);
  --pxe-player: hsl(208 62% 64%);
  --pxe-ally: hsl(168 42% 56%);
  --pxe-enemy: hsl(4 58% 62%);
  --pxe-neutral: hsl(40 8% 66%);
  --pxe-floor: hsl(200 7% 12.5%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100vh - 128px);
  min-height: 600px;
  color: var(--pxe-text);
  font-size: 13px;
}
.pxe-env-ship {
  --pxe-floor: hsl(214 14% 13%);
}
.pxe-env-outpost {
  --pxe-floor: hsl(30 9% 13%);
}
.pxe-env-wild {
  --pxe-floor: hsl(115 9% 11.5%);
}
.pxe * {
  box-sizing: border-box;
}
.pxe input,
.pxe select,
.pxe textarea {
  background: var(--pxe-bg);
  border: 1px solid var(--pxe-line);
  border-radius: 4px;
  color: var(--pxe-text);
  padding: 6px 8px;
  font-size: 12.5px;
  width: 100%;
}
.pxe input:focus,
.pxe select:focus,
.pxe textarea:focus {
  border-color: var(--pxe-accent);
  box-shadow: none;
}
.pxe textarea {
  resize: vertical;
  min-height: 0;
  font-family: inherit;
}
.pxe-muted {
  color: var(--pxe-dim);
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0;
}

/* buttons */
.pxe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--pxe-line);
  border-radius: 4px;
  background: var(--pxe-raise);
  color: var(--pxe-text);
  font: 600 12px var(--font, inherit);
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.pxe-btn:hover:not(:disabled) {
  background: hsl(var(--th-bh) calc(12% * var(--th-bs)) 16%);
  border-color: hsl(var(--th-bh) calc(10% * var(--th-bs)) 28%);
}
.pxe-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.pxe-btn.on {
  border-color: var(--pxe-accent);
  color: var(--pxe-accent);
  background: var(--pxe-accent-soft);
}
.pxe-btn.primary {
  background: hsl(var(--th-h) calc(45% * var(--th-s)) calc(30% + var(--th-l)));
  border-color: hsl(var(--th-h) calc(50% * var(--th-s)) calc(42% + var(--th-l)));
  color: #fff;
}
.pxe-btn.primary:hover:not(:disabled) {
  background: hsl(var(--th-h) calc(48% * var(--th-s)) calc(35% + var(--th-l)));
}
.pxe-btn.danger {
  color: #e6a29b;
}
.pxe-btn.danger:hover:not(:disabled) {
  border-color: #8a4c45;
}
.pxe-btn.icon {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 15px;
  flex: none;
}
.pxe-btn.wide {
  width: 100%;
}
label.pxe-btn {
  cursor: pointer;
}

/* toolbar */
.pxe-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: var(--pxe-panel);
  border: 1px solid var(--pxe-line);
  border-radius: 6px;
}
.pxe-scene {
  max-width: 260px;
  font-weight: 700 !important;
  font-size: 14px !important;
  background: transparent !important;
  border-color: transparent !important;
}
.pxe-scene:hover,
.pxe-scene:focus {
  border-color: var(--pxe-line) !important;
}
.pxe-seg {
  display: inline-flex;
}
.pxe-seg .pxe-btn {
  border-radius: 0;
}
.pxe-seg .pxe-btn:first-child {
  border-radius: 4px 0 0 4px;
}
.pxe-seg .pxe-btn:last-child {
  border-radius: 0 4px 4px 0;
}
.pxe-seg .pxe-btn + .pxe-btn {
  margin-left: -1px;
}
.pxe-tb-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pxe-tb-group .pxe-btn {
  min-width: 30px;
  padding: 5px 8px;
}
.pxe-zoom {
  min-width: 40px;
  text-align: center;
  color: var(--pxe-dim);
  font-size: 12px;
}
.pxe-tb-info {
  color: var(--pxe-dim);
  font-size: 12px;
  margin-left: auto;
}
.pxe-live {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--pxe-accent-soft);
  color: var(--pxe-accent);
  font-weight: 700;
  font-size: 12px;
}
.pxe-menu {
  position: relative;
}
.pxe-menu > summary {
  list-style: none;
}
.pxe-menu > summary::-webkit-details-marker {
  display: none;
}
.pxe-menu-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: 320px;
  padding: 10px;
  background: var(--pxe-raise);
  border: 1px solid var(--pxe-line);
  border-radius: 6px;
  box-shadow: 0 10px 30px #0009;
  display: grid;
  gap: 8px;
}
.pxe-menu-list {
  max-height: 260px;
  overflow: auto;
}
.pxe-menu-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--pxe-line);
}
.pxe-menu-row > span {
  flex: 1;
  min-width: 0;
  display: grid;
}
.pxe-menu-row small {
  color: var(--pxe-dim);
}
.pxe-menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* columns */
.pxe-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 300px;
  gap: 10px;
}
.pxe-left,
.pxe-right {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}
.pxe-sec {
  background: var(--pxe-panel);
  border: 1px solid var(--pxe-line);
  border-radius: 6px;
  padding: 11px 12px;
}
.pxe-sec h4 {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 9px;
  font: 700 12px var(--head, inherit);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pxe-accent);
}
.pxe-sec h4 small {
  margin-left: auto;
  font: 500 11px var(--font, inherit);
  letter-spacing: 0;
  text-transform: none;
  color: var(--pxe-dim);
}
.pxe-sec h5 {
  margin: 10px 0 4px;
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pxe-dim);
}
.pxe-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.pxe-tabs .pxe-btn {
  padding: 7px 0;
}

/* lists */
.pxe-list {
  display: grid;
}
.pxe-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid hsl(var(--th-bh) calc(10% * var(--th-bs)) 15%);
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
  text-align: left;
  width: 100%;
}
.pxe-row:last-child {
  border-bottom: 0;
}
.pxe-row.done {
  opacity: 0.55;
}
.pxe-row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  line-height: 1.3;
}
.pxe-row-main b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pxe-row-main small {
  color: var(--pxe-dim);
  font-size: 11px;
}
.pxe-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.pxe-row-actions > * {
  flex: 1;
}
.pxe-note-row {
  cursor: pointer;
  align-items: flex-start;
}
.pxe-note-row b {
  color: var(--pxe-accent);
  min-width: 34px;
}
.pxe-note-row span {
  color: var(--pxe-dim);
  font-size: 12px;
}
.pxe-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--pxe-neutral);
}
.pxe-dot.team-player {
  background: var(--pxe-player);
}
.pxe-dot.team-ally {
  background: var(--pxe-ally);
}
.pxe-dot.team-enemy {
  background: var(--pxe-enemy);
}
.pxe-role {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  background: hsl(4 30% 22%);
  color: #e8b9b3;
}
.pxe-role.role-minion {
  background: hsl(4 12% 20%);
  color: #b7a3a0;
}
.pxe-role.role-elite {
  background: hsl(4 42% 28%);
  color: #f2cbc5;
}
.pxe-role.role-boss {
  background: hsl(4 55% 34%);
  color: #fff;
}
.pxe-hostile-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: end;
}
.pxe-hostile-controls input[type='search'] {
  grid-column: 1 / -1;
}
.pxe-hostile-controls label,
.pxe-form label {
  display: grid;
  gap: 3px;
  font-size: 10.5px;
  color: var(--pxe-dim);
  letter-spacing: 0.3px;
}
.pxe-hostiles {
  max-height: 360px;
  overflow: auto;
  margin-top: 4px;
  scrollbar-width: thin;
}
.pxe-custom > summary {
  list-style: none;
  cursor: pointer;
}
.pxe-custom > summary h4 {
  margin: 0;
}
.pxe-custom > summary h4::after {
  content: '＋';
  margin-left: auto;
  color: var(--pxe-dim);
}
.pxe-custom[open] > summary h4 {
  margin-bottom: 9px;
}
.pxe-custom[open] > summary h4::after {
  content: '−';
}
.pxe-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 8px;
}
.pxe-form .span2,
.pxe-form label.span2 {
  grid-column: span 2;
}
.pxe-block {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--pxe-dim);
  margin: 8px 0;
}
.pxe-size {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pxe-size input {
  width: 70px;
}

/* terrain brushes */
.pxe-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 8px;
}
.pxe-brushes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.pxe-brush {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--pxe-raise);
  color: var(--pxe-text);
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.pxe-brush:hover {
  border-color: var(--pxe-line);
}
.pxe-brush.on {
  border-color: var(--pxe-accent);
  background: var(--pxe-accent-soft);
}
.pxe-brush i {
  font-style: normal;
  width: 18px;
  text-align: center;
  color: var(--pxe-dim);
}

/* map */
.pxe-center {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--pxe-bg);
  border: 1px solid var(--pxe-line);
  border-radius: 6px;
  overflow: hidden;
}
.pxe-map-scroll {
  flex: 1;
  display: flex;
  overflow: auto;
  padding: 14px;
  scrollbar-width: thin;
}
.pxe-grid {
  display: grid;
  grid-template-columns: 22px repeat(var(--cols), var(--cell));
  grid-template-rows: 18px repeat(var(--rows), var(--cell));
  width: max-content;
  margin: auto;
  user-select: none;
  -webkit-user-select: none;
}
.pxe-grid.painting {
  cursor: crosshair;
  touch-action: none;
}
.pxe-corner {
  grid-column: 1;
}
.pxe-label {
  display: grid;
  place-items: center;
  font-size: 10px;
  color: hsl(var(--th-bh) 6% 45%);
}
.pxe-cell {
  position: relative;
  background: var(--pxe-floor);
  box-shadow: inset -1px -1px 0 var(--pxe-grid);
  display: grid;
  place-items: center;
}
.pxe-grid > .pxe-cell:nth-child(n) {
  cursor: pointer;
}
.pxe-glyph {
  font-size: calc(var(--cell) * 0.42);
  line-height: 1;
  opacity: 0.7;
  pointer-events: none;
}
.pxe-cell.g-cover {
  background: hsl(210 7% 21%);
  color: #a4adb6;
}
.pxe-cell.t-wall {
  background: hsl(210 8% 30%);
  box-shadow: inset 0 0 0 1px hsl(210 8% 36%);
}
.pxe-cell.t-wall .pxe-glyph {
  display: none;
}
.pxe-cell.t-door {
  background: hsl(210 8% 17%);
}
.pxe-cell.g-ground {
  background: hsl(150 7% 15%);
  color: #8fa198;
}
.pxe-cell.t-water {
  background: hsl(205 22% 17%);
  color: #84a5ba;
}
.pxe-cell.t-ice {
  background: hsl(195 15% 20%);
  color: #a9c3cc;
}
.pxe-cell.t-high {
  background: hsl(40 8% 18%);
  color: #b3ab98;
}
.pxe-cell.g-hazard {
  background: hsl(10 25% 16%);
  color: hsl(12 55% 64%);
}
.pxe-cell.t-smoke {
  background: hsl(220 5% 22%);
  color: #a8adb5;
}
.pxe-cell.g-objects {
  color: var(--pxe-accent);
}
.pxe-cell.g-structure {
  background: hsl(220 8% 17%);
  color: #9ea5b4;
}
.pxe-cell.reach {
  background-image: linear-gradient(var(--pxe-accent-soft), var(--pxe-accent-soft));
}
.pxe-cell.picked,
.pxe-cell.rect,
.pxe-cell.drop {
  box-shadow:
    inset 0 0 0 2px var(--pxe-accent),
    inset -1px -1px 0 var(--pxe-grid);
}
.pxe-cell.rect {
  background-image: linear-gradient(var(--pxe-accent-soft), var(--pxe-accent-soft));
}
.pxe-note-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: hsl(48 70% 62%);
  pointer-events: none;
}

/* tokens */
.pxe-token {
  --team: var(--pxe-neutral);
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 2px solid var(--team);
  background: hsl(var(--th-bh) calc(12% * var(--th-bs)) 9%);
  display: grid;
  place-items: center;
  cursor: grab;
  z-index: 2;
}
.pxe-token.team-player {
  --team: var(--pxe-player);
}
.pxe-token.team-ally {
  --team: var(--pxe-ally);
}
.pxe-token.team-enemy {
  --team: var(--pxe-enemy);
}
.pxe-token.role-elite,
.pxe-token.role-boss {
  border-width: 3px;
}
.pxe-token.role-boss {
  box-shadow: 0 0 0 2px hsl(4 40% 30%);
}
.pxe-token b {
  font-size: max(9px, calc(var(--cell) * 0.24));
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--team);
  pointer-events: none;
}
.pxe-token em {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: hsl(48 60% 50%);
  color: #111;
  font: 800 9px/14px sans-serif;
  text-align: center;
  pointer-events: none;
}
.pxe-token .pxe-bar {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -5px;
  height: 4px;
}
.pxe-token.sel {
  outline: 2px solid #f1f4f0;
  outline-offset: 2px;
}
.pxe-token.turn {
  box-shadow: 0 0 0 4px var(--pxe-accent-soft);
  background: hsl(var(--th-h) calc(30% * var(--th-s)) 14%);
}
.pxe-token.target {
  outline: 2px dashed var(--pxe-enemy);
  outline-offset: 3px;
}
.pxe-token.down {
  border-style: dashed;
  opacity: 0.45;
  filter: grayscale(1);
}
.pxe-token.down::after {
  content: '';
  position: absolute;
  inset: 22%;
  background: linear-gradient(45deg, transparent 46%, var(--team) 46% 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, var(--team) 46% 54%, transparent 54%);
}
.pxe-bar {
  display: block;
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: hsl(0 0% 100% / 0.08);
  overflow: hidden;
}
.pxe-bar > i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: hsl(130 35% 52%);
}
.pxe-bar > i.sh {
  background: hsl(200 55% 62%);
  opacity: 0.9;
  height: 45%;
  top: auto;
}
.pxe-status {
  padding: 7px 12px;
  border-top: 1px solid var(--pxe-line);
  background: var(--pxe-panel);
  color: var(--pxe-dim);
  font-size: 12px;
  min-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* summary / difficulty */
.pxe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.pxe-stats div {
  background: var(--pxe-raise);
  border-radius: 4px;
  padding: 7px 8px;
  display: grid;
}
.pxe-stats b {
  font-size: 17px;
}
.pxe-stats small {
  color: var(--pxe-dim);
  font-size: 10.5px;
}
.pxe-meter {
  position: relative;
  padding-bottom: 16px;
}
.pxe-meter-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--pxe-raise);
  overflow: hidden;
}
.pxe-meter-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: hsl(130 30% 45%);
}
.pxe-meter-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: hsl(0 0% 100% / 0.25);
  z-index: 1;
}
.pxe-meter-labels span {
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  font-size: 9.5px;
  color: var(--pxe-dim);
}
.rate-trivial,
.rate-easy {
  --rate: hsl(130 30% 50%);
}
.rate-medium {
  --rate: hsl(48 50% 52%);
}
.rate-hard {
  --rate: hsl(25 60% 55%);
}
.rate-deadly {
  --rate: hsl(4 58% 56%);
}
.pxe-meter-fill[class*='rate-'] {
  background: var(--rate);
}
.pxe-rating {
  margin: 6px 0 2px;
  font-weight: 800;
  font-size: 15px;
  color: var(--rate);
}
.pxe-summary .pxe-btn.wide {
  margin-top: 10px;
}

/* inspector */
.pxe-vitals {
  display: grid;
  grid-template-columns: 1fr 1fr 56px;
  gap: 6px;
  margin-bottom: 9px;
}
.pxe-vitals > div {
  background: var(--pxe-raise);
  border-radius: 4px;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}
.pxe-vitals small {
  color: var(--pxe-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.pxe-vitals b {
  font-size: 16px;
}
.pxe-vitals b span {
  color: var(--pxe-dim);
  font-size: 12px;
  font-weight: 500;
}
.pxe-adjust {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 5px;
  margin-bottom: 4px;
}
.pxe-adjust .pxe-btn {
  padding: 6px 8px;
}
.pxe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}
.pxe-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 8px;
  border-radius: 999px;
  background: hsl(48 30% 22%);
  color: #ead9a4;
  font-size: 11.5px;
}
.pxe-chip small {
  opacity: 0.75;
}
.pxe-chip button {
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  padding: 0 3px;
}
.pxe-add-cond {
  display: grid;
  grid-template-columns: 1fr 52px auto;
  gap: 5px;
}
.pxe-edit {
  margin-top: 10px;
  border-top: 1px solid var(--pxe-line);
  padding-top: 8px;
}
.pxe-edit > summary {
  cursor: pointer;
  color: var(--pxe-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* run mode */
.pxe-turn-buttons {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.pxe-init-list {
  display: grid;
  gap: 4px;
  margin: 8px 0;
}
.pxe-init {
  display: flex;
  align-items: stretch;
  gap: 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: var(--pxe-raise);
}
.pxe-init.current {
  border-color: var(--pxe-accent);
  background: var(--pxe-accent-soft);
}
.pxe-init.sel:not(.current) {
  border-color: var(--pxe-line);
}
.pxe-init.down {
  opacity: 0.45;
}
.pxe-init > input {
  width: 44px !important;
  flex: none;
  padding: 0 !important;
  text-align: center;
  font-weight: 700;
  border: 0 !important;
  border-right: 1px solid var(--pxe-line) !important;
  border-radius: 5px 0 0 5px !important;
  background: transparent !important;
}
.pxe-init-mod {
  width: 44px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--pxe-dim);
  border-right: 1px solid var(--pxe-line);
  font-size: 12px;
}
.pxe-init-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 2px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pxe-init-main > span:last-child {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.pxe-init-main b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pxe-init-main small {
  color: var(--pxe-dim);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pxe-target {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  margin-bottom: 9px;
  border-radius: 5px;
  background: var(--pxe-raise);
  min-height: 40px;
}
.pxe-target > span:first-child:not(.pxe-muted) {
  color: var(--pxe-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.pxe-target b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.pxe-target small {
  margin-left: auto;
  color: var(--pxe-dim);
}
.pxe-facts {
  font-size: 12px;
  color: var(--pxe-dim);
  margin: 0 0 9px;
}
.pxe-result {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 5px;
  border-left: 3px solid var(--pxe-dim);
  background: var(--pxe-raise);
  display: grid;
  gap: 3px;
}
.pxe-result.hit {
  border-left-color: hsl(25 60% 58%);
}
.pxe-result small,
.pxe-result span {
  color: var(--pxe-dim);
  font-size: 11.5px;
}
.pxe-result b {
  font-size: 13.5px;
}
.pxe-log-list {
  max-height: 260px;
  overflow: auto;
  scrollbar-width: thin;
}
.pxe-log-list p {
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid hsl(var(--th-bh) calc(10% * var(--th-bs)) 15%);
  font-size: 12px;
  line-height: 1.4;
  color: #c4cbc5;
}
.pxe-log-list p small {
  display: inline-block;
  min-width: 24px;
  color: var(--pxe-dim);
  margin-right: 4px;
}
.pxe-log-list .k-hit {
  color: #e6c3b5;
}
.pxe-log-list .k-heal {
  color: #b9dcc1;
}
.pxe-log-list .k-start,
.pxe-log-list .k-turn {
  color: var(--pxe-accent);
}

/* smaller screens: panels stack, map first */
@media (max-width: 1200px) {
  .pxe {
    height: auto;
  }
  .pxe-body {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .pxe-center {
    height: calc(100vh - 190px);
    min-height: 480px;
  }
  .pxe-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }
}
@media (max-width: 820px) {
  .pxe {
    height: auto;
    min-height: 0;
  }
  .pxe-body {
    grid-template-columns: 1fr;
  }
  .pxe-center {
    order: -1;
    height: 70vh;
  }
  .pxe-left,
  .pxe-right {
    overflow: visible;
  }
  .pxe-tb-info {
    display: none;
  }
}
