/* Nightwatch Mech Builder — record-sheet style pip diagrams */

.mech-pip-diagram {
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 8px;
  padding: 0.75rem 1rem 1rem;
  background: var(--mud-palette-surface);
  height: 100%;
}

.mech-pip-layout {
  display: grid;
  gap: 0.65rem;
}

.mech-pip-loc-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.mech-pip-loc-count {
  font-weight: 500;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.mech-pip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  min-height: 1.1rem;
}

.mech-pip {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  padding: 0;
  cursor: pointer;
  background: transparent;
  flex: 0 0 auto;
}

.mech-pip:hover {
  transform: scale(1.15);
}

.mech-pip-diagram--protected .mech-pip {
  cursor: default;
  opacity: 0.92;
}

.mech-pip-diagram--protected .mech-pip:hover {
  transform: none;
}

.mech-pip-diagram--protected .mech-pip:disabled {
  pointer-events: none;
}

.mech-pip--armor.mech-pip--ok {
  background: #4fc3f7;
  border-color: #29b6f6;
  color: #29b6f6;
}

.mech-pip--armor.mech-pip--gone {
  background: transparent;
  border-color: #78909c;
  color: #78909c;
  opacity: 0.7;
}

.mech-pip--rear.mech-pip--ok {
  background: #81d4fa;
  border-color: #4fc3f7;
  color: #4fc3f7;
}

.mech-pip--rear.mech-pip--gone {
  background: transparent;
  border-color: #78909c;
  opacity: 0.7;
}

.mech-pip--structure.mech-pip--ok {
  background: #ffb74d;
  border-color: #ffa726;
  color: #ffa726;
}

.mech-pip--structure.mech-pip--gone {
  background: transparent;
  border-color: #8d6e63;
  opacity: 0.75;
}

.mech-pip-max {
  max-width: 6.5rem;
}

.mech-builder-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.mech-builder-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem;
}

/* —— Full record sheet layout —— */

.record-sheet {
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 10px;
  background: var(--mud-palette-background-gray, var(--mud-palette-surface));
  padding: 0.75rem;
}

.record-sheet-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.record-sheet-panel {
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 8px;
  background: var(--mud-palette-surface);
  padding: 0.75rem 1rem;
  height: 100%;
}

.record-sheet-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--mud-palette-lines-default);
  padding-bottom: 0.35rem;
}

.record-sheet-kv {
  display: grid;
  grid-template-columns: minmax(5.5rem, 38%) 1fr;
  gap: 0.2rem 0.6rem;
  font-size: 0.875rem;
  align-items: baseline;
}

.record-sheet-kv .k {
  opacity: 0.7;
  font-size: 0.8rem;
}

.record-sheet-kv .v {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.record-sheet-system-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.record-sheet-system-pips {
  display: flex;
  gap: 4px;
}

.record-sheet-system-pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #ef5350;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.record-sheet-system-pip--hit {
  background: #ef5350;
}

.record-sheet-system-pip:disabled {
  cursor: default;
  pointer-events: none;
}

.record-sheet-protected .record-sheet-system-pip {
  cursor: default;
}

/* Warrior data: pilot hit / consciousness rules under the pips */
.warrior-pilot-rules {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  line-height: 1.4;
  opacity: 0.95;
}

.warrior-pilot-rules .mud-typography {
  margin: 0;
}

.warrior-pilot-kia-label {
  color: #ef5350;
  letter-spacing: 0.04em;
}

.record-sheet-weapons-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.record-sheet-weapons-table th,
.record-sheet-weapons-table td {
  text-align: left;
  padding: 0.3rem 0.45rem;
  border-bottom: 1px solid var(--mud-palette-lines-default);
}

.record-sheet-weapons-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  font-weight: 700;
}

.record-sheet-weapons-table td:last-child,
.record-sheet-weapons-table th:last-child {
  text-align: right;
}

/* Refittable / bay-removable gear — consistent green cue */
:root {
  --refit-gear-color: #66bb6a;
  --refit-gear-bg: color-mix(in srgb, #66bb6a 16%, transparent);
  --refit-gear-border: color-mix(in srgb, #66bb6a 55%, transparent);
}

.refit-gear-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--refit-gear-color);
  font-weight: 600;
}

.refit-gear-legend::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--refit-gear-color);
  box-shadow: 0 0 0 1px var(--refit-gear-border);
}

.record-sheet-weapons-table tr.refit-gear td {
  color: var(--refit-gear-color);
}

.record-sheet-weapons-table tr.refit-gear td:first-child,
.record-sheet-weapons-table tr.refit-gear .refit-gear-name {
  font-weight: 600;
}

.record-sheet-weapons-table tr.refit-gear {
  background: var(--refit-gear-bg);
}

