/* Player builds: /builds, /builds/<id> and the planner's Publish dialog (pages_builds.py,
   builds.js). Game plates only: the dark planner panel, the hex action button (tall-btn),
   the tab plates for on/off choices, and the planner's dark node card (skilltree.css
   .stree-card) for cards and dialogs, under the rose underline of the page titles. */

.bl-panel [hidden], .bl-view [hidden], .bl-dialog [hidden], .bl-cta[hidden] { display: none !important; }

/* ------------------------------------------------------------------ buttons */
.bl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border-style: solid;
  border-width: 0 15px;
  border-radius: 0;
  border-image: url("/assets/ui/game/tall-btn.png?v=6c67721c") 0 15 fill stretch;
  background: none;
  color: var(--gold-warm, #ffe6ce);
  font: 700 14px "Cinzel", Georgia, serif;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.bl-btn:hover { color: #fff6df; filter: brightness(1.12); }
.bl-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bl-btn:disabled { opacity: 0.5; cursor: default; }
/* a quiet action (Cancel, Report, Delete) wears the unselected tab plate */
.bl-btn.bl-quiet {
  padding: 0 16px;
  background: none;
  border: 0 solid transparent;
  border-image: url("/assets/ui/game/tab_unsel.png?v=7b0b5e26") 5 3 1 3 fill stretch;
  border-image-width: 5px 3px 1px 3px;
  color: #33210f;
}
.bl-btn.bl-quiet:hover { color: #1d1208; }
.bl-vote[aria-pressed="true"] {
  padding: 0 16px;
  background: none;
  border: 0 solid transparent;
  border-image: url("/assets/ui/game/tab_sel.png?v=f55e2a69") 5 3 1 3 fill stretch;
  border-image-width: 5px 3px 1px 3px;
  color: #33210f;
}

/* ------------------------------------------------------------------ catalog */
.bl-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 4px; }
.bl-cta span { color: #d8ccb2; }
.bl-panel {
  margin: 14px 0 18px;
  padding: 14px 16px 12px;
  border: 1px solid #4a3a2a;
  background: rgba(10, 7, 6, 0.9);
  color: #e8dcc0;
  font: 400 15px/1.45 "Philosopher", Georgia, serif;
}
.bl-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 0 0 12px; }
.bl-filters label { display: inline-flex; flex-direction: column; gap: 4px; font-weight: 700; color: #cdb993; max-width: 100%; }
.bl-filters select,
.bl-filters input {
  min-height: 38px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid #6b5334;
  background: #140f0c;
  color: #f3e8cc;
  font: 700 15px "Philosopher", Georgia, serif;
}
.bl-filters input { width: 7rem; }
.bl-filters select:focus, .bl-filters input:focus { outline: 1px solid var(--gold); }
.bl-sort { display: inline-flex; gap: 4px; margin-left: auto; }
.bl-sort button {
  min-height: 36px;
  padding: 0 18px;
  background: none;
  border: 0 solid transparent;
  border-image: url("/assets/ui/game/tab_unsel.png?v=7b0b5e26") 5 3 1 3 fill stretch;
  border-image-width: 5px 3px 1px 3px;
  color: #33210f;
  font: 700 14px "Cinzel", Georgia, serif;
  cursor: pointer;
}
.bl-sort button[aria-pressed="true"] { border-image-source: url("/assets/ui/game/tab_sel.png?v=f55e2a69"); }
.bl-sort button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.bl-status { min-height: 1.45em; margin: 4px 0; color: #f3e8cc; }

.bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* a card is the planner's dark node card */
.bl-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px 10px;
  border: 1px solid #6b5334;
  border-radius: 4px;
  background: rgba(8, 6, 5, 0.94);
  color: #e8dcc0;
}
.bl-name { margin: 0; font: 700 19px "Cinzel", Georgia, serif; overflow-wrap: anywhere; }
#main .bl-name { font-size: 19px; }
.bl-name a { color: var(--gold); }
.bl-name a:hover { text-decoration: underline; }
.bl-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.bl-pair .refx { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.bl-pair .refx img { width: 24px; height: 24px; object-fit: contain; }
.bl-chips { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.bl-card .bl-pair .refx { color: #f3e8cc; }
.bl-card .bl-chips .refx { color: #d8ccb2; font-weight: 400; }
.bl-meta { margin: 0; font-size: 14px; color: #b9a58c; }
.bl-excerpt { margin: 0; color: #e8dcc0; overflow-wrap: anywhere; }
/* a video guide build: one small credit line, never the main content */
.bl-src { margin: 0; font-size: 13px; color: #b9a58c; overflow-wrap: anywhere; }
.bl-src a { color: #e6c98a; }
.bl-source .bl-src { font-size: 14px; }
.bl-cardbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: auto; padding-top: 4px; }
.bl-votes { font-weight: 700; color: #f6ebcf; }
.bl-card .bl-said { margin: 0; min-height: 0; font-size: 14px; color: #9fd49a; font-weight: 700; }
.bl-card .bl-said:empty { display: none; }
.bl-empty { padding: 18px 8px; text-align: center; }
.bl-empty p { margin: 6px auto 14px; max-width: 34rem; color: #d8ccb2; }
.bl-more { display: flex; justify-content: center; margin: 14px 0 4px; }

.bl-dh,
#main .bl-dh { margin: 0 0 8px; font: 700 19px "Cinzel", Georgia, serif; color: #f6ebcf; }
.bl-dtext { margin: 0 0 8px; color: #d8ccb2; }
.bl-minelist { margin: 0; padding: 0; list-style: none; }
.bl-minelist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid #2c2219; }
.bl-minelist a { color: #f3e8cc; font-weight: 700; overflow-wrap: anywhere; }
.bl-minelist .bl-meta { color: #cdb993; }
.bl-tag {
  font: 700 12px "Cinzel", Georgia, serif; color: #33210f; padding: 1px 10px;
  background: none;
  border: 0 solid transparent;
  border-image: url("/assets/ui/game/tab_unsel.png?v=7b0b5e26") 5 3 1 3 fill stretch;
  border-image-width: 5px 3px 1px 3px;
}
.bl-tag-hidden { background: none; border-image: none; border: 1px solid #8e3a2c; color: #ffb3a6; }

/* ---------------------------------------------------------------- one build */
.bl-view .bl-status { margin: 10px 0; }
.bl-gone { padding: 14px 16px; border: 1px solid #4a3a2a; background: rgba(10, 7, 6, 0.9); }
.bl-gone p { margin: 0 0 12px; color: #f3e8cc; font-size: 17px; }
.bl-build { display: flex; flex-direction: column; gap: 12px; }
.bl-build > .bl-pairline .refx { color: #f3e8cc; }
.bl-build > .bl-pairline .bl-pair > .refx { font: 700 18px "Cinzel", Georgia, serif; color: var(--gold); }
.bl-build > .bl-pairline .refx img { width: 28px; height: 28px; }
.bl-unlisted { margin: 0; padding: 8px 12px; border: 1px solid #6b5334; background: #140f0c; color: #f3e8cc; }
.bl-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bl-facts div { padding: 6px 10px; background: #140f0c; border: 1px solid #3a2d20; }
.bl-facts dt { font-size: 13px; color: #cdb993; }
.bl-facts dd { margin: 0; font: 700 19px "Philosopher", Georgia, serif; color: #f6ebcf; font-variant-numeric: tabular-nums; }
.bl-desc {
  padding: 12px 16px;
  border: 1px solid #6b5334;
  border-radius: 4px;
  background: rgba(8, 6, 5, 0.94);
  color: #f3e8cc;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.bl-desc p { margin: 0 0 8px; }
.bl-desc p:last-child { margin: 0; }
.bl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bl-said { color: #9fd49a; font-weight: 700; }
.bl-owner { padding: 12px 16px; border: 1px solid #6b5334; background: rgba(10, 7, 6, 0.9); }
.bl-editform { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bl-treecols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bl-treecol { padding: 10px 14px; border: 1px solid #3a2d20; background: rgba(10, 7, 6, 0.9); min-width: 0; }
.bl-treecol h3 { margin: 0 0 6px; font: 700 16px "Cinzel", Georgia, serif; color: var(--gold); }
.bl-treecol h3 small { font: 400 13px "Philosopher", Georgia, serif; color: #cdb993; }
.bl-treecol ul { margin: 0; padding: 0; list-style: none; }
.bl-treecol li { padding: 3px 0; border-bottom: 1px solid #2c2219; }
.bl-treecol .refx { display: inline-flex; align-items: center; gap: 6px; color: #f3e8cc; }
.bl-treecol .refx img { width: 26px; height: 26px; object-fit: contain; }

/* ------------------------------------------------------------------ dialogs */
.bl-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px 24px 16px;
  border: 1px solid #6b5334;
  border-radius: 4px;
  background: rgba(8, 6, 5, 0.97);
  box-shadow: 0 0 0 1px #140f0c, 0 12px 40px rgba(0, 0, 0, 0.7);
  color: #e8dcc0;
  font: 400 15px/1.45 "Philosopher", Georgia, serif;
}
.bl-dialog::backdrop { background: rgba(8, 5, 4, 0.74); }
.bl-dialog .bl-dh,
#main .bl-dialog .bl-dh { color: var(--gold); font-size: 21px; text-align: center; margin-bottom: 0; }
.bl-dialog .bl-dh::after {
  content: "";
  display: block;
  width: min(315px, 80%);
  height: 28px;
  margin: -2px auto 0;
  background:
    url("/assets/ui/frames/underline_rose_mark.png?v=988f96f4") center / 108px 28px no-repeat,
    url("/assets/ui/frames/underline_rose_line.png?v=b6e1a9d4") center / 100% 28px no-repeat;
  image-rendering: pixelated;
  opacity: 0.5;
}
.bl-dialog .bl-dtext { color: #d8ccb2; }
.bl-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.bl-pubform { display: flex; flex-direction: column; gap: 10px; }
.bl-field { display: flex; flex-direction: column; gap: 4px; }
.bl-field > span { font: 700 14px "Cinzel", Georgia, serif; color: #cdb993; }
.bl-field input,
.bl-field textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #6b5334;
  background: #140f0c;
  color: #f3e8cc;
  font: 400 16px "Philosopher", Georgia, serif;
}
.bl-field textarea { resize: vertical; min-height: 96px; }
.bl-field input:focus, .bl-field textarea:focus { outline: 2px solid #b8893c; outline-offset: 0; }
.bl-left { align-self: flex-end; font-size: 13px; color: #b9a58c; }
.bl-choices { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.bl-choices legend { padding: 0; margin-bottom: 4px; font: 700 14px "Cinzel", Georgia, serif; color: #cdb993; }
.bl-choice { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; min-height: 32px; }
.bl-choice input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: #c9a45a; }
.bl-choice span { color: #e8dcc0; }
.bl-choice b { color: #f6ebcf; font-family: "Cinzel", Georgia, serif; margin-right: 4px; }
.bl-keynote { font-size: 14px; }
.bl-link { margin: 0; padding: 8px 10px; border: 1px solid #6b5334; background: #140f0c; overflow-wrap: anywhere; }
.bl-link a { color: var(--gold); font-weight: 700; }
.bl-msg { margin: 0; min-height: 1.2em; color: #ffb3a6; font-weight: 700; }
.bl-msg:empty { min-height: 0; }
.bl-dbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }

@media (max-width: 760px) {
  .bl-sort { margin-left: 0; }
  .bl-filters label { flex: 1 1 40%; }
  .bl-filters select, .bl-filters input { width: 100%; }
  .bl-grid { grid-template-columns: minmax(0, 1fr); }
  .bl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-treecols { grid-template-columns: minmax(0, 1fr); }
  .bl-dialog { padding: 16px 18px 14px; }
  .bl-btn { min-height: 42px; }
}

/* ---------------------------------- the build's character (art-ui lane, 2026-09-27)
   The game's race portrait of the build's pair (pipeline/extract_chars.py) at a whole-number
   scale, the archetype emblem faint in its corner. The box size is set on the tag, so the
   card does not move when the picture arrives. */
.bl-ava {
  position: relative;
  flex: none;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.bl-ava img {
  display: block;
  margin: auto;
  image-rendering: pixelated;
}
.bl-ava .bl-ava-face { position: absolute; inset: 0; }
.bl-ava .bl-ava-em {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 38%;
  height: 38%;
  object-fit: contain;
  image-rendering: auto;
  /* the game draws the emblem at half opacity: two unblurred shadows of its own colour fill
     the stroke, the dark ones lift it off the portrait */
  filter: drop-shadow(0 0 0 #fbf9e9) drop-shadow(0 0 0 #fbf9e9) drop-shadow(0 0 1px #000) drop-shadow(0 0 2px #000);
}
.bl-cardtop { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bl-cardtop > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bl-build > .bl-pairline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bl-minelist li { align-items: center; }
.bl-minelist .bl-ava .bl-ava-em { display: none; }
@media (max-width: 760px) {
  /* the portrait at twice its size beside the names on a phone */
  .bl-build > .bl-pairline .bl-ava { width: 92px !important; height: 92px !important; }
  .bl-build > .bl-pairline { flex-wrap: nowrap; }
}
/* the seeded character covers the portrait once it is drawn (builds.js drawLook) */
.bl-ava canvas.bl-look {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  image-rendering: pixelated;
  opacity: 0;
}
.bl-ava.bl-drawn canvas.bl-look { opacity: 1; }
.bl-ava.bl-drawn .bl-ava-face { visibility: hidden; }

/* ------------------------------ Like, and a card opened in place (art-ui lane, 2026-09-27) */
.bl-like { display: inline-flex; align-items: center; gap: 6px; }
.bl-heart {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  /* the game's heart is grey (it tints it in play): pale when not liked, red when liked */
  filter: brightness(1.35);
}
.bl-like[aria-pressed="true"] .bl-heart {
  filter: sepia(1) saturate(9) hue-rotate(-40deg) brightness(0.95) drop-shadow(0 0 3px rgba(255, 90, 70, 0.6));
}
.bl-card { cursor: pointer; }
.bl-card a, .bl-card button { cursor: pointer; }
.bl-card-open { grid-column: 1 / -1; cursor: default; }
.bl-detail {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #4a3a2a;
  cursor: default;
}
.bl-detail .bl-dh { font-size: 17px; }
.bl-detailcols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 12px;
}
.bl-detailcols h3 { margin: 0 0 6px; font: 700 15px "Cinzel", Georgia, serif; color: var(--gold); }
.bl-statlist, .bl-pieces, .bl-sets { margin: 0; padding: 0; list-style: none; }
.bl-statlist li { margin: 0 0 2px; }
.bl-pieces > li, .bl-sets > li { margin: 0 0 8px; }
.bl-pieces .bl-statlist { padding-left: 12px; color: #d8ccb2; }
.bl-slot { font-weight: 700; color: #f6ebcf; }
.bl-sets ul { margin: 2px 0 0; padding-left: 14px; }
.bl-sets .unmet { color: #8f7f68; }
.bl-sets .met { color: #ffd36a; }
.bl-build .bl-detailcols { margin-top: 4px; }
@media (max-width: 900px) {
  .bl-detailcols { grid-template-columns: minmax(0, 1fr); }
}
.bl-pieces .refx, .bl-sets .refx { display: inline-flex; align-items: center; gap: 4px; color: #f3e8cc; font-weight: 700; }
.bl-pieces .refx img, .bl-sets .refx img { width: 24px; height: 24px; object-fit: contain; }
.bl-geartot { margin-top: 12px; }

/* the private edit link box (publish dialog and the owner's part of a build page) */
.bl-editlink { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #6b5334; }
.bl-editlink[hidden] { display: none; }
.bl-editlink .bl-dtext { margin: 0; }
.bl-warn { margin: 0; color: #ffc9a8; font-size: 14px; }
.bl-editurl { width: 100%; box-sizing: border-box; padding: 6px 8px; font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; color: #f6ebcf; background: #0d0a08; border: 1px solid #6b5334; border-radius: 3px; }
.bl-mkedit-note { margin: 6px 0 0; font-size: 14px; }

/* ------------------------ Source filter and community builds (R4-BUILDS lane, 2026-09-30) */
.bl-badge {
  display: inline-block; margin-right: 6px; padding: 0 7px; border: 1px solid #6d5a3e; border-radius: 3px;
  font: 700 12px/20px "Cinzel", Georgia, serif; color: #e6c98a; background: rgba(0, 0, 0, 0.25);
  vertical-align: 1px;
}
.bl-badge-discord { border-color: #5865f2; color: #c9cdfb; }
.bl-badge-youtube { border-color: #b33a3a; color: #f3c0c0; }
.bl-partial { margin: 0; font-size: 13px; color: #cdb993; font-style: italic; }
.bl-given { margin: 0; color: #e8dcc0; overflow-wrap: anywhere; line-height: 1.7; }
.bl-ver { margin: 0; font-size: 13px; color: #b9a58c; }
.bl-outdated { margin: 0; padding: 6px 10px; border-left: 3px solid #b8863b; background: rgba(184, 134, 59, 0.1);
  font-size: 13px; color: #e8dcc0; }
.bl-outdated p { margin: 0; }
.bl-outdated ul { margin: 2px 0 0; padding-left: 18px; }
.bl-outdated li { overflow-wrap: anywhere; }
