/* Biomes catalog editor — sprite roster + inspector layout */

.bce-app {
  grid-template-columns: 272px 1fr 392px;
}

.bce-header {
  align-items: center;
}

.bce-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bce-dirty-badge {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(232, 196, 120, 0.45);
  background: rgba(56, 44, 24, 0.55);
  color: #ffe9b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.bce-roster-panel {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #2a3140;
  background: #10131a;
  overflow: hidden;
}

.bce-section-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #2a3140;
  flex-shrink: 0;
}

.bce-tab {
  flex: 1;
  padding: 9px 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8b95a8;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.bce-tab:hover {
  color: #c6cdd9;
  background: rgba(255, 255, 255, 0.03);
}

.bce-tab.is-active {
  color: #9ec0ff;
  border-bottom-color: #5b8def;
  background: rgba(91, 141, 239, 0.08);
}

.bce-roster-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px 10px 6px;
  flex-shrink: 0;
}

.bce-roster-toolbar .de-input {
  flex: 1;
  min-width: 0;
}

.bce-kind-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 10px 8px;
  flex-shrink: 0;
}

.bce-kind-filters .de-btn {
  padding: 3px 8px;
  font-size: 11px;
}

.bce-roster {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #3a4458 transparent;
}

.bce-roster-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #2a3140;
  border-radius: 8px;
  background: #131722;
  cursor: pointer;
  overflow: clip;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
  user-select: none;
  min-height: 180px;
}

.bce-roster-card:focus-visible {
  outline: 2px solid #5b8def;
  outline-offset: 1px;
}

.bce-roster-card:hover {
  border-color: #5b8def;
}

.bce-roster-card.is-selected {
  border-color: #e8c478;
  box-shadow: 0 0 0 1px rgba(232, 196, 120, 0.35);
}

.bce-roster-card__thumb {
  position: relative;
  box-sizing: border-box;
  min-height: 122px;
  background: linear-gradient(180deg, #0c0e12 0%, #161a24 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  padding: 8px 8px 10px;
}

.bce-roster-card__canvas {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

.bce-roster-card__thumb img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

.bce-roster-card__placeholder {
  color: #6b7588;
  font-size: 10px;
  text-align: center;
  padding: 8px;
  line-height: 1.3;
  text-transform: lowercase;
}

.bce-roster-card__kind {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(12, 14, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ec0ff;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bce-roster-card__kind--tree { color: #8fd4a0; }
.bce-roster-card__kind--rock { color: #b8b0ff; }

.bce-roster-card__body {
  padding: 6px 8px 8px;
  border-top: 1px solid #222938;
}

.bce-roster-card__id {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #e8eaed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bce-roster-card__meta {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #6b7588;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bce-roster-count {
  margin: 0;
  padding: 6px 10px 10px;
  color: #6b7588;
  font-size: 11px;
  flex-shrink: 0;
  border-top: 1px solid #222938;
}

.bce-land-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bce-land-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #2a3140;
  border-radius: 6px;
  background: #131722;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #e8eaed;
}

.bce-land-item:hover {
  border-color: #5b8def;
}

.bce-land-item.is-selected {
  border-color: #e8c478;
}

.bce-land-item__swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.bce-land-item__id {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
}

.bce-land-item__meta {
  font-size: 10px;
  color: #6b7588;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bce-main {
  grid-row: 2;
  grid-column: 2;
}

.bce-main .de-canvas.bce-canvas--pick {
  cursor: pointer;
}

.bce-sidebar {
  grid-row: 2;
  grid-column: 3;
}

.bce-preview-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #2a3140;
  border-radius: 6px;
  background: rgba(16, 19, 26, 0.9);
  color: #8b95a8;
  font-size: 12px;
  pointer-events: none;
  z-index: 2;
}

.bce-json {
  width: 100%;
  min-height: 200px;
  padding: 8px;
  border: 1px solid #3a4458;
  border-radius: 4px;
  background: #0f1115;
  color: #c6cdd9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  resize: vertical;
}

.bce-json:focus {
  outline: none;
  border-color: #5b8def;
}

.bce-json:disabled {
  opacity: 0.55;
}

.bce-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bce-summary__title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: #e8eaed;
}

.bce-summary__line {
  margin: 0;
  font-size: 11px;
  color: #8b95a8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#veg-slots-section[hidden] {
  display: none !important;
}

.bce-veg-slots-count {
  font-size: 11px;
  font-weight: 500;
  color: #6b7588;
  margin-left: 4px;
}

.bce-veg-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a4458 transparent;
}

.bce-veg-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px 8px;
  border: 1px solid #2a3140;
  border-radius: 8px;
  background: #131722;
  color: #9aa3b5;
  cursor: pointer;
  font: inherit;
  text-align: center;
  min-width: 0;
}

.bce-veg-slot:hover {
  border-color: #4a5568;
  background: #181d28;
  color: #c6cdd9;
}

.bce-veg-slot__thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0c0e14;
  overflow: hidden;
}

.bce-veg-slot__thumb .bce-roster-card__canvas {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.bce-veg-slot__thumb .bce-roster-card__placeholder {
  font-size: 9px;
}

.bce-veg-slot__kind {
  position: static;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
}

.bce-veg-slot__id {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #c6cdd9;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bce-splat-group {
  margin-top: 4px;
}

.bce-splat-hint {
  margin: 0 0 8px;
  font-size: 10px;
  line-height: 1.4;
  color: #6b7588;
}

.bce-splat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a4458 transparent;
}

.bce-splat-grid--channel {
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  max-height: 140px;
}

.bce-splat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 4px 6px;
  border: 1px solid #2a3140;
  border-radius: 6px;
  background: #131722;
  color: #9aa3b5;
  cursor: pointer;
  font: inherit;
  text-align: center;
  min-width: 0;
}

.bce-splat-card:hover {
  border-color: #4a5568;
  background: #181d28;
  color: #c6cdd9;
}

.bce-splat-card.is-selected {
  border-color: #5b8def;
  background: rgba(91, 141, 239, 0.12);
  color: #d8e6ff;
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.35);
}

.bce-splat-card__thumb {
  display: block;
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bce-splat-card__thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.bce-splat-card__thumb--none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #6b7588;
  background: repeating-linear-gradient(
    -45deg,
    #1a1f2a,
    #1a1f2a 4px,
    #222836 4px,
    #222836 8px
  );
}

.bce-splat-card--none.is-selected .bce-splat-card__thumb--none {
  color: #9ec0ff;
  border-color: rgba(91, 141, 239, 0.45);
}

.bce-splat-card__label {
  font-size: 9px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bce-splat-card--channel .bce-splat-card__thumb,
.bce-splat-card--channel .bce-splat-card__thumb-wrap .bce-splat-card__thumb {
  width: 36px;
  height: 36px;
}
