:root {
  --bg: #0b0e13;
  --panel: #121723;
  --panel2: #161c2c;
  --text: #e6e9ef;
  --muted: #8b92a6;
  --good: #00ff9c;
  --watch: #ffb347;
  --bad: #ff4c4c;
}

* { box-sizing: border-box; }
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#characterBar + main {
  margin-top: 8px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(#0b0e13, #0b0e13cc);
  border-bottom: 1px solid #1f2435;
  padding: 12px;
}

input, select, textarea, button {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid #2a3048;
  border-radius: 8px;
  padding: 6px 8px;
}

button { cursor: pointer; }

button:hover {
  background: #1c2340;
}

main {
  display: grid;
  grid-template-columns: 1fr 460px;
}

#grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 12px;
align-items: start;
}

.card {
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
height: auto;
align-self: start;
}

.thumb {
  width: 100%;
  height: 210px;        /* <-- ensures it fills */
  object-fit: contain;    /* <-- crop nicely */
  display: block;
  background: #000;
}

.card:hover {
  transform: translateY(-2px);
}

.meta {
  padding: 8px;
  font-size: 13px;
}

.good { outline: 2px solid var(--good); }
.watch { outline: 2px solid var(--watch); }
.bad { outline: 2px solid var(--bad); }

#inspector h2 {
  position: sticky;
  top: 0;
  background: var(--panel2);
  padding-bottom: 8px;
  margin-top: 0;
  z-index: 1;
}

pre {
  background: #0b0e13;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
}
#charGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
}

.charTile {
  background: #0b0e13;
  border: 1px solid #232a43;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}

.charTile:hover { background: #121723; }

.charName {
  font-size: 12px;
  color: var(--text);
  opacity: .95;
}

.charCount {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.charEmpty {
  opacity: .45;
}

.charFull {
  border-color: rgba(0,255,156,.35);
}
#characterBar {
  position: sticky;
  top: 86px; /* header height */
  z-index: 4;
  background: linear-gradient(#0b0e13, #0b0e13ee);
  border-bottom: 1px solid #1f2435;
  padding: 10px 14px;
}
.card.unminted {
  opacity: 0.35;
  border: 1px dashed #3a415f;
}

.card.unminted .badge::after {
  content: " · UNMINTED";
  color: #8b92a6;
  font-weight: normal;
}