.mud-table-row.refit-gear td,
.mud-table-row.refit-gear .mud-table-cell {
  color: var(--refit-gear-color) !important;
}

.mud-table-row.refit-gear {
  background: var(--refit-gear-bg) !important;
}

.mud-table-row.refit-gear.refit-gear--selected {
  background: color-mix(in srgb, #66bb6a 28%, var(--mud-palette-surface)) !important;
  box-shadow: inset 3px 0 0 var(--refit-gear-color);
}

.record-sheet-heat-scale {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.record-sheet-heat-row {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.35rem;
  align-items: center;
}

.record-sheet-heat-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--mud-palette-lines-default);
  background: transparent;
}

.record-sheet-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.75rem 0 0.4rem;
  opacity: 0.8;
}

/* Silhouette row — full width, three large diagrams */
.mech-silhouette-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .mech-silhouette-row {
    grid-template-columns: 1fr;
  }
}

.mech-silhouette {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.25rem 0.75rem;
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 8px;
  background: var(--mud-palette-background);
  min-height: 22rem;
}

.mech-silhouette--large {
  width: 100%;
}

.mech-silhouette-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.mech-silhouette-totals {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-bottom: 0.35rem;
  opacity: 0.9;
}

.mech-silhouette-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  min-height: 18rem;
}

/* Location body shapes — pips are drawn inside these */
.sil-part {
  stroke: var(--mud-palette-text-primary);
  stroke-width: 1.6;
  fill-opacity: 0.12;
}

.sil-part--armor {
  fill: #4fc3f7;
  stroke: #4fc3f7;
}

.sil-part--rear {
  fill: #81d4fa;
  stroke: #4fc3f7;
}

.sil-part--structure {
  fill: #ffb74d;
  stroke: #ffa726;
}

.sil-label {
  fill: var(--mud-palette-text-primary);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  opacity: 0.95;
  pointer-events: none;
}

.sil-count {
  fill: var(--mud-palette-text-secondary);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
  pointer-events: none;
}

.sil-pip {
  stroke-width: 1.1;
}

.sil-pip--clickable {
  cursor: pointer;
}

.sil-pip--clickable:hover {
  filter: brightness(1.25);
  stroke-width: 1.6;
}

.mech-silhouette--protected .sil-pip {
  pointer-events: none;
}

.sil-pip--ok.sil-pip--armor {
  fill: #4fc3f7;
  stroke: #0288d1;
}

.sil-pip--gone.sil-pip--armor {
  fill: transparent;
  stroke: #546e7a;
  opacity: 0.9;
}

.sil-pip--ok.sil-pip--rear {
  fill: #81d4fa;
  stroke: #0288d1;
}

.sil-pip--gone.sil-pip--rear {
  fill: transparent;
  stroke: #546e7a;
  opacity: 0.9;
}

.sil-pip--ok.sil-pip--structure {
  fill: #ffb74d;
  stroke: #ef6c00;
}

.sil-pip--gone.sil-pip--structure {
  fill: transparent;
  stroke: #6d4c41;
  opacity: 0.9;
}

.sil-part--selected {
  stroke-width: 3.2;
  fill-opacity: 0.28;
  filter: brightness(1.15);
}

.sil-pip--ok.sil-pip--free {
  fill: #4ade80;
  stroke: #16a34a;
}

.sil-pip--ok.sil-pip--lock {
  fill: #6b7280;
  stroke: #4b5563;
}

.sil-pip--gone.sil-pip--open {
  fill: transparent;
  stroke: #22d3ee;
  opacity: 0.95;
}

/* Critical table — paper-doll rows (head / arms+torsos / legs) */
.crit-table-paperdoll {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.crit-row {
  display: grid;
  gap: 0.65rem;
  align-items: start;
}

/* Row 1: head centered */
.crit-row--head {
  grid-template-columns: 1fr;
  justify-items: center;
}

.crit-row--head .crit-loc {
  width: 100%;
  max-width: 14rem;
}

/* Row 2: LA · LT · CT · RT · RA */
.crit-row--mid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Row 3: legs under LT / RT (columns 2 and 4 of the mid row) */
.crit-row--legs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crit-row--legs .crit-loc--ll {
  grid-column: 2;
}

.crit-row--legs .crit-loc--rl {
  grid-column: 4;
}

@media (max-width: 900px) {
  .crit-row--mid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crit-row--legs {
    grid-template-columns: 1fr 1fr;
    max-width: 28rem;
    margin-inline: auto;
  }

  .crit-row--legs .crit-loc--ll,
  .crit-row--legs .crit-loc--rl {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .crit-row--mid {
    grid-template-columns: 1fr;
  }

  .crit-row--legs {
    grid-template-columns: 1fr;
    max-width: 14rem;
  }
}

.crit-loc {
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: var(--mud-palette-surface);
  min-width: 0;
}

.crit-loc h4 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--mud-palette-lines-default);
  padding-bottom: 0.25rem;
}

