:root {
  --rs-accent: #c8372d;
}

.brand-accent {
  color: var(--rs-accent);
}

.stat-card .display-6 {
  font-variant-numeric: tabular-nums;
}

.table td,
.table th {
  vertical-align: middle;
}

.field-validation-error {
  display: block;
  margin-top: .25rem;
  font-size: .875em;
  color: var(--bs-form-invalid-color);
}

.input-validation-error {
  border-color: var(--bs-form-invalid-border-color);
}

/* Platform palette preview */
.swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: .25rem;
  border: 1px solid rgba(0, 0, 0, .15);
  vertical-align: -.15em;
}

.swatch-empty {
  background: repeating-linear-gradient(45deg, #fff, #fff 3px, #dee2e6 3px, #dee2e6 6px);
}

/* Platform illustrations: the console on a light stage, as on the site's tiles. */
.platform-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 12px;
  border-radius: .5rem;
  background: linear-gradient(180deg, #f6f2ea, #ece5d8);
  border: 1px solid var(--bs-border-color);
}
.platform-art img { max-width: 100%; max-height: 100%; }

.platform-thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 32px;
  border-radius: .35rem;
  background: #f3efe7;
  border: 1px solid var(--bs-border-color);
}
.platform-thumb img { max-width: 40px; max-height: 28px; }

/* A collector's avatar in the profile card */
.avatar-lg { width: 72px; height: 72px; flex: none; border-radius: 14px; object-fit: cover; background: #e9e2d6; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); image-rendering: auto; }

/* A cabinet's photo on the Shelves tab. */
.cabinet-photo { display: block; width: 180px; max-height: 180px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

/* A copy's files on its edit page. */
.copy-file-thumb { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #efe9de; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); font-weight: 700; font-size: 12px; color: #8a2a22; text-decoration: none; }

/* A game's gallery in the admin: the picture as it is, pixel art kept sharp. */
.game-image-thumb { display: grid; place-items: center; height: 180px; overflow: hidden; border-bottom: 1px solid rgba(0, 0, 0, .08); background: #1c1914; }
.game-image-thumb img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }

/* Box art: the release's faces side by side at one height, as they meet on the box. */
.box-art-cell { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.box-art-cell img { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.box-art-face { display: grid; place-items: center; height: 340px; padding: 10px; background: #1c1914; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.box-art-face img { max-width: 100%; max-height: 100%; }
.box-art-face.empty { color: rgba(255, 255, 255, .45); font-size: .875rem; }

/* The AI proposal: a picture is a card you tick. */
.ai-pick { cursor: pointer; }
.ai-pick:has(input[type=checkbox]:checked) { box-shadow: 0 0 0 2px var(--bs-primary); }
.ai-compare th { font-weight: 600; }
/* "Fill with AI" waits for an answer (up to a few minutes). */
.ai-generate button[disabled] { cursor: progress; }

/* Money: a bar of the monthly sums. */
.money-bar { height: 10px; border-radius: 3px; background: var(--bs-primary); opacity: .75; }

/* Decorations: objects on a shelf-coloured backdrop, as they stand on the site. */
.decor-thumb { display: grid; place-items: center; height: 160px; padding: 12px; background: linear-gradient(#3a2a1c, #2a1d12); border-bottom: 1px solid rgba(0, 0, 0, .08); }
.decor-thumb img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.decor-thumb-sm { width: 32px; height: 32px; object-fit: contain; padding: 2px; border-radius: 4px; background: #2a1d12; image-rendering: pixelated; }

/* Achievements: the image in a medal of its tier. */
.ach-medal { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #f6f1e7; border: 3px solid var(--ach, #c9c5bd); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.ach-medal img { width: 62%; height: 62%; object-fit: contain; image-rendering: pixelated; }
.ach-medal-lg { width: 88px; height: 88px; border-width: 5px; }
.ach-bronze { --ach: #b0703a; }
.ach-silver { --ach: #a3aab3; }
.ach-gold { --ach: #d9a521; }
.ach-platinum { --ach: #6fc3d0; }
.ach-badge { background: var(--ach); color: #fff; }
