/* Shared control finish for the archive and the game placement preview. */
:is(.bc-app, .placement-demo) {
  color-scheme: dark;
  --control-edge: #506676;
  --control-ink: #dce7e9;
  --control-gold: #e8c88b;
  --control-surface: #1b2b37;
}
:is(.bc-app, .placement-demo) :is(button, input, select, summary, a) {
  -webkit-tap-highlight-color: #e8c88b25;
}
:is(.bc-app, .placement-demo) :is(button, input, select, summary, a):focus-visible {
  outline: 2px solid var(--control-gold);
  outline-offset: 3px;
}
:is(.bc-app, .placement-demo) button:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}
:is(.bc-app, .placement-demo) select {
  appearance: none;
  -webkit-appearance: none;
  color: var(--control-ink);
  background-color: var(--control-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d9bf8a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), linear-gradient(135deg, #233642, #172630);
  background-position: right 13px center, center;
  background-size: 12px 8px, cover;
  background-repeat: no-repeat;
  border: 1px solid var(--control-edge);
  border-radius: 3px;
  padding-right: 34px;
  cursor: pointer;
  box-shadow: inset 0 1px #9cb2bd12, 0 2px 5px #0002;
  transition: border-color .16s, box-shadow .16s;
  text-overflow: ellipsis;
}
:is(.bc-app, .placement-demo) select:hover:not(:disabled) {
  border-color: #a38f6c;
  box-shadow: inset 0 1px #b8c8cf1c, 0 3px 9px #0003;
}
:is(.bc-app, .placement-demo) select option {
  background: #1b2b37;
  color: #e0e8eb;
  padding: 9px;
}
:is(.bc-app, .placement-demo) select:disabled { cursor: default; opacity: .45; }
.bc-app .select-chevron { display: none; }
.bc-app .filter-label select,
.bc-app .archive-toolbar select {
  height: 44px;
  padding-right: 34px;
  border-radius: 3px;
}
.bc-app .archive-toolbar > .filter-label { min-width: 0; }
.bc-app .archive-toolbar { align-items: end; }
.bc-app .control-label {
  display: block;
  margin: 0 0 7px;
  color: #a6bbc7;
  font: 9px/1.4 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.bc-app .search-box {
  min-height: 44px;
  border-radius: 3px;
  border-color: var(--control-edge);
  background: linear-gradient(135deg, #1d2e3a, #162530);
  transition: border-color .16s, box-shadow .16s;
}
.bc-app .search-box:focus-within {
  border-color: var(--control-gold);
  box-shadow: 0 0 0 2px #e8c88b13;
}
.bc-app .search-box input { color: #e0e8eb; min-height: 42px; }
.bc-app .search-box input::placeholder { color: #a0b4c1; }
.bc-app :is(.button, .text-button, .icon-button, .category-tab) {
  min-height: 42px;
  border-radius: 3px;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s;
}
.bc-app :is(.button, .category-tab) {
  box-shadow: inset 0 1px #adbfca0d, 0 2px 4px #0002;
}
.bc-app .button:not(.primary) { background: linear-gradient(135deg, #243542, #1a2935); }
.bc-app .button:not(.primary):hover:not(:disabled) {
  border-color: #a9926e;
  background: linear-gradient(135deg, #2b3d49, #24323c);
}
.bc-app .button.primary {
  background: linear-gradient(135deg, #e8c990, #caa467);
  border-color: #efcf93;
  box-shadow: inset 0 1px #fff4cf66, 0 3px 8px #0003;
}
.bc-app .button.primary:hover:not(:disabled) { background: linear-gradient(135deg, #f2dbad, #dfba7b); }
.bc-app .text-button { padding: 8px 11px; color: #c9d8df!important; }
.bc-app .text-button:hover:not(:disabled) { background: #e8c88b09; color: #f2d8a4!important; }
.bc-app .icon-button { width: 42px; min-width: 42px; height: 42px; }
.bc-app .category-tab { color: #becdd4!important; }
.bc-app .category-tab.active {
  background: linear-gradient(135deg, #3b3d35, #26333b);
  border-color: #c3a26d;
  color: #efdaa9!important;
  box-shadow: inset 0 -2px #d6b782;
}
.bc-app .nav-tab { min-height: 44px; }
.bc-app :is(.button, .text-button, .icon-button, .category-tab):active:not(:disabled) { box-shadow: inset 0 2px 5px #0004; }
:is(.bc-app, .placement-demo) summary {
  cursor: pointer;
  list-style-position: inside;
  border-radius: 2px;
}
:is(.bc-app, .placement-demo) summary::marker { color: var(--control-gold); }
.bc-app .record-dialog {
  border-color: var(--collection-accent, #bda879);
  border-top-width: 2px;
  border-radius: 3px;
}
.bc-app .record-dialog .reader-art-panel { border-right: 1px solid var(--collection-accent, #506676); }
.bc-app .record-dialog .reader-sector img { width: 21px; height: 21px; object-fit: contain; }
.bc-app .manual-hero {
  background: linear-gradient(90deg, #14222cf7 0%, #14222cec 44%, #14222c99 78%), url('assets/cards/bc-11.webp') center 43% / cover;
  border-bottom-color: #557c83;
}
.bc-app .dispatch-hero {
  background: linear-gradient(90deg, #17232ef7 0%, #17232eee 48%, #17232c94 84%), url('assets/cards/bc-19.webp') center 41% / cover;
  border-bottom-color: #7d625a;
}
.placement-demo :is(.game-button, .preview-button, .close-button, .later-button) {
  border-radius: 3px;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s;
}
.placement-demo .preview-button { min-height: 42px; }
.placement-demo .close-button { min-width: 36px; min-height: 36px; }
.placement-demo .later-button { min-height: 36px; padding: 8px; }
.placement-demo .game-button:not(.hud-archive) { min-height: 36px; }
.placement-demo :is(.window-toolbar, .filter-toolbar) select {
  padding-right: 30px;
  background-position: right 10px center, center;
}
.placement-demo :is(.window-toolbar, .filter-toolbar) input {
  border-radius: 3px;
  color: #e0e8eb;
}
.placement-demo .overlay-legend summary { min-height: 36px; display: flex; align-items: center; }
.placement-demo :is(.preview-button, .later-button):hover { color: #eddaa9; background-color: #2a3b47; }
.placement-demo .reader-footer .game-button { min-width: 36px; }
@media (max-width: 680px) {
  .bc-app .archive-toolbar select { font-size: 16px; padding-left: 10px; padding-right: 30px; background-position: right 10px center, center; }
  .bc-app .record-dialog { border-radius: 0; }
  .bc-app .record-dialog .reader-art-panel { border-right: 0; border-bottom: 1px solid var(--collection-accent, #506676); }
  .bc-app .reader-footer { flex-wrap: wrap; gap: 10px; }
  .bc-app .reader-navigation { margin-left: auto; }
  .placement-demo :is(.window-toolbar, .filter-toolbar) select { min-height: 38px; }
  .placement-demo .game-button:not(.hud-archive) { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.bc-app, .placement-demo) :is(button, input, select, summary, a) { transition: none; }
}

/* Collectible print links share the archive's control finish. */
.nav-short-label { display: none; }
.bc-app .hero-foundry-link {
  background: transparent; color: #efd7a4; border: 0; border-bottom: 1px solid #9b875b;
  padding: 6px 0; min-height: 32px; cursor: pointer; white-space: nowrap; font: 11px var(--sans);
}
.bc-app .hero-foundry-link:hover { color: #f6e8c9; border-bottom-color: #c4b6e7; }
.bc-app :is(.archive-print-link, .related-print-link) {
  display: block; width: 100%; min-height: 42px; padding: 10px 16px; text-align: left;
  border: 1px solid #536272; border-radius: 3px; color: #cfc5e5; cursor: pointer;
  background: linear-gradient(115deg, #1e2a36, #27293b); font: 11px/1.5 var(--sans);
  transition: border-color .16s, background .16s; overflow-wrap: anywhere;
}
.bc-app .archive-print-link { border-width: 1px 0 0; border-radius: 0; }
.bc-app :is(.archive-print-link, .related-print-link):hover { border-color: #c2aadc; background: #313343; color: #f0ddfb; }
.bc-app .reader-print-button { font-size: 11px!important; padding: 9px 11px; }
@media (max-width: 680px) {
  .bc-app .nav-inner { gap: 14px; }
  .bc-app .nav-tab { white-space: nowrap; }
  .bc-app .nav-full-label { display: none; }
  .bc-app .nav-short-label { display: inline; }
  .bc-app .tab-number { display: none; }
  .bc-app .hero-foundry-link { font-size: 10px; }
  .bc-app .hero-bottom { gap: 8px; }
  .bc-app .reader-footer { gap: 8px; }
}
@media (max-width: 380px) {
  .bc-app .nav-inner { gap: 12px; }
  .bc-app .nav-tab { font-size: 11px!important; }
}