/* Official RS dice bands: 1-3 / 4-6, each with slots numbered 1–6 */
.crit-band {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.35rem;
  align-items: start;
  margin-bottom: 0.35rem;
}

.crit-band:last-child {
  margin-bottom: 0;
}

.crit-band-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding-top: 0.2rem;
  opacity: 0.75;
  writing-mode: horizontal-tb;
  min-width: 1.4rem;
}

.crit-band-slots {
  min-width: 0;
}

/* Head / legs: single band with no side label — full width */
.crit-band:not(:has(.crit-band-label)) {
  grid-template-columns: 1fr;
}

.crit-slot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.12rem 0;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 3px;
}

.crit-slot:hover:not(:disabled) {
  background: var(--mud-palette-action-default-hover);
}

.crit-slot:disabled {
  cursor: default;
}

.crit-slot--empty {
  opacity: 0.45;
  font-style: italic;
}

.crit-slot--destroyed {
  text-decoration: line-through;
  opacity: 0.7;
  color: #ef5350;
}

/* Removable / refittable equipment on the critical hit table */
.crit-slot--refit {
  color: var(--refit-gear-color);
  background: var(--refit-gear-bg);
  font-weight: 600;
}

.crit-slot--refit .crit-slot-num {
  color: var(--refit-gear-color);
  opacity: 0.85;
}

.crit-slot--refit:hover:not(:disabled) {
  background: color-mix(in srgb, #66bb6a 28%, transparent);
}

.crit-slot--refit.crit-slot--destroyed {
  color: #ef5350;
  background: color-mix(in srgb, #ef5350 12%, transparent);
}

.crit-slot-num {
  font-variant-numeric: tabular-nums;
  opacity: 0.55;
  min-width: 1.1rem;
  font-size: 0.7rem;
}

/* Multi-crit brackets / ammo labels (record-sheet style) */
.crit-slot--linked {
  font-family: inherit;
}

.crit-slot-multicrit {
  font-weight: 600;
}

.crit-slot--ammo {
  font-variant-numeric: tabular-nums;
}

.rs-ammo-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: baseline;
  font-size: 0.85rem;
  padding: 0.35rem 0.25rem;
  border-top: 1px dashed var(--mud-palette-lines-default);
}

.rs-ammo-footer-label {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.rs-ammo-footer-token {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.rs-range-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-align: right;
  min-width: 1.5rem;
}

.rs-inventory-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.rs-inventory-header h3 {
  margin: 0;
}

.rs-inventory-hexes {
  font-size: 0.75rem;
  opacity: 0.65;
  font-style: italic;
}

.rs-inventory-table {
  font-variant-numeric: tabular-nums;
}

.rs-inventory-table th,
.rs-inventory-table td {
  padding: 0.2rem 0.45rem;
}

/* Clickable inventory Type → equipment description / mechanics dialog */
button.rs-equip-type-link {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--mud-palette-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    text-align: left;
}

button.rs-equip-type-link:hover {
    color: var(--mud-palette-primary-darken, var(--mud-palette-primary));
}

button.rs-equip-type-link:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.rs-inventory-table th:nth-child(1),
.rs-inventory-table td:nth-child(1) {
  text-align: right;
  width: 2.2rem;
}

/* Live heat */
.heat-live {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.heat-live-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.heat-live-bar {
  height: 10px;
  border-radius: 5px;
  background: var(--mud-palette-lines-default);
  overflow: hidden;
}

.heat-live-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #66bb6a, #ffee58, #ef5350);
  transition: width 0.15s ease;
}

.heat-scale-live {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-height: 8rem;
  overflow: auto;
}

.heat-scale-live button {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 3px;
  border: 1px solid var(--mud-palette-lines-default);
  background: transparent;
  font-size: 0.65rem;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.heat-scale-live button.heat-on {
  background: #ef5350;
  border-color: #e53935;
  color: #fff;
}

.heat-scale-live button:disabled {
  cursor: default;
}

/* Printed-style HEAT DATA table (Total Warfare) */
.heat-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.heat-data-table th,
.heat-data-table td {
  text-align: left;
  padding: 0.18rem 0.3rem;
  border-bottom: 1px solid var(--mud-palette-lines-default);
  vertical-align: top;
}

.heat-data-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.heat-data-table .heat-lvl {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  width: 2.2rem;
  white-space: nowrap;
}

.heat-data-table tr.heat-row-active {
  background: rgba(239, 83, 80, 0.18);
  font-weight: 600;
}

.heat-data-table tr.heat-row-active .heat-lvl {
  color: #ef5350;
}

/* Armor repair quote (Refit & Repair) */
.armor-quote-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.armor-quote-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) 1fr;
  gap: 0.75rem 1rem;
  align-items: baseline;
  font-size: 0.85rem;
  line-height: 1.35;
}

.armor-quote-label {
  color: var(--mud-palette-text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.armor-quote-value {
  color: var(--mud-palette-text-primary);
  word-break: break-word;
}

.armor-quote-row--total {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--mud-palette-lines-default);
}

.armor-quote-row--total .armor-quote-label,
.armor-quote-row--total .armor-quote-value {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 480px) {
  .armor-quote-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Maintenance Bay — horizontal mech strip + cards */
.bay-mech-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.bay-mech-strip > .bay-mech-item {
  flex: 0 0 auto;
  width: 13.25rem;
  scroll-snap-align: start;
}

.bay-mech-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.7rem 0.65rem;
  min-height: 100%;
  min-width: 0;
}

.bay-mech-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.bay-mech-card-title {
  font-family: Rajdhani, Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  word-break: break-word;
  text-transform: uppercase;
}

.bay-mech-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  color: var(--mud-palette-text-secondary);
  font-size: 0.72rem;
  line-height: 1.3;
}

.bay-mech-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.bay-mech-card-actions {
  margin-top: auto;
  padding-top: 0.2rem;
}

.bay-mech-item {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--mud-palette-lines-default);
  border-radius: 4px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  background: var(--mud-palette-surface);
}

