

* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  margin: 0;
  padding: 16px;
  background: #050505;       /* flat dark background */
  color: #f5f5f5;
}

h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.subtle {
  font-size: 12px;
  color: #a1a1aa;
}

.layout {
  display: flex;
  gap: 16px;
  width: 100%;
  margin-top: 12px;
}


#grid {
  display: grid;
  grid-template-columns: 110px repeat(6, 100px);
  border: 1px solid #333333;
  background: #111111;        /* grid lines */
  gap: 1px;                   /* “lines” between cells */
}

/* Header + row labels */

.header-cell,
.row-label {
  background: #111111;
  color: #e4e4e7;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 6px;
  text-align: center;
  border: none;
}

.row-label {
  text-align: left;
  padding-left: 8px;
  letter-spacing: 0.06em;
  color: #a1a1aa;
}

/* Card tiles */

.card-cell {
  background: #181818;
  border: 1px solid #333333;
  color: #f5f5f5;
  height: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.08s ease, opacity 0.08s ease;
}

.card-cell.empty {
  background: #050505;
  border-color: #222222;
  color: #52525b;
  cursor: default;
}

.card-cell:not(.empty):hover .card-name {
  text-decoration: underline;
}

/* States */

.card-cell.selected {
  border-color: #ffffff;         
  background: #17481a;
}

.card-cell.viable:not(.selected) {
  border-color: #888888;          
}

.card-cell.dead {
  opacity: 0.25;
}

.card-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border: 1px solid #333333;
  margin-bottom: 4px;
}

.card-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.card-traits {
  font-size: 10px;
  color: #a1a1aa;
}

.panel {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  background: #111111;
  border: 1px solid #333333;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section {
  border-top: 1px solid #262626;
  padding-top: 8px;
  margin-top: 6px;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin: 0 4px 4px 0;
  font-size: 10px;
  border: 1px solid #3f3f46;
  background: #050505;
}

.pill.good {
  border-color: #22c55e;
  color: #bbf7d0;
}

.pill.almost {
  border-color: #eab308;
  color: #fef3c7;
}

/* Misc text */

.muted {
  color: #71717a;
}

/* Legend */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-box {
  width: 10px;
  height: 10px;
  border: 1px solid #3f3f46;
  background: #181818;
}

.legend-box.selected {
  border-color: #ffffff;
  background: #17481a;
}

.legend-box.viable {
  border-color: #888888;
}

.legend-box.dead {
  opacity: 0.25;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -8px;
  margin-bottom: 4px;
  gap: 8px;
}

.reset-button {
  font-size: 11px;
  border: 1px solid #444444;
  background: #101010;
  color: #f5f5f5;
  cursor: pointer;
}

.reset-button:hover {
  background: #181818;
}
