/* In-game Layer Stack panel (owner) */
.forge-layer-stack {
  position: fixed;
  right: 12px;
  top: 96px;
  width: min(320px, 92vw);
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  z-index: 530;
  background: rgba(6, 14, 10, 0.96);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 255, 136, 0.08);
  color: #c8e6d0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
}
.forge-layer-stack[hidden] {
  display: none !important;
}
.fls-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(0, 80, 40, 0.5);
  background: linear-gradient(180deg, rgba(40, 30, 0, 0.35), transparent);
}
.fls-head strong {
  color: #e0c05a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.fls-sub {
  flex: 1;
  color: #6a8a72;
  font-size: 0.65rem;
}
.fls-x {
  border: 0;
  background: transparent;
  color: #88aa88;
  cursor: pointer;
  font-size: 0.9rem;
}
.fls-sel {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(0, 60, 30, 0.45);
  background: #050c09;
  font-size: 0.72rem;
  line-height: 1.4;
  min-height: 3.2rem;
}
.fls-sel code {
  color: #c9a227;
}
.fls-dim {
  color: #5a7a62;
}
.fls-hint {
  color: #8ab89a;
  font-style: italic;
}
.fls-list {
  overflow: auto;
  flex: 1;
  padding: 0.25rem;
}
.fls-row {
  display: grid;
  grid-template-columns: 18px 1fr auto auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: grab;
  background: #07120e;
  margin-bottom: 2px;
}
.fls-row:hover {
  border-color: #2a5a40;
}
.fls-row.is-on {
  border-color: #c9a227;
  background: #0e1c14;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.2);
}
.fls-row.is-locked {
  opacity: 0.72;
  cursor: default;
}
.fls-row.is-drag {
  opacity: 0.5;
}
.fls-grip {
  color: #3a5a48;
  font-size: 0.65rem;
}
.fls-lab {
  color: #e8ffe8;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fls-z {
  color: #c9a227;
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
}
.fls-grp {
  color: #5a7a62;
  font-size: 0.6rem;
  text-transform: uppercase;
}
.fls-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.5rem 0.55rem;
  border-top: 1px solid rgba(0, 80, 40, 0.5);
}
.fls-btn {
  border: 1px solid #2a4a38;
  background: #0c1a14;
  color: #c8e6d0;
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
}
.fls-btn-gold {
  background: linear-gradient(180deg, #e0c05a, #a88418);
  color: #1a1400;
  border-color: #c9a227;
  font-weight: 700;
}
.fls-zlab {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6a8a72;
  font-size: 0.68rem;
}
.fls-zlab input {
  width: 4rem;
  background: #050c09;
  border: 1px solid #2a4a38;
  color: #e0ffe8;
  border-radius: 4px;
  padding: 0.2rem 0.3rem;
}
.fls-link {
  margin-left: auto;
  color: #88cc99;
  font-size: 0.68rem;
}

/* Highlight selected layer targets in the live game */
.tmj-layer-highlight {
  outline: 2px dashed #c9a227 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25), 0 0 24px rgba(61, 255, 160, 0.2) !important;
}