.bay-mech-rail {
  width: 0.35rem;
  flex-shrink: 0;
}

.bay-mech-rail--ready { background: #22c55e; }
.bay-mech-rail--damaged { background: #f59e0b; }
.bay-mech-rail--crippled { background: #ef4444; }
.bay-mech-rail--destroyed { background: #6b7280; }

.bay-mech-item--ready {
  background: color-mix(in srgb, #22c55e 7%, var(--mud-palette-surface));
}

.bay-mech-item--damaged {
  background: color-mix(in srgb, #f59e0b 10%, var(--mud-palette-surface));
}

.bay-mech-item--crippled {
  background: color-mix(in srgb, #ef4444 12%, var(--mud-palette-surface));
}

.bay-mech-item--destroyed {
  background: color-mix(in srgb, #111318 55%, var(--mud-palette-surface));
}

.bay-mech-item--destroyed .bay-mech-card-title {
  opacity: 0.75;
}

.bay-mech-stamp {
  flex-shrink: 0;
  font-family: Rajdhani, Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.62rem;
  border: 2px solid currentColor;
  padding: 0.08rem 0.28rem;
  transform: rotate(5deg);
  white-space: nowrap;
  line-height: 1.2;
}

.bay-mech-stamp--ready { color: #16a34a; }
.bay-mech-stamp--damaged { color: #d97706; }
.bay-mech-stamp--crippled { color: #dc2626; }
.bay-mech-stamp--destroyed { color: #9ca3af; }

.bay-mech-bars {
  display: grid;
  gap: 0.22rem;
}

.bay-mech-bar {
  display: grid;
  grid-template-columns: 2.2rem 1fr 2.7rem;
  gap: 0.28rem;
  align-items: center;
  font-size: 0.62rem;
  color: var(--mud-palette-text-secondary);
}

.bay-mech-bar-track {
  height: 0.38rem;
  background: rgba(128, 128, 128, 0.28);
  overflow: hidden;
}

.bay-mech-bar-fill { height: 100%; }
.bay-mech-bar-fill--armor { background: #38bdf8; }
.bay-mech-bar-fill--is { background: #f59e0b; }

.bay-mech-tag {
  font-family: Rajdhani, Roboto, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--mud-palette-lines-default);
  padding: 0.05rem 0.3rem;
  color: var(--mud-palette-text-secondary);
}

.bay-mech-tag--bay {
  border-color: color-mix(in srgb, var(--mud-palette-secondary) 70%, transparent);
  color: var(--mud-palette-secondary);
}

.bay-mech-tag--sel {
  border-color: color-mix(in srgb, var(--mud-palette-primary) 70%, transparent);
  color: var(--mud-palette-primary);
}

.bay-mech-item:hover {
  border-color: var(--mud-palette-primary);
}

.bay-mech-item--in-bay:not(.bay-mech-item--active) {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mud-palette-secondary) 35%, transparent);
}

.bay-mech-item--active {
  border-color: var(--mud-palette-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
}

@media (max-width: 600px) {
  .bay-mech-strip > .bay-mech-item {
    width: 12rem;
  }
}
