/* Blood-moon art with Jade Dynasty client chrome (the 2023 login skin). Contracts: docs/DESIGN.md.
   Client art lives in ../img/game/ at its exact pixel size; see the asset table for slice insets. */

:root {
  /* Client chrome, sampled from the exported textures (crimson faces, owner direction 2026-11-04). */
  --bm-rim: 150, 96, 92;
  --bm-panel-fill: rgba(34, 18, 19, 0.7);
  --bm-card: rgba(34, 17, 19, 0.84);
  --bm-menu-solid: #1d1213;
  --bm-steel-text: #e4e0dc;
  --bm-gold-label: #fbeec4;
  --bm-chrome-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.75);
  /* 2023 notice panel, closed: 70% charcoal fill, 1px silver rim inset 3-4px, corner notch top-right and
     bottom-right. A CSS layer under it (inside the rim) deepens the fill toward ink. */
  --bm-panel-frame: url("../img/game/panel-notice-closed-360x360.fc72334120d2.png") 24 fill;
  --bm-panel-frame-width: 24px;
  --bm-panel-body: linear-gradient(180deg, rgba(12, 9, 10, 0.5), rgba(12, 9, 10, 0.62)) 3px 3px / calc(100% - 6px) calc(100% - 6px) no-repeat;
  /* Featured panel (one per page: auth cards): client carousel frame, 4px steel rim inset 4px, jade
     corner ornaments, open interior. */
  --bm-feature-frame: url("../img/game/panel-frame-540x510.ef5bca6ccfdb.png") 48 64 80 64;
  --bm-feature-frame-width: 48px 64px 80px 64px;
  --bm-feature-body: linear-gradient(180deg, rgba(24, 20, 21, 0.95), rgba(14, 11, 12, 0.95)) 6px 6px / calc(100% - 12px) calc(100% - 12px) no-repeat;
  --bm-ink-950: #040404;
  --bm-ink-900: #080908;
  --bm-ink-850: #0d0d0d;
  --bm-numeral-hi: #f7dbb9;
  --bm-numeral: #eac7a5;
  --bm-gold-title: #e9cf9f;
  --bm-gold-text: #cfbda0;
  --bm-gold-active: #d9c497;
  --bm-gold-line: 201, 164, 110;
  --bm-bone: #e3ddd0;
  --bm-nav: #c0beb7;
  --bm-label: #bbad98;
  --bm-btn-ink: #2a1d12;
  --bm-blood: #842324;
  --bm-blood-deep: #551818;
  --bm-error: #e08a7a;
  --bm-success: #b9d3a8;

  --bm-display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  /* Hero title and tagline: a short-tailed J (Prata subset) over Cinzel, matching the reference glyph. */
  --bm-display-hero: "Jade Display", "Cinzel", "Cormorant Garamond", Georgia, serif;
  --bm-numerals: "Cormorant Garamond", Georgia, serif;
  --bm-ui: "Manrope", "Segoe UI", system-ui, sans-serif;

  --bm-gutter: clamp(16px, 6.97vw, 107px);
  --bm-header-height: 105px;
  --bm-subnav-height: 40px;
  /* Accent red for lines, current-item marks, and bonus text (owner direction 2026-11-04: red accents). */
  --bm-crimson: 196, 64, 62;
  --bm-crimson-text: #e8a39b;
  --bm-focus: 0 0 0 1px var(--bm-ink-950), 0 0 0 3px rgba(var(--bm-gold-line), 0.9);
}

/* Cinzel has no Cyrillic, Vietnamese, or CJK glyphs; use one complete face per language instead of mixing. */
:root:lang(ru),
:root:lang(vi) {
  --bm-display: "Cormorant Garamond", Georgia, serif;
  --bm-display-hero: "Cormorant Garamond", Georgia, serif;
}

:root:lang(zh-hans) {
  --bm-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --bm-display-hero: var(--bm-display);
  --bm-ui: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bm-ink-950);
  color-scheme: dark;
}

body.bm-site {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bm-ink-900);
  color: var(--bm-bone);
  font: 500 15px/1.6 var(--bm-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(.bm-site) a {
  color: inherit;
  text-decoration: none;
}

.bm-site :focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-site [hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bm-skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--bm-ink-950);
  color: var(--bm-gold-title);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-skip-link:focus {
  top: 16px;
}

.bm-shell {
  display: contents;
}

.bm-main {
  flex: 1 0 auto;
}

.bm-main:focus {
  outline: none;
  box-shadow: none;
}

/* ---------- Page transitions (docs/UX.md §2) ----------
   Boosted navigation runs inside a view transition: the navbar holds still while the page content cross-fades
   in about 200 ms. Browsers without the API swap instantly. Swaps of part of a page skip it (js/site.js). */

.bm-header {
  view-transition-name: bm-header;
}

::view-transition-old(root) {
  animation: 120ms cubic-bezier(0.4, 0, 1, 1) both bm-fade-out;
}

::view-transition-new(root) {
  animation: 200ms cubic-bezier(0, 0, 0.2, 1) 40ms both bm-fade-in;
}

::view-transition-group(bm-header),
::view-transition-old(bm-header),
::view-transition-new(bm-header) {
  animation-duration: 0s;
}

@keyframes bm-fade-out {
  to { opacity: 0; }
}

@keyframes bm-fade-in {
  from { opacity: 0; transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- JadeNavbar ---------- */

.bm-header {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg, rgba(8, 6, 7, 0.94) 0%, rgba(8, 6, 7, 0.72) 100%);
  box-shadow: inset 0 -1px 0 rgba(var(--bm-rim), 0.28);
  backdrop-filter: blur(6px);
}

.bm-page-hero .bm-header {
  background: linear-gradient(180deg, rgba(6, 4, 5, 0.9) 0%, rgba(6, 4, 5, 0.35) 100%);
}

/* Warm the hover and pressed chrome so state changes never wait on a download. */
.bm-site::after {
  content: url("../img/game/btn-gold-175x47-hover.fb137b58ae99.png") url("../img/game/btn-gold-175x47-down.53c40872ef00.png") url("../img/game/btn-ink-180x50-hover.28f46b4e2c92.png") url("../img/game/btn-ink-180x50-down.9266024f3941.png") url("../img/game/tab-ink-140x45-hover.dd1e11ea4c33.png") url("../img/game/tab-ink-140x45-selected.da2c362b5bc7.png") url("../img/game/check-18-checked.c90fcd531280.png");
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  z-index: -1;
}

.bm-page-hero .bm-header {
  position: absolute;
  inset: 0 0 auto;
}

.bm-header__inner {
  height: var(--bm-header-height);
  display: grid;
  grid-template-columns: clamp(190px, 17.9vw, 275px) auto 1fr auto;
  align-items: center;
  padding: 8px clamp(16px, 4.56vw, 70px) 0 clamp(16px, 6.84vw, 105px);
}

.bm-wordmark {
  justify-self: start;
  display: block;
  color: var(--bm-gold-title);
  font: 500 22px/30px var(--bm-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(2px);
}

.bm-wordmark span {
  display: block;
}

.bm-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.bm-nav__link,
.bm-header__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bm-nav);
  font: 600 13.4px/1 var(--bm-ui);
  letter-spacing: 0.095em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 160ms ease;
}

.bm-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.16em;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--bm-gold-line), 0.9) 20%, rgba(var(--bm-gold-line), 0.9) 80%, transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.bm-nav__link:hover,
.bm-nav__link:focus-visible,
.bm-header__link:hover,
.bm-header__link:focus-visible,
.bm-nav__link[aria-current="page"] {
  color: var(--bm-gold-active);
}

.bm-nav__link:hover::after,
.bm-nav__link:focus-visible::after,
.bm-nav__link[aria-current="page"]::after {
  opacity: 1;
}

.bm-nav__link:active,
.bm-header__link:active {
  transform: translateY(1px);
}

.bm-header__actions {
  grid-column: 4;
  display: flex;
  align-items: center;
  gap: 28px;
}

.bm-header__actions .bm-header__link {
  letter-spacing: 0.05em;
}

/* Reference calibration: keeps Classes on the measured 1536px grid. */
.bm-nav .bm-nav__link:nth-child(2) {
  margin-left: -1px;
}

.bm-header__actions .bm-header__cta {
  margin-left: -2px;
}

.bm-button.bm-header__cta {
  --bm-button-w: 220px;
}

.bm-header__divider {
  width: 1px;
  height: 18px;
  background: rgba(var(--bm-gold-line), 0.35);
}

.bm-header__actions form {
  margin: 0;
}

.bm-link-button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.bm-menu-toggle,
.bm-menu-panel {
  display: none;
}

/* ---------- ToolsNav: the player tools under the main navbar ---------- */

.bm-subnav {
  height: var(--bm-subnav-height);
  box-shadow: inset 0 1px 0 rgba(var(--bm-crimson), 0.22);
  background: linear-gradient(90deg, rgba(var(--bm-crimson), 0.12), rgba(var(--bm-crimson), 0.04) 45%, transparent 80%);
}

.bm-subnav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 clamp(16px, 4.56vw, 70px) 0 clamp(16px, 6.84vw, 105px);
  /* Never wider than the page: on narrow phones the strip scrolls inside itself (2026-11-21, 360px overflow). */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.bm-subnav__inner::-webkit-scrollbar {
  display: none;
}

@media (max-width: 480px) {
  .bm-subnav__inner {
    gap: 16px;
  }

  .bm-subnav__link {
    letter-spacing: 0.1em;
  }
}

.bm-subnav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  min-height: 40px;
  color: var(--bm-label);
  font: 600 11.5px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 160ms ease;
}

.bm-subnav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.14em;
  bottom: 0;
  height: 2px;
  background: rgb(var(--bm-crimson));
  opacity: 0;
  transition: opacity 160ms ease;
}

.bm-subnav__link:hover,
.bm-subnav__link:focus-visible,
.bm-subnav__link[aria-current="page"] {
  color: var(--bm-gold-active);
}

.bm-subnav__link:hover::after,
.bm-subnav__link:focus-visible::after {
  opacity: 0.55;
}

.bm-subnav__link[aria-current="page"]::after {
  opacity: 1;
}

.bm-subnav__link:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .bm-subnav__link,
  .bm-subnav__link::after {
    transition: none;
  }
}

/* NewsTicker: the rest of the ToolsNav strip after the links. The latest news (title, then subtitle) enter at the
   right edge and roll out past the left in italics, fading out towards the links. The track's left padding is the
   ticker's full width, so each pass starts off-screen on the right. */
.bm-ticker {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  margin-left: 8px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 97%, transparent 100%);
}

.bm-ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  margin: 0;
  padding: 0 0 0 100%;
  list-style: none;
  animation: bm-ticker var(--bm-ticker-duration, 40s) linear infinite;
}

.bm-ticker:hover .bm-ticker__track,
.bm-ticker:focus-within .bm-ticker__track {
  animation-play-state: paused;
}

.bm-ticker__item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.bm-ticker__item + .bm-ticker__item::before {
  content: "◆";
  margin: 0 26px;
  color: rgba(var(--bm-crimson), 0.8);
  font-size: 7px;
}

.bm-ticker__item a {
  font: italic 500 12.5px/1 var(--bm-ui);
  letter-spacing: 0.04em;
}

.bm-ticker__title {
  color: var(--bm-gold-text);
  font-weight: 700;
  transition: color 160ms ease;
}

.bm-ticker__sub {
  color: var(--bm-label);
}

.bm-ticker__sub::before {
  content: "—";
  margin: 0 10px;
  color: rgba(var(--bm-crimson), 0.9);
}

.bm-ticker__item a:hover .bm-ticker__title,
.bm-ticker__item a:focus-visible .bm-ticker__title {
  color: var(--bm-gold-active);
}

@keyframes bm-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-ticker__track {
    padding-left: 0;
    animation: none;
  }
}

/* Phones: the tool links fill the strip, so the ticker gives way; the hero carries the wipe-test notice. */
@media (max-width: 600px) {
  .bm-ticker {
    display: none;
  }
}

/* ---------- LanguageSelect ---------- */

.bm-language {
  position: relative;
  margin: 0;
}

.bm-language select {
  appearance: none;
  width: 78px;
  height: 38px;
  padding: 0 30px 0 14px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  background-color: rgba(10, 8, 9, 0.62);
  border-radius: 0;
  background: transparent;
  color: var(--bm-gold-text);
  font: 500 12px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  cursor: pointer;
}

.bm-language select:hover,
.bm-language select:focus-visible {
  color: var(--bm-gold-active);
  outline: 1px solid rgba(var(--bm-rim), 0.9);
  outline-offset: -1px;
}

.bm-language select option {
  background: var(--bm-ink-850);
  color: var(--bm-bone);
}

.bm-language::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 15px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--bm-gold-text);
  border-bottom: 1px solid var(--bm-gold-text);
  transform: rotate(45deg);
  pointer-events: none;
}

/* ---------- OrnateButton ---------- */

/* Client buttons render at their native height. Like the client, which draws one 87px button at 70-120px,
   only the plain middle stretches horizontally (a 3-slice); the bevelled ends never scale. */
.bm-button {
  --bm-button-w: 277px;
  --bm-button-h: 47px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: auto;
  min-width: min(var(--bm-button-w), 100%);
  max-width: 100%;
  height: var(--bm-button-h);
  /* border-image draws over the padding box, so padding keeps labels clear of the bitmap ends. */
  padding: 0 24px;
  white-space: nowrap;
  border: 0 solid transparent;
  border-radius: 0;
  background: transparent;
  font: 600 13px/1.2 var(--bm-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: var(--bm-chrome-shadow);
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}

.bm-button__label {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bm-button__icon {
  flex: none;
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 0 #000);
}

.bm-button:active:not([aria-disabled="true"]):not(:disabled) {
  transform: translateY(1px);
}

/* Primary: the client's gold dialog button, 175x47, ends 16px. */
.bm-button--primary {
  color: var(--bm-gold-label);
  border-image: url("../img/game/btn-gold-175x47-normal.81969046482b.png") 0 16 fill / 0 16px;
}

.bm-button--primary:hover {
  color: #fff8e0;
  border-image-source: url("../img/game/btn-gold-175x47-hover.fb137b58ae99.png");
}

.bm-button--primary:active:not(:disabled):not([aria-disabled="true"]) {
  border-image-source: url("../img/game/btn-gold-175x47-down.53c40872ef00.png");
}

.bm-button--primary:disabled,
.bm-button--primary[aria-disabled="true"] {
  color: rgba(225, 220, 205, 0.6);
  border-image-source: url("../img/game/btn-gold-175x47-disabled.26ee67890c96.png");
  cursor: not-allowed;
}

/* Mobile actions fill their container up to 358px; percentages keep grid min-content from forcing overflow. */
.bm-button--mobile {
  width: 100%;
  max-width: 358px;
}

/* Secondary and compact: the 2023 server-select confirm button, 180x50. Ends 4px and 60px (the sword
   flourish stays at native size on the right); hover lights the sword and a violet glow. */
.bm-button--secondary,
.bm-button--outline {
  --bm-button-w: 245px;
  --bm-button-h: 50px;
  /* Clears the 60px sword end; the matching left padding keeps the label centred on the button. */
  padding: 0 64px 0 56px;
  color: var(--bm-steel-text);
  font-size: 12px;
  letter-spacing: 0.16em;
  border-image: url("../img/game/btn-ink-180x50-normal.c5c9c675a3e9.png") 0 60 0 4 fill / 0 60px 0 4px;
}

.bm-button--secondary:hover,
.bm-button--outline:hover {
  color: #fff6e6;
  border-image-source: url("../img/game/btn-ink-180x50-hover.28f46b4e2c92.png");
}

.bm-button--secondary:active:not(:disabled):not([aria-disabled="true"]),
.bm-button--outline:active:not(:disabled):not([aria-disabled="true"]) {
  color: var(--bm-gold-text);
  border-image-source: url("../img/game/btn-ink-180x50-down.9266024f3941.png");
}

.bm-button--outline {
  --bm-button-w: auto;
  min-width: 180px;
  padding: 0 64px 0 24px;
  font-size: 11px;
  white-space: nowrap;
}

.bm-button--outline .bm-button__label {
  padding: 0 4px;
}

.bm-button--secondary:disabled,
.bm-button--secondary[aria-disabled="true"],
.bm-button--outline:disabled,
.bm-button--outline[aria-disabled="true"] {
  color: rgba(200, 200, 200, 0.5);
  border-image-source: url("../img/game/btn-ink-180x50-disabled.242f41135efa.png");
  cursor: not-allowed;
}

.bm-button[aria-busy="true"] .bm-button__label,
.bm-button[aria-busy="true"] .bm-button__icon {
  visibility: hidden;
}

.bm-button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -15px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 12px 0 currentColor, 24px 0 currentColor;
  animation: bm-pulse 1s ease-in-out infinite;
}

@keyframes bm-pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---------- Landing hero ---------- */

.bm-hero {
  position: relative;
  isolation: isolate;
  min-height: max(100vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: max(142px, calc(50vh - 166px)) var(--bm-gutter) 80px;
  overflow: hidden;
  background: var(--bm-ink-900);
}

.bm-hero__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.bm-hero__art img {
  display: block;
  flex: none;
  width: 1536px;
  height: 1024px;
  max-width: none;
  object-fit: none;
  /* Fade the plate's bottom and left edges into ink so no hard edge shows on tall or wide screens. */
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%), linear-gradient(90deg, transparent 0, #000 14%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%), linear-gradient(90deg, transparent 0, #000 14%);
  mask-composite: intersect;
}

.bm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--bm-ink-900) 0%, rgba(8, 9, 8, 0.6) 9%, rgba(8, 9, 8, 0) 26%),
    linear-gradient(180deg, rgba(4, 4, 4, 0.55) 0%, rgba(4, 4, 4, 0) 18%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.75) 28%, rgba(5, 5, 5, 0) 55%);
}

.bm-eyebrow {
  margin: 0;
  color: var(--bm-gold-text);
  font: 600 18.4px/1 var(--bm-ui);
  letter-spacing: 0.265em;
  text-transform: uppercase;
}

.bm-hero .bm-eyebrow {
  margin-left: 5px;
}

/* The wipe-test notice above the hero eyebrow (owner request 2026-11-24). */
.bm-hero__notice {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  margin: 0 0 22px 5px;
  padding: 8px 14px;
  border: 1px solid rgba(var(--bm-crimson), 0.55);
  background: rgba(var(--bm-crimson), 0.14);
  color: var(--bm-gold-active);
  font: italic 700 12px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-hero__notice-dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: rgb(var(--bm-crimson));
  box-shadow: 0 0 8px rgba(var(--bm-crimson), 0.9);
  transform: rotate(45deg);
}

/* ---------- CountdownDisplay ---------- */

.bm-countdown {
  display: flex;
  align-items: flex-start;
  margin: 3px 0 0;
}

.bm-countdown__days {
  width: 210px;
  text-align: center;
}

.bm-countdown__number {
  display: block;
  font: 500 202px/0.86 var(--bm-numerals);
  letter-spacing: 0.06em;
  padding-left: 0.04em;
  font-variant-numeric: lining-nums;
  color: var(--bm-numeral);
  background: linear-gradient(180deg, var(--bm-numeral-hi) 0%, var(--bm-numeral) 60%, #d9b48d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bm-countdown__label,
.bm-countdown__unit-label {
  display: block;
  font: 600 16.7px/1 var(--bm-ui);
  letter-spacing: 0.295em;
  text-transform: uppercase;
  color: var(--bm-gold-text);
}

.bm-countdown__days .bm-countdown__label {
  margin-top: 4px;
  padding-left: 0.295em;
}

.bm-countdown__rule {
  flex: none;
  width: 1px;
  height: 196px;
  margin: 28px 7px -40px 31px;
  background: linear-gradient(180deg, transparent, rgba(var(--bm-gold-line), 0.35) 12%, rgba(var(--bm-gold-line), 0.35) 88%, transparent);
}

.bm-countdown__units {
  display: flex;
  margin-top: 88px;
}

.bm-countdown__unit {
  position: relative;
  width: 118px;
  text-align: center;
}

.bm-countdown__unit + .bm-countdown__unit::before {
  content: "";
  position: absolute;
  left: 0;
  top: -6px;
  bottom: -6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(var(--bm-gold-line), 0.15) 25%, rgba(var(--bm-gold-line), 0.15) 75%, transparent);
}

.bm-countdown__unit-value {
  display: block;
  font: 500 40px/1 var(--bm-numerals);
  font-variant-numeric: lining-nums;
  color: var(--bm-numeral);
}

.bm-countdown__unit-label {
  margin-top: 11px;
  font-size: 13.9px;
  letter-spacing: 0.145em;
  color: var(--bm-label);
}

/* ---------- HeroTitle ---------- */

.bm-hero__title {
  margin: 24px 0 0 4px;
  color: var(--bm-gold-title);
  font: 500 31px/1.1 var(--bm-display-hero);
  letter-spacing: 0.149em;
  text-transform: uppercase;
}

.bm-hero__tagline {
  max-width: 480px;
  margin: 12px 0 0 4px;
  color: var(--bm-bone);
  font: 500 26.8px/31px var(--bm-display-hero);
  letter-spacing: 0.098em;
  text-transform: uppercase;
}

.bm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 28px;
}

/* ---------- SiteFooter ---------- */

.bm-footer {
  background: linear-gradient(180deg, rgba(20, 16, 17, 0.96), var(--bm-ink-950));
  box-shadow: inset 0 1px 0 rgba(var(--bm-rim), 0.3);
  color: var(--bm-label);
}

.bm-footer__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(140px, 1fr));
  gap: 40px;
  padding: 56px var(--bm-gutter) 40px;
}

.bm-footer__brand p {
  margin: 14px 0 0;
  font-size: 13px;
}

.bm-footer h2 {
  margin: 0 0 14px;
  color: var(--bm-gold-text);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bm-footer nav a {
  display: flex;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
  color: var(--bm-nav);
}

.bm-footer nav a:hover,
.bm-footer nav a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-footer__legal {
  padding: 18px var(--bm-gutter) 28px;
  border-top: 1px solid rgba(var(--bm-rim), 0.08);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---------- Content surfaces ---------- */

.bm-page {
  padding: 64px var(--bm-gutter) 96px;
}

.bm-page__head {
  max-width: 900px;
  margin-bottom: 36px;
}

.bm-page__title {
  margin: 14px 0 0;
  color: var(--bm-gold-title);
  font: 500 clamp(30px, 3.2vw, 44px)/1.15 var(--bm-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bm-page__lead {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--bm-label);
  font-size: 16px;
}

.bm-panel {
  position: relative;
  padding: 36px 40px;
  border: 0 solid transparent;
  border-image: var(--bm-panel-frame) / var(--bm-panel-frame-width);
  background: var(--bm-panel-body);
}

.bm-panel + .bm-panel {
  margin-top: 24px;
}

.bm-panel__title {
  margin: 0 0 18px;
  color: var(--bm-gold-title);
  font: 500 20px/1.3 var(--bm-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: var(--bm-chrome-shadow);
}

.bm-empty {
  margin: 0;
  color: var(--bm-label);
  font-size: 15px;
}

/* An empty panel is a centred notice under a short gold hairline, and spans the whole card grid. */
.bm-panel:has(> .bm-empty:only-child) {
  grid-column: 1 / -1;
}

.bm-panel > .bm-empty:only-child,
td.bm-empty {
  padding: 28px 0 20px;
  text-align: center;
}

.bm-panel > .bm-empty:only-child::before,
td.bm-empty::before {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, rgba(var(--bm-gold-line), 0.8), transparent);
}

.bm-rule {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: rgba(var(--bm-rim), 0.3);
}

.bm-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bm-gold-text);
  font: 500 12px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-back-link:hover,
.bm-back-link:focus-visible {
  color: var(--bm-gold-active);
}

.bm-prose {
  max-width: 760px;
  color: var(--bm-bone);
  font-size: 16px;
  line-height: 1.75;
}

.bm-prose a {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-narrow {
  max-width: 860px;
}

.bm-muted {
  margin: 0;
  color: var(--bm-label);
}

.bm-meta {
  display: block;
  margin: 0 0 16px;
  color: var(--bm-label);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.bm-entry .bm-meta {
  margin: 16px 0 0;
}

.bm-kicker {
  margin: -16px 0 32px;
  color: var(--bm-bone);
  font: 500 20px/1.4 var(--bm-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm-stack {
  display: grid;
  gap: 20px;
}

.bm-stack > .bm-panel + .bm-panel,
.bm-grid > .bm-panel + .bm-panel {
  margin-top: 0;
}

.bm-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.bm-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bm-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.bm-entry__subtitle {
  margin: -10px 0 14px;
  color: var(--bm-gold-text);
}

.bm-entry .bm-panel__title a:hover,
.bm-entry .bm-panel__title a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-clamp {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.bm-spaced {
  margin-top: 28px;
}

.bm-numbered {
  margin: 0 0 24px;
  padding: 8px 32px;
  list-style: none;
  counter-reset: bm-rule;
}

.bm-numbered > li {
  position: relative;
  padding: 18px 0 18px 56px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
  counter-increment: bm-rule;
}

.bm-numbered > li:last-child {
  border-bottom: 0;
}

.bm-numbered > li::before {
  content: counter(bm-rule, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--bm-numeral);
  font: 500 28px/1 var(--bm-numerals);
}

.bm-numbered h2 {
  margin: 0 0 6px;
  color: var(--bm-gold-title);
  font: 500 16px/1.35 var(--bm-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm-numbered p {
  margin: 0;
  color: var(--bm-bone);
}

.bm-steps {
  margin: 0;
  padding-left: 22px;
}

.bm-steps li + li {
  margin-top: 8px;
}

.bm-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bm-gold-text);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-link-list a:hover,
.bm-link-list a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.bm-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  background-color: rgba(10, 8, 9, 0.62);
  color: var(--bm-gold-text);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bm-share {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--bm-rim), 0.12);
}

.bm-share .bm-meta {
  margin: 0;
}

.bm-table-panel {
  padding: 24px 24px 12px;
}

.bm-tabs + .bm-panel,
.bm-tabs + .bm-card-grid {
  margin-top: 24px;
}

.bm-rank {
  color: var(--bm-numeral) !important;
  font: 500 20px/1 var(--bm-numerals);
}

.bm-class-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.bm-tag--inline {
  min-height: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.bm-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-online::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(var(--bm-gold-line), 0.35);
}

.bm-online.is-online {
  color: var(--bm-success);
}

.bm-online.is-online::before {
  background: var(--bm-success);
}

.bm-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-card-grid > .bm-panel + .bm-panel {
  margin-top: 0;
}

.bm-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-kicker--small {
  font-size: 15px;
}

.bm-kicker a {
  color: var(--bm-gold-active);
}

/* ---------- FormField ---------- */

.bm-form {
  display: grid;
  gap: 20px;
}

.bm-field {
  display: grid;
  gap: 8px;
}

.bm-field label,
.bm-field legend {
  color: var(--bm-gold-text);
  font: 500 12px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-field input:not([type="checkbox"]):not([type="radio"]),
.bm-field select,
.bm-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  background-color: rgba(10, 8, 9, 0.62);
  border-radius: 0;
  background: transparent;
  color: var(--bm-bone);
  font: 500 15px/1.4 var(--bm-ui);
}

.bm-field textarea {
  min-height: 140px;
  resize: vertical;
}

.bm-field select {
  appearance: none;
  padding-right: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23cfbda0' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 16px center;
}

.bm-field select option {
  background: var(--bm-menu-solid);
  color: var(--bm-bone);
}

.bm-field input:hover,
.bm-field select:hover,
.bm-field textarea:hover {
  outline: 1px solid rgba(var(--bm-rim), 0.8);
  outline-offset: -1px;
}

.bm-field input:focus-visible,
.bm-field select:focus-visible,
.bm-field textarea:focus-visible {
  outline: 1px solid var(--bm-gold-active);
  outline-offset: -1px;
}

.bm-field input:disabled,
.bm-field select:disabled,
.bm-field textarea:disabled {
  opacity: 0.45;
}

.bm-field input[aria-invalid="true"],
.bm-field select[aria-invalid="true"],
.bm-field textarea[aria-invalid="true"] {
  outline: 1px solid var(--bm-error);
  outline-offset: -1px;
}

/* Client checkbox (18x18, native): an empty diamond that takes a gold tick when checked. */
.bm-field .bm-news-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.bm-news-choice input {
  flex: 0 0 auto;
}
.bm-field input[type="checkbox"],
.bm-checkbox {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  background: url("../img/game/check-18-normal.65d3bf80cb0b.png") no-repeat 0 0;
  cursor: pointer;
}

.bm-field input[type="checkbox"]:checked,
.bm-checkbox:checked {
  background-image: url("../img/game/check-18-checked.c90fcd531280.png");
}

.bm-field input[type="checkbox"]:hover,
.bm-checkbox:hover {
  filter: brightness(1.35);
}

.bm-field input[type="checkbox"]:disabled,
.bm-checkbox:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bm-field__help {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-field__error,
.bm-errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--bm-error);
  font-size: 13px;
}

/* ---------- Notice ---------- */

.bm-notice {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 2px solid rgba(var(--bm-gold-line), 0.9);
  background: var(--bm-card);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.35);
  color: var(--bm-bone);
}

.bm-notice--error {
  border-left-color: var(--bm-blood);
  color: #f1d6cf;
}

.bm-notice--success {
  border-left-color: var(--bm-bone);
}

/* ---------- DataTable ---------- */

.bm-table-wrap {
  overflow-x: auto;
}

.bm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.bm-table thead tr {
  background: linear-gradient(90deg, rgba(var(--bm-rim), 0.16), rgba(var(--bm-rim), 0.04));
}

.bm-table th {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.35);
  color: var(--bm-gold-text);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.bm-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
  color: var(--bm-bone);
}

.bm-table tbody tr:hover td {
  background: rgba(var(--bm-rim), 0.12);
}

.bm-table a {
  color: var(--bm-gold-active);
}

/* ---------- RuneTab and Pagination ---------- */

.bm-tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
  scrollbar-width: none;
}

.bm-tabs {
  gap: 8px;
  padding-bottom: 12px;
}

.bm-tabs .bm-nav__link,
.bm-tabs .bm-link-button {
  flex: none;
  min-height: 0;
  height: 45px;
  min-width: 140px;
  justify-content: center;
  padding: 0 22px;
  margin: 0;
  white-space: nowrap;
  border: 0 solid transparent;
  border-image: url("../img/game/tab-ink-140x45-normal.353dfd4bd60c.png") 0 64 0 6 fill / 0 64px 0 6px;
  color: var(--bm-steel-text);
  font-size: 12px;
  text-shadow: var(--bm-chrome-shadow);
}

.bm-tabs .bm-nav__link > *,
.bm-tabs .bm-nav__link {
  text-indent: 0;
}

.bm-tabs .bm-nav__link::after {
  display: none;
}

.bm-tabs .bm-nav__link:hover,
.bm-tabs .bm-link-button:hover {
  color: #fff6e6;
  border-image-source: url("../img/game/tab-ink-140x45-hover.dd1e11ea4c33.png");
}

.bm-tabs .bm-nav__link[aria-current="page"] {
  color: var(--bm-gold-title);
  border-image-source: url("../img/game/tab-ink-140x45-selected.da2c362b5bc7.png");
}

.bm-tabs .bm-nav__link[aria-current="page"]:hover {
  color: var(--bm-numeral-hi);
  border-image-source: url("../img/game/tab-ink-140x45-hover.dd1e11ea4c33.png");
}

.bm-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.bm-pagination a,
.bm-pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 140px;
  height: 45px;
  padding: 0;
  border: 0 solid transparent;
  border-image: url("../img/game/tab-ink-140x45-normal.353dfd4bd60c.png") 0 64 0 6 fill / 0 64px 0 6px;
  color: var(--bm-steel-text);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  text-shadow: var(--bm-chrome-shadow);
}

.bm-pagination a:hover {
  color: #fff6e6;
  border-image-source: url("../img/game/tab-ink-140x45-hover.dd1e11ea4c33.png");
}

.bm-pagination a:active {
  border-image-source: url("../img/game/tab-ink-140x45-selected.da2c362b5bc7.png");
}

.bm-pagination [aria-current="page"] {
  border-image: none;
  color: var(--bm-gold-title);
}

.bm-pagination .is-disabled {
  opacity: 0.45;
}

/* ---------- Landing sections ---------- */

.bm-section {
  padding: 88px var(--bm-gutter) 0;
}

.bm-section:last-of-type {
  padding-bottom: 96px;
}

.bm-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-section__head--compact {
  flex-wrap: wrap;
  row-gap: 4px;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.bm-section__head--compact .bm-panel__title {
  margin: 0;
}

.bm-section__title {
  margin: 12px 0 0;
  color: var(--bm-gold-title);
  font: 500 clamp(22px, 2.2vw, 30px)/1.25 var(--bm-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bm-section__count {
  color: var(--bm-numeral);
  font: 500 clamp(56px, 6vw, 88px)/0.85 var(--bm-numerals);
}

.bm-section__note {
  margin: 18px 0 0;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-eyebrow--small {
  font-size: 12px;
  letter-spacing: 0.22em;
}

.bm-schedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bm-schedule__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 24px;
  padding: 8px 32px 24px 0;
}

.bm-schedule__row + .bm-schedule__row {
  padding-left: 32px;
  border-left: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-schedule__row .bm-eyebrow {
  grid-column: 1 / -1;
}

.bm-schedule__date {
  color: var(--bm-bone);
  font: 500 30px/1.1 var(--bm-numerals);
}

.bm-schedule__status {
  margin: 0;
  color: var(--bm-gold-text);
  font-size: 14px;
}

.bm-roster + .bm-roster {
  margin-top: 40px;
}

.bm-roster__faction {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--bm-gold-text);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.bm-roster__faction span {
  color: var(--bm-label);
}

.bm-roster__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-roster__class {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 12px 8px 16px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.45);
  background-color: var(--bm-card);
  background: radial-gradient(circle at 50% 35%, rgba(132, 35, 36, 0.28), transparent 65%);
  text-align: center;
}

.bm-roster__class img {
  display: block;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  object-fit: contain;
}

.bm-roster__class span {
  color: var(--bm-bone);
  font: 500 13px/1.3 var(--bm-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Landing feed: PvE events | News (news and patch notes, one list) | PvP events; News is the wider, centred
   column. Narrower screens stack News first. */
.bm-feed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas: "pve news pvp";
  align-items: start;
  gap: 32px;
}

.bm-feed__pve {
  grid-area: pve;
}

.bm-feed__news {
  grid-area: news;
}

.bm-feed__pvp {
  grid-area: pvp;
}

.bm-feed .bm-list__row {
  gap: 16px;
}

/* Same header height in all three columns, with or without a View all link (its 44px hit area plus the
   header's 10px bottom padding). */
.bm-feed .bm-section__head--compact {
  min-height: 55px;
  align-items: center;
}

.bm-feed .bm-panel + .bm-panel {
  margin-top: 0;
}

.bm-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-list > li {
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
}

.bm-list > li.bm-empty {
  padding: 16px 0;
}

.bm-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 0;
}

.bm-list__row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bm-list__row strong {
  color: var(--bm-bone);
  font-weight: 600;
}

.bm-list__row small,
.bm-list__row time {
  flex: none;
  white-space: nowrap;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-list__row:hover strong,
.bm-list__row:focus-visible strong {
  color: var(--bm-gold-active);
}

.bm-status {
  color: var(--bm-gold-text) !important;
  font: 600 11px/1.4 var(--bm-ui) !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-facts {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}

.bm-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
}

.bm-facts dt {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--bm-bone);
  text-align: right;
  overflow-wrap: anywhere;
}

.bm-details {
  margin-top: 16px;
  color: var(--bm-bone);
}

.bm-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--bm-gold-text);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.bm-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ---------- Landing parity panels (docs/HOMEPAGE_COMPARISON.md, docs/DESIGN.md "Landing live panels") ---------- */

/* RealmStatus: one hairline strip closing the hero (status, players online, ticking server clock, realm line). */
.bm-realm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(var(--bm-rim), 0.18);
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-realm__items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  margin: 0 24px; /* owner 2026-11-28 */
}

.bm-realm__items > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.bm-realm__items dt,
.bm-realm--page > span {
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-realm__items dd {
  margin: 0;
  color: var(--bm-bone);
}

.bm-realm__num {
  color: var(--bm-numeral);
  font: 500 22px/1 var(--bm-numerals);
  font-variant-numeric: tabular-nums lining-nums;
}

.bm-realm abbr {
  color: var(--bm-label);
  font-size: 12px;
  text-decoration: none;
}

.bm-realm__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.bm-realm--page {
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 24px;
}

.bm-online.is-offline {
  color: var(--bm-error);
}

.bm-online.is-offline::before {
  background: var(--bm-error);
}

/* Event rows: server-time start and a live countdown, right aligned. */
.bm-when {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: none;
}

.bm-when time {
  color: var(--bm-bone) !important;
  font: 600 13px/1.2 var(--bm-ui) !important;
  font-variant-numeric: tabular-nums;
}

.bm-when small {
  font-variant-numeric: tabular-nums;
}

.bm-patch {
  display: grid;
  gap: 8px;
  padding: 6px 0 16px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-patch__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
  color: var(--bm-gold-title);
  font: 500 20px/1.2 var(--bm-display);
  letter-spacing: 0.06em;
}

.bm-patch__title time {
  color: var(--bm-label);
  font: 500 13px/1 var(--bm-ui);
  letter-spacing: 0;
}

.bm-patch__notes {
  color: var(--bm-label);
  font-size: 14px;
  line-height: 1.6;
}

/* Community videos: YouTube thumbnails (content images, not client chrome) at 16:9. */
.bm-videos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-video {
  display: grid;
  align-content: start;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.35);
  background: var(--bm-card);
}

.bm-video__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bm-ink-900);
}

.bm-video__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 160ms ease;
}

.bm-video__thumb:hover img,
.bm-video__thumb:focus-visible img {
  filter: brightness(1.12);
}

.bm-video__meta {
  display: grid;
  gap: 6px;
  padding: 14px 16px 12px;
}

.bm-video__title {
  margin: 0;
  color: var(--bm-bone);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.bm-video__title a:hover,
.bm-video__title a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-video__by {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-video__like {
  margin: 0;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-video__like button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.bm-video__like button[aria-pressed="true"] {
  color: var(--bm-gold-active);
}

.bm-videos + .bm-videos__share,
.bm-empty + .bm-videos__share {
  margin-top: 32px;
}

/* Event calendar page. */
.bm-events {
  margin-top: 24px;
}

.bm-events__details summary {
  display: grid;
  gap: 2px;
  cursor: pointer;
  list-style: none;
}

.bm-events__details summary::-webkit-details-marker {
  display: none;
}

.bm-events__details summary small {
  color: var(--bm-label);
  font-size: 12px;
  font-weight: 500;
}

.bm-events__details p {
  max-width: 64ch;
  margin: 8px 0 0;
  color: var(--bm-label);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  white-space: normal;
}

.bm-events__day + .bm-events__day::before {
  content: " · ";
  color: var(--bm-label);
}

.bm-events .bm-when {
  justify-items: start;
}

@media (max-width: 1340px) {
}

@media (max-width: 760px) {
  .bm-realm__items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    width: auto;
    margin: 0 12px;
  }

  .bm-realm__items > div {
    display: grid;
    gap: 4px;
  }

  .bm-videos {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

}

/* ---------- Dense landing (owner direction 2026-11-21: about two screens on desktop) ---------- */

/* Shorter hero: the copy column starts 125px higher than the reference (scripts/measure_landing.py HERO_SHIFT) and the
   realm strip closes it; the plate stays native size, windowed on its centre. */
.bm-hero--compact {
  min-height: 0;
  padding: 221px var(--bm-gutter) 22px;
}

.bm-hero--compact .bm-realm {
  margin-top: 34px;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0.25) 70%, rgba(5, 5, 5, 0));
}

.bm-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
  gap: 24px;
  padding: 24px var(--bm-gutter) 56px;
}

.bm-home__main,
.bm-home__side {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

.bm-home .bm-panel + .bm-panel {
  margin-top: 0;
}



.bm-panel--compact {
  padding: 24px 28px;
}

.bm-panel--compact .bm-panel__title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.bm-widget__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-widget__head .bm-back-link {
  flex: none;
}

.bm-widget__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 16px 0 2px;
  color: var(--bm-gold-title);
  font: 500 13px/1.3 var(--bm-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bm-widget__sub small {
  color: var(--bm-label);
  font: 500 11px/1.3 var(--bm-ui);
  letter-spacing: 0.04em;
  text-transform: none;
}

.bm-widget__note {
  margin: 8px 0 0;
  color: var(--bm-label);
  font-size: 12px;
  line-height: 1.5;
}

/* Tabs inside a panel: the client bamboo tab at native height, one per list. */
.bm-tabs--panel {
  gap: 6px;
  padding-bottom: 10px;
  margin: -4px 0 4px;
}

.bm-tabs--panel .bm-link-button {
  min-width: 120px;
  padding: 0 18px;
}

.bm-tabs .bm-link-button[aria-selected="true"] {
  color: var(--bm-gold-title);
  border-image-source: url("../img/game/tab-ink-140x45-selected.da2c362b5bc7.png");
}

/* A button under a tab's list (Who's online: View all). */
.bm-tabbed__action {
  display: flex;
  justify-content: center;
  margin: 12px 0 2px;
}

.bm-tabbed__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 6px 0 0;
  color: var(--bm-label);
  font-size: 12px;
}

/* Compact lists: 13px rows, 40px tall (dense: 34px, label and value on one line). */
.bm-list--compact .bm-list__row {
  min-height: 40px;
  padding: 5px 0;
  gap: 12px;
  font-size: 13.5px;
}

.bm-list--compact .bm-list__row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-list--compact .bm-status {
  font-size: 10px !important;
}

.bm-list--dense .bm-list__row {
  min-height: 34px;
  padding: 3px 0;
}

.bm-list--dense .bm-list__row small {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main-column lists in two columns on wide screens. */
@media (min-width: 1100px) {
  .bm-list--split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

.bm-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 12px 0 0;
}

.bm-stats-grid > div {
  display: grid;
  gap: 2px;
}

.bm-stats-grid dt {
  order: 2;
  color: var(--bm-label);
  font: 600 10.5px/1.3 var(--bm-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bm-stats-grid dd {
  margin: 0;
  color: var(--bm-numeral);
  font: 500 30px/1 var(--bm-numerals);
  font-variant-numeric: lining-nums tabular-nums;
}

.bm-facts--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  margin-top: 4px;
}

.bm-facts--compact > .bm-facts__wide {
  grid-column: 1 / -1;
}

.bm-facts--compact > div {
  padding: 5px 0;
}

.bm-facts--compact dt,
.bm-facts--compact dd {
  font-size: 13px;
}

.bm-videos--compact {
  gap: 16px;
  margin-top: 12px;
}

.bm-videos--compact .bm-video__meta {
  padding: 10px 12px 8px;
}

.bm-home .bm-patch {
  padding-top: 0;
}

.bm-classes--page {
  padding-top: 40px;
}

@media (max-width: 1100px) {
  .bm-home {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-home__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bm-hero--compact {
    padding: 420px 16px 16px;
  }

  .bm-hero--compact .bm-realm {
    margin-top: 28px;
    background: none;
  }

  .bm-home {
    padding: 16px 16px 40px;
    gap: 16px;
  }

  .bm-home__main,
  .bm-home__side,
  .bm-home__left {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .bm-panel--compact {
    padding: 20px 20px;
  }

  /* Videos become a swipe rail (one card and a peek of the next). */
  .bm-videos--compact {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .bm-videos--compact > li {
    scroll-snap-align: start;
  }

  /* Three tabs share a phone's width (360px included) instead of running past the panel. */
  .bm-tabbed .bm-tabs--panel {
    gap: 6px;
  }

  .bm-tabs--panel .bm-link-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 8px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

/* ---------- Landing round 3 (owner request 2026-11-21): imperial-city hero, class picker, three columns ---------- */

/* The owner's plate (1448x760, native size) sits 130px below the top so the moon clears the header; its top, left and
   bottom edges fade into ink. */
.bm-hero--picker .bm-hero__art {
  justify-content: center;
  align-items: flex-start;
  padding-top: 130px;
}

.bm-hero--picker .bm-hero__art img {
  width: 1448px;
  height: 760px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 74%, transparent 100%), linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 74%, transparent 100%), linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

.bm-hero__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (min-width: 1101px) {
  /* The copy and the picker share one cell: the copy on the left, over the picker, which spans the hero's width. */
  .bm-hero--picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .bm-hero--picker .bm-hero__copy {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    max-width: 600px;
    /* Raised to sit nearer the middle between the tools bar and the status strip (owner request 2026-11-24). */
    top: -56px;
  }

  /* The picker starts just under the tools bar and reaches the status strip. */
  .bm-hero--picker .bm-picker {
    grid-column: 1;
    grid-row: 1;
    margin-top: -72px;
  }

  .bm-hero--picker .bm-realm {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    margin-top: 0;
  }
}

/* ClassPicker (publisher roles-box pattern): the faction's column of class glyphs, the selected class's full-body art
   at its own size, its name, faction and Details link (centred), and the faction diamonds. Desktop placement is in the
   min-width 1101px block after these rules; below that the parts stack. */
.bm-picker {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 360px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
  column-gap: 20px;
  min-width: 0;
  height: 800px;
}

.bm-picker__classes-col {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

.bm-picker__factions {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  justify-content: flex-start;
  gap: 2px;
  margin-left: -8px;
}

.bm-picker__stages {
  grid-column: 2;
  grid-row: 3;
  display: grid;
  min-width: 0;
}

.bm-picker__stage {
  grid-area: 1 / 1;
  min-width: 0;
}

/* The art's window runs from the glyph column to the screen edge and from above the picker to the status strip; the
   art sits at its own size, bottom right, and the window's left edge fades out, so it never reaches the hero copy. */
.bm-picker__figure {
  position: absolute;
  top: -40px;
  right: calc(-1 * var(--bm-gutter));
  bottom: 0;
  left: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 160px), linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 160px), linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent 100%);
  mask-composite: intersect;
}

/* The art is a <picture> (right-sized AVIF cuts, class_picker.art_sources); the img stays the flex item. */
.bm-picker__figure picture {
  display: contents;
}

.bm-picker__figure img {
  display: block;
  flex: none;
  width: auto;
  height: auto;
  max-width: none;
  max-height: 100%;
}

.bm-picker__info {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  margin-top: 18px;
  min-width: 0;
}

/* A dark scrim under the text and the glyph column keeps them readable over any class art. */
.bm-picker__info::before,
.bm-picker__classes-col::before {
  content: "";
  position: absolute;
  inset: -80px -70px -70px -60px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(6, 5, 5, 0.82) 0, rgba(6, 5, 5, 0.62) 55%, rgba(6, 5, 5, 0) 100%);
  pointer-events: none;
}

.bm-picker__classes-col::before {
  inset: -40px -50px;
}

.bm-picker__title {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
}

.bm-picker__name {
  color: var(--bm-gold-title);
  font: 500 46px/1 var(--bm-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.bm-picker__faction-name {
  color: var(--bm-crimson-text);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.bm-picker__details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.6);
  background: rgba(10, 8, 9, 0.6);
  color: var(--bm-gold-text);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: box-shadow 160ms ease, color 160ms ease;
}

.bm-picker__details:hover,
.bm-picker__details:focus-visible {
  color: var(--bm-gold-active);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 1);
}

/* The new class fades in (the old one leaves at once). */
.bm-fade-enter {
  transition: opacity 220ms ease;
}

.bm-fade-from {
  opacity: 0;
}

.bm-fade-to {
  opacity: 1;
}

/* Diamonds: squares turned 45 degrees with a rim outline; their content turns back upright. */
.bm-diamond {
  display: grid;
  place-items: center;
  overflow: hidden;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.7);
  background: rgba(14, 9, 10, 0.86);
  transition: box-shadow 180ms ease, background-color 180ms ease;
}

.bm-diamond > * {
  transform: rotate(-45deg);
}

/* The class glyphs, one above the other like the publisher's box. */
.bm-picker__classes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bm-picker__class,
.bm-picker__faction {
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.bm-picker__class {
  width: 96px;
  gap: 1px;
}

/* The publisher's class glyphs (71x71, owner direction 2026-11-21), toned from their blue to the site's gold and
   crimson with CSS filters only. */
.bm-picker__glyph {
  display: block;
  width: 71px;
  height: 71px;
  filter: sepia(0.7) hue-rotate(-28deg) saturate(1.35) brightness(0.78);
  transition: filter 180ms ease;
}

.bm-picker__class-name {
  color: var(--bm-label);
  font: 600 9.5px/1.2 var(--bm-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bm-picker__class:hover .bm-picker__glyph {
  filter: sepia(0.6) hue-rotate(-28deg) saturate(1.5) brightness(1);
}

.bm-picker__class[aria-selected="true"] .bm-picker__glyph {
  filter: sepia(0.75) hue-rotate(-30deg) saturate(1.8) brightness(1.15) drop-shadow(0 0 10px rgba(196, 64, 62, 0.85));
}

.bm-picker__class[aria-selected="true"] .bm-picker__class-name {
  color: var(--bm-gold-title);
}

.bm-picker__faction {
  width: 82px;
  height: 82px;
  place-items: center;
}

.bm-diamond--faction {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(var(--bm-crimson), 0.32), rgba(14, 9, 10, 0.9) 72%);
}

.bm-diamond--faction > span {
  color: var(--bm-gold-text);
  font: 600 9.5px/1.1 var(--bm-ui);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

:root:lang(zh-hans) .bm-diamond--faction > span {
  font-size: 13px;
  letter-spacing: 0.1em;
}

.bm-picker__faction:hover .bm-diamond--faction {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.8);
}

.bm-picker__faction[aria-selected="true"] .bm-diamond--faction {
  box-shadow: inset 0 0 0 2px rgba(var(--bm-gold-line), 0.95), 0 0 18px rgba(var(--bm-crimson), 0.6);
  background: radial-gradient(circle, rgba(var(--bm-crimson), 0.6), rgba(40, 12, 14, 0.92) 75%);
}

.bm-picker__faction[aria-selected="true"] .bm-diamond--faction > span {
  color: var(--bm-gold-title);
}

.bm-picker__class:focus-visible,
.bm-picker__faction:focus-visible {
  outline: none;
}

.bm-picker__class:focus-visible .bm-picker__glyph {
  outline: 2px solid rgba(var(--bm-gold-line), 0.95);
  outline-offset: -8px;
}

.bm-picker__faction:focus-visible .bm-diamond {
  box-shadow: inset 0 0 0 2px rgba(var(--bm-gold-line), 1), 0 0 0 3px var(--bm-ink-950), 0 0 0 4px rgba(var(--bm-gold-line), 0.9);
}

/* Desktop (owner requests 2026-11-23): the glyph column against the hero's right edge, vertically centred; the class
   art, its name and Details, then the faction diamonds, centred on the right half (between the hero's middle and the
   glyph column), over the centred plate; the copy is centred vertically on the left. */
@media (min-width: 1101px) {
  .bm-hero--picker .bm-picker {
    display: block;
  }

  .bm-hero--picker .bm-picker__classes-col {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }

  /* The art and the faction row are centred on the right half, between the hero's middle and the glyph column. */
  .bm-hero--picker .bm-picker__stages {
    position: absolute;
    bottom: 140px;
    left: calc(75% - 60px);
    width: 600px;
    transform: translateX(-50%);
  }

  .bm-hero--picker .bm-picker__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bm-hero--picker .bm-picker__figure {
    position: static;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    height: 460px;
    overflow: visible;
    -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  }

  .bm-hero--picker .bm-picker__info {
    margin-top: 0;
  }

  .bm-hero--picker .bm-picker__figure img {
    max-width: 100%;
  }

  .bm-hero--picker .bm-picker__factions {
    position: absolute;
    bottom: 44px;
    left: calc(75% - 60px);
    margin: 0;
    transform: translateX(-50%);
  }
}

/* Three columns under the hero: who's online | events and news | statistics and rates. */
.bm-home--three {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(300px, 360px);
}

.bm-home--three .bm-panel {
  min-width: 0;
}

.bm-home--three .bm-tabs--panel {
  flex-wrap: wrap;
}

.bm-home--three .bm-tabs--panel .bm-link-button {
  min-width: 0;
}

.bm-home__left {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 20px;
  min-width: 0;
}

@media (max-width: 1340px) {
  .bm-home--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bm-home--three .bm-home__main {
    grid-column: 1 / -1;
    order: -1;
  }

  /* The side column holds one panel here: it keeps the column's full width (the generic 2-up rule below is for the
     old landing's several widgets). */
  .bm-home--three .bm-home__side {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Below 1101px the picker follows the copy: the art above the name, then the glyphs in rows and the factions. */
@media (max-width: 1100px) {
  .bm-hero--picker .bm-picker {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
    margin-top: 24px;
  }

  .bm-picker__stages {
    grid-column: 1;
    grid-row: 1;
  }

  .bm-picker__figure {
    position: static;
    justify-content: center;
    height: 340px;
    overflow: visible;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
  }

  .bm-picker__figure img {
    max-height: 340px;
    margin-right: 0;
  }

  .bm-picker__info {
    margin-top: 8px;
  }

  .bm-picker__classes-col {
    grid-column: 1;
    grid-row: 2;
    margin-top: 16px;
  }

  .bm-picker__classes {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
  }

  .bm-picker__class {
    width: 80px;
  }

  .bm-picker__factions {
    grid-column: 1;
    grid-row: 3;
    justify-content: center;
    margin: 4px 0 0;
  }
}

@media (max-width: 760px) {
  .bm-hero--picker .bm-hero__art {
    padding-top: 60px;
  }

  .bm-hero--picker .bm-hero__art img {
    width: 430px;
    height: 720px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 70%, transparent 100%);
  }

  /* The copy sits over the plate on phones: a fixed-height veil from the moon's bottom down to ink. */
  .bm-hero.bm-hero--picker::before {
    background:
      linear-gradient(180deg, rgba(4, 4, 4, 0.6) 0, rgba(4, 4, 4, 0) 100px, rgba(8, 9, 8, 0) 240px, rgba(8, 9, 8, 0.86) 420px, var(--bm-ink-900) 560px);
  }

  .bm-picker__figure {
    height: 280px;
  }

  .bm-picker__figure img {
    max-height: 280px;
  }

  .bm-picker__name {
    font-size: 30px;
  }

  .bm-picker__info {
    min-height: 0;
  }

  .bm-picker__faction {
    width: 72px;
    height: 72px;
  }

  .bm-diamond--faction {
    width: 50px;
    height: 50px;
  }

  .bm-diamond--faction > span {
    font-size: 8.5px;
    letter-spacing: 0.04em;
  }

  .bm-home--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-home--three .bm-home__main {
    grid-column: auto;
  }

  .bm-home--three .bm-home__left {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-fade-enter,
  .bm-diamond,
  .bm-picker__glyph,
  .bm-picker__details {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

/* The full navbar needs 1536px (seven links on the reference grid). From 1400px it drops Home, which the
   wordmark already links, and tightens; below that the menu toggle takes over. */
@media (min-width: 1400px) and (max-width: 1535px) {
  .bm-nav {
    gap: 22px;
  }

  .bm-nav .bm-nav__link:first-child {
    display: none;
  }
}

@media (max-width: 1399px) {
  :root {
    --bm-header-height: 72px;
  }

  .bm-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  .bm-wordmark {
    font-size: 18px;
    line-height: 21px;
  }

  .bm-nav,
  .bm-header__actions {
    display: none;
  }

  .bm-menu-toggle {
    grid-column: 3;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bm-gold-text);
    cursor: pointer;
  }

  .bm-menu-toggle span,
  .bm-menu-toggle span::before,
  .bm-menu-toggle span::after {
    display: block;
    width: 22px;
    height: 1px;
    background: currentColor;
    content: "";
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .bm-menu-toggle span::before {
    transform: translateY(-7px);
  }

  .bm-menu-toggle span::after {
    transform: translateY(6px);
  }

  .bm-menu-toggle[aria-expanded="true"] span {
    background: transparent;
  }

  .bm-menu-toggle[aria-expanded="true"] span::before {
    transform: translateY(0) rotate(45deg);
  }

  .bm-menu-toggle[aria-expanded="true"] span::after {
    transform: translateY(-1px) rotate(-45deg);
  }

  .bm-menu-panel.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    padding: 28px clamp(24px, 6.84vw, 105px) 32px;
    background: var(--bm-menu-solid);
    box-shadow: inset 0 -1px 0 rgba(var(--bm-rim), 0.35), 0 24px 48px rgba(0, 0, 0, 0.6);
  }

  .bm-menu-panel .bm-nav__link,
  .bm-menu-panel .bm-header__link {
    width: 100%;
    font-size: 13px;
  }

  .bm-menu-panel .bm-nav__link::after {
    right: auto;
    width: 40px;
  }

  .bm-menu-panel .bm-language select {
    width: 100%;
  }

  .bm-menu-panel .bm-menu-panel__actions {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(var(--bm-rim), 0.12);
  }

  .bm-menu-panel .bm-button--outline {
    width: 100%;
  }
}

/* Measured fallback (static/jade_dynasty/js/site.js): when the navbar does not fit at the current width and
   language (longer translations), the header steps down to the compact nav, then to the menu toggle. */
.bm-header.is-compact .bm-nav {
  gap: 22px;
}

.bm-header.is-compact .bm-nav .bm-nav__link:first-child {
  display: none;
}

/* On a wide screen the fallback menu is a dropdown under the toggle, not a full-width sheet. */
@media (min-width: 1400px) {
  .bm-header.is-menu .bm-menu-panel.is-open {
    left: auto !important;
    width: 400px;
    padding: 24px 28px 28px !important;
  }
}

.bm-header.is-menu .bm-header__inner {
  grid-template-columns: auto 1fr auto;
}

.bm-header.is-menu .bm-nav,
.bm-header.is-menu .bm-header__actions {
  display: none;
}

.bm-header.is-menu .bm-menu-toggle {
  grid-column: 3;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bm-gold-text);
  cursor: pointer;
}

.bm-header.is-menu .bm-menu-toggle span,
.bm-header.is-menu .bm-menu-toggle span::before,
.bm-header.is-menu .bm-menu-toggle span::after {
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
  content: "";
  transition: transform 160ms ease, opacity 160ms ease;
}

.bm-header.is-menu .bm-menu-toggle span::before {
  transform: translateY(-7px);
}

.bm-header.is-menu .bm-menu-toggle span::after {
  transform: translateY(6px);
}

.bm-header.is-menu .bm-menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.bm-header.is-menu .bm-menu-toggle[aria-expanded="true"] span::before {
  transform: translateY(0) rotate(45deg);
}

.bm-header.is-menu .bm-menu-toggle[aria-expanded="true"] span::after {
  transform: translateY(-1px) rotate(-45deg);
}

.bm-header.is-menu .bm-menu-panel.is-open {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 28px clamp(24px, 6.84vw, 105px) 32px;
  background: var(--bm-menu-solid);
  box-shadow: inset 0 -1px 0 rgba(var(--bm-rim), 0.35), 0 24px 48px rgba(0, 0, 0, 0.6);
}

.bm-header.is-menu .bm-menu-panel .bm-nav__link,
.bm-header.is-menu .bm-menu-panel .bm-header__link {
  width: 100%;
  font-size: 13px;
}

.bm-header.is-menu .bm-menu-panel .bm-nav__link::after {
  right: auto;
  width: 40px;
}

.bm-header.is-menu .bm-menu-panel .bm-language select {
  width: 100%;
}

.bm-header.is-menu .bm-menu-panel .bm-menu-panel__actions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--bm-rim), 0.12);
}

.bm-header.is-menu .bm-menu-panel .bm-button--outline {
  width: 100%;
}

@media (max-width: 1340px) {
  .bm-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .bm-roster__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bm-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "news news" "pve pvp";
  }

  .bm-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bm-feed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "news" "pve" "pvp";
    gap: 24px;
  }
}

@media (max-width: 760px) {
  .bm-hero {
    min-height: auto;
    justify-content: flex-start;
    padding: 420px 16px 48px;
  }

  .bm-hero__art {
    align-items: flex-start;
    justify-content: center;
  }

  .bm-hero__art img {
    width: 430px;
    height: 720px;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  }

  .bm-hero::before {
    background:
      linear-gradient(180deg, rgba(4, 4, 4, 0.6) 0%, rgba(4, 4, 4, 0) 14%),
      linear-gradient(0deg, var(--bm-ink-900) 38%, rgba(8, 9, 8, 0.82) 55%, rgba(8, 9, 8, 0) 75%);
  }

  .bm-eyebrow {
    font-size: 13px;
  }

  .bm-hero .bm-eyebrow {
    margin-left: 0;
  }

  .bm-countdown {
    flex-wrap: wrap;
    margin-top: 18px;
  }

  .bm-countdown__days {
    width: auto;
    display: flex;
    align-items: baseline;
    gap: 14px;
    text-align: left;
  }

  .bm-countdown__number {
    font-size: 104px;
  }

  .bm-countdown__days .bm-countdown__label {
    margin-top: 0;
  }

  .bm-countdown__rule {
    display: none;
  }

  .bm-countdown__units {
    width: 100%;
    margin-top: 18px;
  }

  .bm-countdown__unit {
    flex: 1;
    width: auto;
  }

  .bm-countdown__unit-value {
    font-size: 32px;
  }

  .bm-countdown__unit-label {
    margin-top: 10px;
    font-size: 11px;
  }

  .bm-hero__title {
    margin-top: 32px;
    font-size: 26px;
  }

  .bm-hero__tagline {
    font-size: 17px;
    line-height: 25px;
  }

  .bm-hero__actions {
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
  }

  .bm-hero__actions .bm-button,
  .bm-page .bm-button--primary,
  .bm-page .bm-button--secondary {
    width: 100%;
    max-width: 358px;
  }

  .bm-page {
    padding: 40px 16px 64px;
  }

  .bm-panel {
    padding: 28px 20px 24px;
  }

  .bm-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .bm-section {
    padding: 56px 16px 0;
  }

  .bm-section:last-of-type {
    padding-bottom: 64px;
  }

  .bm-section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .bm-section__head--compact {
    flex-direction: row;
    align-items: center;
  }

  .bm-schedule {
    grid-template-columns: 1fr;
  }

  .bm-schedule__row + .bm-schedule__row {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(var(--bm-rim), 0.18);
    padding-top: 20px;
  }

  .bm-roster__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .bm-callout {
    flex-direction: column;
    align-items: flex-start;
  }

  .bm-grid--2,
  .bm-grid--3,
  .bm-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-table-panel {
    padding: 16px 12px 8px;
  }

  .bm-tabs {
    gap: 22px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }

  .bm-numbered {
    padding: 4px 20px;
  }

  .bm-numbered > li {
    padding-left: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-site *,
  .bm-site *::before,
  .bm-site *::after {
    transition: none !important;
    animation: none !important;
  }
}

.bm-countdown__units dd {
  margin: 0;
}

.bm-countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bm-countdown__unit dt {
  order: 2;
}

.bm-messages {
  padding: 24px var(--bm-gutter) 0;
}

.bm-page-hero .bm-messages {
  position: absolute;
  top: calc(var(--bm-header-height) + 12px);
  left: 0;
  right: 0;
  z-index: 15;
}

/* ---------- Auth pages ---------- */

.bm-auth {
  display: grid;
  justify-items: center;
}

.bm-auth > .bm-panel {
  width: min(100%, 520px);
  padding: 56px 52px 76px;
  border-image: var(--bm-feature-frame) / var(--bm-feature-frame-width);
  background: var(--bm-feature-body);
}

.bm-auth__title {
  margin: 12px 0 10px;
  color: var(--bm-gold-title);
  font: 500 30px/1.15 var(--bm-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bm-auth .bm-form {
  margin-top: 28px;
}

.bm-mail-preference {
  grid-template-columns: minmax(0, 1fr);
}

.bm-mail-preference > .bm-panel {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.bm-auth .bm-form > .bm-button {
  margin-top: 8px;
}

.bm-auth__links {
  margin: 24px 0 0;
  color: var(--bm-label);
  font-size: 14px;
}

.bm-auth__links a {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-field__password {
  position: relative;
  display: block;
}

.bm-field__password input {
  padding-right: 76px !important;
}

.bm-field__toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  min-width: 64px;
  border: 0;
  background: transparent;
  color: var(--bm-gold-text);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  cursor: pointer;
}

.bm-field__toggle:hover,
.bm-field__toggle:focus-visible {
  color: var(--bm-gold-active);
}

.bm-field.is-invalid label {
  color: var(--bm-error);
}

.bm-notice p {
  margin: 0;
}

[x-cloak] {
  display: none !important;
}

/* ---------- Account surfaces ---------- */

.bm-page__head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.bm-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.bm-head-actions form {
  margin: 0;
}

.bm-tab-panel {
  margin-top: 28px;
}

.bm-tabs .bm-link-button {
  font: 600 13.4px/1 var(--bm-ui);
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.bm-stat {
  display: grid;
  gap: 8px;
}

.bm-stat__value {
  color: var(--bm-numeral);
  font: 500 56px/1 var(--bm-numerals);
}

.bm-notification {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
}

.bm-notification p {
  margin: 6px 0 0;
  color: var(--bm-bone);
}

.bm-notification .bm-meta {
  margin: 4px 0 0;
}

.bm-notification.is-unread strong {
  color: var(--bm-gold-active);
}

.bm-notification form {
  margin: 0;
}

.bm-inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.bm-inline-form .bm-field input {
  width: 180px;
}

@media (max-width: 760px) {
  .bm-membership {
    flex-direction: column;
    align-items: stretch;
  }

  .bm-membership .bm-tag {
    align-self: flex-start;
  }

  .bm-inline-form {
    flex-wrap: wrap;
  }

  .bm-inline-form .bm-field,
  .bm-inline-form .bm-field input {
    width: 100%;
  }

  .bm-stat__value {
    font-size: 44px;
  }
}

/* ---------- Errors, search, articles ---------- */

.bm-error {
  max-width: 720px;
  padding: 40px 0 24px;
}

.bm-error__code {
  margin: 0 0 24px;
  color: var(--bm-numeral);
  font: 500 clamp(96px, 12vw, 168px)/0.9 var(--bm-numerals);
}

.bm-header--minimal .bm-header__inner {
  grid-template-columns: 1fr;
}

.bm-search {
  max-width: 520px;
  margin: 0 0 24px;
}

.bm-article__media {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 24px;
}

/* ---------- Jade account area ----------
   One framed panel in the middle of the page with the section nav at its left (Ivan, 2026-11-25). From 1340px
   the panel is centred on the page itself (an empty column mirrors the nav's); below that the pair is centred. */

.bm-account {
  --bm-account-nav: 232px;
  --bm-account-body: linear-gradient(180deg, rgba(10, 8, 9, 0.7), rgba(10, 8, 9, 0.8)) 3px 3px / calc(100% - 6px) calc(100% - 6px) no-repeat;
  --bm-account-rule: linear-gradient(90deg, transparent, rgba(var(--bm-gold-line), 0.42));
  display: grid;
  grid-template-columns: var(--bm-account-nav) minmax(0, 880px);
  justify-content: center;
  gap: 24px;
  font-variant-numeric: lining-nums;
}


@media (min-width: 1340px) {
  .bm-account {
    --bm-account-panel: 880px;
    grid-template-columns: minmax(var(--bm-account-nav), 1fr) minmax(0, var(--bm-account-panel)) minmax(var(--bm-account-nav), 1fr);
    padding-right: 32px;
    padding-left: 32px;
  }

  .bm-account__sidebar {
    justify-self: end;
    width: var(--bm-account-nav);
  }
}

@media (min-width: 1700px) {
  .bm-account {
    --bm-account-panel: 960px;
  }
}

.bm-account__sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px 18px 36px;
  border: 0 solid transparent;
  border-image: var(--bm-panel-frame) / var(--bm-panel-frame-width);
  background: var(--bm-account-body);
}

.bm-account__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px 16px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-account__seal {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.55), inset 0 0 0 4px rgba(10, 8, 9, 0.6), inset 0 0 0 5px rgba(var(--bm-rim), 0.35);
  background: radial-gradient(circle, rgba(132, 35, 36, 0.45), transparent 75%), var(--bm-card);
  color: var(--bm-numeral-hi);
  font: 500 24px/1 var(--bm-numerals);
}

.bm-account__identity > div {
  min-width: 0;
}

.bm-account__name {
  margin: 0 0 3px;
  color: var(--bm-gold-title);
  font: 500 17px/1.2 var(--bm-display);
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

/* A group's heading runs into a hairline; a group of one link (Settings) keeps only the hairline. */
.bm-account__group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 4px 5px;
  color: var(--bm-label);
  font: 600 10.5px/1 var(--bm-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bm-account__group::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--bm-rim), 0.4), transparent);
}

.bm-account__group:has(+ .bm-account__link--solo) {
  height: 1px;
  overflow: hidden;
  gap: 0;
  color: transparent;
  font-size: 0;
}

.bm-account__link {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 8px 0 12px;
  color: var(--bm-nav);
  font-size: 14px;
}

/* A small diamond before every link: outlined, gold when hovered, filled on the current one. */
.bm-account__link::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.45);
}

.bm-account__link:hover,
.bm-account__link:focus-visible {
  color: var(--bm-gold-active);
  background: rgba(var(--bm-rim), 0.12);
}

.bm-account__link:hover::before,
.bm-account__link:focus-visible::before {
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
}

.bm-account__link[aria-current="page"] {
  color: var(--bm-gold-title);
  background: linear-gradient(90deg, rgba(var(--bm-crimson), 0.32), rgba(var(--bm-crimson), 0.06) 75%, transparent);
  box-shadow: inset 2px 0 0 rgb(var(--bm-crimson));
}

.bm-account__link[aria-current="page"]::before {
  background: var(--bm-gold-active);
  box-shadow: none;
}

/* The panel: one frame holds the section's head and all its parts. */
.bm-account__content {
  position: relative;
  min-width: 0;
  padding: 40px 44px 56px;
  border: 0 solid transparent;
  border-image: var(--bm-panel-frame) / var(--bm-panel-frame-width);
  background: var(--bm-account-body);
}

/* Centred head over a hairline with a diamond at its middle. */
.bm-account-head {
  margin: 0 0 28px;
  text-align: center;
}

.bm-account-head::after {
  content: "\25C7";
  content: "\25C7" / "";
  display: block;
  margin-top: 16px;
  background: linear-gradient(90deg, transparent, rgba(var(--bm-gold-line), 0.55) calc(50% - 18px), transparent calc(50% - 18px), transparent calc(50% + 18px), rgba(var(--bm-gold-line), 0.55) calc(50% + 18px), transparent) 50% 50% / min(100%, 560px) 1px no-repeat;
  color: rgba(var(--bm-gold-line), 0.8);
  font: 400 13px/1 var(--bm-ui);
}

.bm-account-head h1 {
  margin: 0;
  color: var(--bm-gold-title);
  font: 500 clamp(24px, 2.2vw, 32px)/1.15 var(--bm-display);
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.bm-account-head .bm-eyebrow {
  margin-bottom: 10px;
  line-height: 1.4;
}

.bm-account-head > p:not(.bm-eyebrow) {
  max-width: 600px;
  margin: 10px auto 0;
  color: var(--bm-label);
  font-size: 14px;
  text-wrap: balance;
}

/* Parts of the section: no frame of their own; a centred heading between hairlines starts each one. */
.bm-account__content .bm-panel {
  padding: 0;
  border-image: none;
  background: none;
  scroll-margin-top: 24px;
}

.bm-account__section > * + .bm-panel,
.bm-account__section > .bm-panel + *,
.bm-account__section > .bm-account-grid + * {
  margin-top: 36px;
}

.bm-account__section > .bm-account-head + .bm-panel {
  margin-top: 0;
}

.bm-account__content .bm-empty-state {
  padding: 28px 20px;
  border-image: none;
  background: none;
}

.bm-account__content .bm-panel h2,
.bm-account__content .bm-card-grid h2,
.bm-account__content article h2 {
  margin: 0 0 10px;
  color: var(--bm-gold-title);
  font: 500 16px/1.3 var(--bm-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bm-account__content .bm-panel > h2,
.bm-account__content .bm-part-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--bm-gold-title);
  font: 500 16px/1.3 var(--bm-display);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.bm-account__content .bm-panel > h2::before,
.bm-account__content .bm-panel > h2::after,
.bm-account__content .bm-part-title::before,
.bm-account__content .bm-part-title::after {
  content: "";
  flex: 1 1 0;
  min-width: 20px;
  height: 1px;
  background: var(--bm-account-rule);
}

.bm-account__content .bm-panel > h2::after,
.bm-account__content .bm-part-title::after {
  transform: scaleX(-1);
}

.bm-account__content .bm-list__row b {
  color: var(--bm-bone);
}

.bm-account__content .bm-list__row small {
  display: block;
}

.bm-account__content .bm-list__row {
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
}

/* A list item already draws the line under its row. */
.bm-account__content .bm-list > li > .bm-list__row,
.bm-account__content .bm-list > li:last-child,
.bm-account__content .bm-lazy > .bm-list__row:last-child,
.bm-account__content .bm-facts > div:last-child {
  border-bottom: 0;
}

.bm-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.bm-stat-grid > article,
.bm-day-grid > article,
.bm-item-grid > article,
.bm-achievement-grid > article,
.bm-quest-list > article,
.bm-event-list > article,
.bm-swatches > article {
  position: relative;
  padding: 22px 24px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
}

.bm-stat-grid small,
.bm-day-grid small,
.bm-pass-banner small,
.bm-referral small,
.bm-streak span {
  display: block;
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-stat-grid strong,
.bm-day-grid strong,
.bm-pass-banner strong,
.bm-streak strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--bm-numeral);
  font: 500 40px/1 var(--bm-numerals);
}

.bm-stat-grid span,
.bm-day-grid span {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-stat-grid .bm-stat-grid__code,
.bm-stat-grid .bm-stat-grid__date {
  font: 600 18px/1.3 var(--bm-ui);
  letter-spacing: 0.08em;
  color: var(--bm-gold-title);
  overflow-wrap: anywhere;
}

.bm-account__content .bm-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bm-character {
  display: flex;
  gap: 18px;
}

.bm-character__orb,
.bm-item__icon,
.bm-feature__mark,
.bm-achievement-grid article > span {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.45);
  background-color: var(--bm-card);
  background: radial-gradient(circle, rgba(132, 35, 36, 0.35), transparent 70%);
  color: var(--bm-numeral);
  font: 500 22px/1 var(--bm-numerals);
}

.bm-item__icon img {
  max-width: 40px;
  max-height: 40px;
}

.bm-character dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px 20px;
  margin: 10px 0 0;
}

.bm-character dt {
  color: var(--bm-label);
  font-size: 12px;
}

.bm-character dd {
  margin: 0;
  color: var(--bm-bone);
}

.bm-character p,
.bm-item-grid p,
.bm-achievement-grid p,
.bm-quest-list p,
.bm-event-list p {
  margin: 0;
  color: var(--bm-label);
  font-size: 14px;
}

/* Account empty states: a framed panel spanning their grid when they stand alone; plain inside a panel. */
.bm-empty-state {
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  gap: 12px;
  width: 100%;
  padding: 40px 24px;
  color: var(--bm-label);
  text-align: center;
  font-size: 15px;
  border: 0 solid transparent;
  border-image: var(--bm-panel-frame) / var(--bm-panel-frame-width);
  background: var(--bm-panel-body);
}

.bm-panel .bm-empty-state {
  padding: 28px 20px;
  border-image: none;
  background: none;
}

.bm-empty-state span {
  color: rgba(var(--bm-gold-line), 0.7);
  font-style: normal;
}

.bm-empty-state p {
  margin: 0;
}

.bm-event-list,
.bm-quest-list {
  display: grid;
  gap: 14px;
}

.bm-event-list > article,
.bm-quest-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
}

.bm-event-list small {
  color: var(--bm-gold-text);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-event-list strong,
.bm-quest-list strong {
  color: var(--bm-numeral);
  font: 500 24px/1 var(--bm-numerals);
}

.bm-progress {
  grid-column: 1 / -1;
  height: 4px;
  background: rgba(var(--bm-rim), 0.25);
}

.bm-progress span {
  display: block;
  height: 100%;
  max-width: 100%;
  background: linear-gradient(90deg, rgb(var(--bm-rim)), var(--bm-gold-text));
}

.bm-quest-list > article > strong {
  grid-row: 1;
  grid-column: 2;
}

.bm-day-grid,
.bm-item-grid,
.bm-achievement-grid,
.bm-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.bm-day-grid > article {
  text-align: center;
}

.bm-item-grid > article {
  display: grid;
  gap: 8px;
}

.bm-item-grid small {
  color: var(--bm-label);
  font-size: 12px;
}

.bm-achievement-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.bm-achievement-grid > article {
  display: flex;
  gap: 16px;
}

.bm-achievement-grid small {
  display: block;
  margin-top: 6px;
  color: var(--bm-gold-text);
  font-size: 12px;
}

.bm-streak {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}

.bm-streak strong {
  margin: 0;
  font-size: 64px;
}

.bm-streak small {
  color: var(--bm-label);
}

.bm-pass-banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.bm-referral strong {
  display: block;
  margin: 10px 0 14px;
  color: var(--bm-numeral);
  font: 500 40px/1.1 var(--bm-numerals);
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.bm-referral p {
  margin: 0;
  color: var(--bm-label);
}

.bm-feature {
  display: flex;
  align-items: center;
  gap: 24px;
}

.bm-feature > div {
  flex: 1;
}

.bm-feature p {
  margin: 0;
  color: var(--bm-label);
}

.bm-wheel {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 320px;
  width: 100%;
  border-radius: 50%;
  /* Charcoal segments with silver spokes (the panel palette), a crimson ember at the hub. */
  background:
    radial-gradient(circle, var(--bm-ink-900) 0 30%, rgba(var(--bm-rim), 0.5) 30.4%, transparent 31%),
    radial-gradient(circle, rgba(132, 35, 36, 0.35) 0 40%, transparent 70%),
    repeating-conic-gradient(from -0.4deg, rgba(var(--bm-rim), 0.45) 0 0.8deg, transparent 0.8deg 22.5deg),
    repeating-conic-gradient(from 0deg, rgba(50, 47, 46, 0.75) 0 22.5deg, rgba(22, 18, 19, 0.92) 22.5deg 45deg);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.6), 0 0 0 7px var(--bm-ink-900), 0 0 0 8px rgba(var(--bm-gold-line), 0.35), 0 0 48px rgba(132, 35, 36, 0.25);
}

.bm-wheel span {
  max-width: 30%;
  color: var(--bm-gold-title);
  font: 500 13px/1.3 var(--bm-display);
  letter-spacing: 0.12em;
  text-align: center;
}

.bm-swatches > article {
  display: grid;
  gap: 8px;
}

.bm-swatches i {
  display: block;
  height: 64px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.45);
  background-color: var(--bm-card);
}

.bm-swatches span {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-status-text {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-status-text.is-error {
  color: var(--bm-error);
}

.bm-status-text.is-success {
  color: var(--bm-success);
}

/* ---------- AccountPanel: in-place sections and skeletons (docs/DESIGN.md, docs/UX.md §2) ----------
   Sections swap inside #account-content while the sidebar holds still. A section that has not arrived after 100ms
   gives way to the skeleton of its shape (the old content stays in the grid cell, hidden, so nothing jumps). */

.bm-account__sidebar {
  view-transition-name: bm-account-nav;
}

::view-transition-group(bm-account-nav),
::view-transition-old(bm-account-nav),
::view-transition-new(bm-account-nav) {
  animation-duration: 0s;
}

.bm-account__link {
  gap: 8px;
  transition: color 150ms ease-out, background-color 150ms ease-out;
}

.bm-account__link > .bm-account__badge {
  margin-left: auto;
}

.bm-account__link:active {
  transform: translateY(1px);
}

.bm-account__badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-crimson), 0.8);
  background: rgba(var(--bm-crimson), 0.22);
  color: var(--bm-bone);
  font: 600 11px/1 var(--bm-ui);
}

.bm-account__content {
  display: grid;
}

#account-content,
.bm-account-skeleton {
  grid-area: 1 / 1;
  min-width: 0;
}

.bm-account-skeleton {
  display: none;
}

.bm-account__content.is-loading > #account-content {
  opacity: 0.55;
  transition: opacity 150ms ease-out;
}

/* A section, and a part that loads after it (overview characters, gear), fades in where its placeholder was: htmx
   marks new content htmx-added for its 20ms settle, and removing the mark runs the transition. */
.bm-account__section,
.bm-account__content .bm-lazy,
.bm-armory__gear > * {
  transition: opacity 180ms ease-out;
}

.bm-account__section.htmx-added,
.bm-account__content .bm-lazy.htmx-added,
.bm-armory__gear > .htmx-added {
  opacity: 0.3;
}

/* Overview character rows while they load: same row box as the loaded rows, so the list fills in without resizing. */
.bm-skel-line .bm-skel {
  width: 160px;
  height: 11px;
  margin: 3px 0;
}

.bm-skel-line .bm-skel--short {
  width: 100px;
}

.bm-skel-line > .bm-skel--tiny {
  width: 44px;
  margin: 0;
}

.bm-account__content.is-skeleton > #account-content {
  visibility: hidden;
}

.bm-account__content.is-skeleton > .bm-account-skeleton {
  display: block;
  animation: 150ms ease-out both bm-skel-in;
}

.bm-account__section:focus {
  outline: none;
}

.bm-account-head h1:focus {
  outline: none;
}

.bm-account-skeleton .bm-account-head .bm-skel,
.bm-account-skeleton .bm-panel > .bm-skel--title {
  margin-right: auto;
  margin-left: auto;
}

.bm-account-skeleton .bm-skel-cards + .bm-panel,
.bm-account-skeleton .bm-panel + .bm-account-grid {
  margin-top: 36px;
}

.bm-account-head > p.bm-skel-title:not(.bm-eyebrow) {
  max-width: none;
  margin: 0;
  color: var(--bm-gold-title);
  font: 500 clamp(24px, 2.2vw, 32px)/1.15 var(--bm-display);
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.bm-skel {
  display: block;
  width: 72%;
  height: 12px;
  margin: 8px 0;
  background: rgba(var(--bm-rim), 0.2);
  animation: 1.1s ease-in-out infinite alternate bm-skel-pulse;
}

.bm-skel--short { width: 38%; }
.bm-skel--eyebrow { width: 96px; height: 10px; }
.bm-skel--lead { width: min(420px, 80%); height: 14px; margin-top: 18px; }
.bm-skel--title { width: 45%; height: 16px; margin-bottom: 18px; background: rgba(var(--bm-gold-line), 0.22); }
.bm-skel--figure { width: 64px; height: 36px; }
.bm-skel--mark { flex: none; width: 52px; height: 52px; margin: 0; }
.bm-skel--input { width: 100%; height: 44px; }
.bm-skel--button { width: 220px; height: 47px; margin-top: 12px; }

.bm-skel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
}

.bm-skel-row .bm-skel {
  width: 55%;
  margin: 0;
}

.bm-skel-row .bm-skel--short {
  width: 56px;
}

.bm-skel-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.bm-skel-list {
  display: grid;
  gap: 14px;
}

.bm-skel-card,
.bm-skel-feature {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bm-skel-card {
  min-height: 110px;
  padding: 22px 24px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
}

.bm-skel-card > div,
.bm-skel-feature > div {
  flex: 1;
}

.bm-skel-field {
  margin-bottom: 20px;
}

.bm-stat-grid article .bm-skel--figure {
  margin: 12px 0;
}

@keyframes bm-skel-in {
  from { opacity: 0; }
}

@keyframes bm-skel-pulse {
  from { opacity: 0.45; }
  to { opacity: 0.9; }
}

.bm-account__content .bm-account-form,
.bm-account__content .bm-narrow {
  max-width: 640px;
  margin-right: auto;
  margin-left: auto;
}

.bm-account-form .bm-form {
  margin-top: 8px;
}

.bm-inline-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.bm-inline-notice form {
  margin: 0;
}

.bm-link-code {
  margin-top: 10px !important;
}

.bm-link-code code {
  color: var(--bm-gold-title);
  font: 600 22px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.12em;
  user-select: all;
  overflow-wrap: anywhere;
}

.bm-stat-grid__link {
  color: var(--bm-label);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: rgba(var(--bm-gold-line), 0.4);
  text-underline-offset: 3px;
}

.bm-stat-grid__link:hover,
.bm-stat-grid__link:focus-visible,
.bm-facts dd a:hover,
.bm-facts dd a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-facts dd a {
  color: var(--bm-gold-text);
  text-decoration: underline;
  text-decoration-color: rgba(var(--bm-gold-line), 0.4);
  text-underline-offset: 3px;
}

.bm-account__content .bm-list__row b,
.bm-character h2 {
  overflow-wrap: anywhere;
}

.bm-character > div {
  min-width: 0;
}

.bm-account__content .bm-list__row > strong {
  flex: none;
  white-space: nowrap;
}

.bm-account-error .bm-button {
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .bm-skel,
  .bm-account__content.is-skeleton > .bm-account-skeleton {
    animation: none;
  }

  .bm-account__link,
  .bm-account__content.is-loading > #account-content,
  .bm-account__section,
  .bm-account__content .bm-lazy,
  .bm-armory__gear > * {
    transition: none;
  }

  .bm-account__link:active {
    transform: none;
  }
}

/* ---------- Account rewards (daily calendar, wheel, achievements, codes, referrals) ---------- */

.bm-account__badge[hidden] {
  display: none;
}

.bm-day-grid {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.bm-day-grid > li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px 16px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
  text-align: center;
}

.bm-day-grid > li strong {
  margin: 0;
}

.bm-day-grid em {
  color: var(--bm-label);
  font: 600 10.5px/1.4 var(--bm-ui);
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-day-grid > li.is-claimed {
  opacity: 0.62;
}

.bm-day-grid > li.is-claimed em {
  color: var(--bm-success);
}

.bm-day-grid > li.is-today {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.9), 0 0 0 1px rgba(var(--bm-crimson), 0.5);
  background: linear-gradient(180deg, rgba(var(--bm-crimson), 0.16), transparent), var(--bm-card);
}

.bm-day-grid > li.is-today em {
  color: var(--bm-gold-active);
}

.bm-claim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 24px;
}

.bm-claim .bm-streak {
  margin: 0;
}

.bm-claim__action p {
  margin: 0 0 12px;
}

.bm-claim__done {
  color: var(--bm-success) !important;
  font-weight: 600;
}

.bm-wheel-panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.bm-wheel-panel p {
  margin: 0;
}

.bm-wheel.is-spun span {
  max-width: 40%;
  color: var(--bm-numeral-hi);
  font-size: 15px;
}

.bm-achievement-grid > article > div {
  display: grid;
  flex: 1;
  min-width: 0;
  align-content: start;
  gap: 4px;
}

.bm-achievement-grid .bm-progress {
  margin-top: 10px;
}

.bm-achievement-grid > article.is-complete {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.85);
}

.bm-achievement-grid > article.is-claimed > span {
  color: var(--bm-success);
}

.bm-achievement-grid .bm-inline-form {
  margin-top: 10px;
}

.bm-button--small {
  --bm-button-w: 150px;
}

.bm-tag--ok {
  box-shadow: inset 0 0 0 1px rgba(185, 211, 168, 0.6);
  color: var(--bm-success);
}

.bm-tag--alert {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-crimson), 0.8);
  color: var(--bm-crimson-text);
}

.bm-table__sub {
  display: block;
  margin-top: 4px;
  color: var(--bm-label);
  font-size: 12px;
  white-space: normal;
}

.bm-referral__link {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}

.bm-referral__link input {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.55);
  background: rgba(8, 6, 7, 0.75);
  color: var(--bm-bone);
  font: 500 14px/1 var(--bm-ui);
}

.bm-referral__link input:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-tag--first {
  margin-left: 8px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.9);
  color: var(--bm-numeral-hi);
  vertical-align: 2px;
}

.bm-gach a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(var(--bm-gold-line), 0.35);
  text-underline-offset: 3px;
  transition: color 150ms ease-out;
}

.bm-gach a:hover,
.bm-gach a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-gach.is-claimed b {
  color: var(--bm-label);
}

.bm-gach .bm-inline-form {
  flex: none;
}

.bm-gach > span:first-child {
  flex: 1;
  min-width: 0;
}

.bm-gach b,
.bm-gach small {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .bm-gach {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .bm-gach > span:first-child {
    flex-basis: 100%;
  }

  .bm-tag--first {
    margin: 4px 0 0;
  }
}

.bm-gach-category {
  border-bottom: 1px solid rgba(var(--bm-rim), 0.12);
}

.bm-gach-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  color: var(--bm-bone);
  cursor: pointer;
  list-style: none;
}

.bm-gach-category summary::-webkit-details-marker {
  display: none;
}

.bm-gach-category summary::before {
  content: "+";
  width: 16px;
  color: var(--bm-gold-text);
}

.bm-gach-category[open] summary::before {
  content: "−";
}

.bm-gach-category summary span {
  flex: 1;
}

.bm-gach-category summary:hover,
.bm-gach-category summary:focus-visible {
  color: var(--bm-gold-active);
}

.bm-gach-category summary small {
  color: var(--bm-label);
  font: 500 14px/1 var(--bm-numerals);
}

.bm-gach-open {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 24px;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}

.bm-gach-open li {
  display: grid;
  gap: 2px;
  color: var(--bm-bone);
  font-size: 14px;
}

.bm-gach-open small {
  color: var(--bm-label);
  font-size: 12px;
}

.bm-deliveries__date {
  display: none;
}

@media (max-width: 680px) {
  .bm-deliveries th:first-child,
  .bm-deliveries td:first-child {
    display: none;
  }

  .bm-deliveries__date {
    display: inline;
  }

  .bm-deliveries td {
    white-space: normal;
  }
}

.bm-referral p a {
  color: var(--bm-gold-text);
  text-decoration: underline;
  text-decoration-color: rgba(var(--bm-gold-line), 0.4);
  text-underline-offset: 3px;
  transition: color 150ms ease-out;
}

.bm-referral p a:hover,
.bm-referral p a:focus-visible {
  color: var(--bm-gold-active);
}

/* Badges carry screen-reader text (position: absolute): keep it inside the scrolling tab row on phones. */
.bm-account__nav {
  position: relative;
}

.bm-ready .bm-list__row a {
  color: var(--bm-bone);
}

.bm-ready .bm-list__row a:hover,
.bm-ready .bm-list__row a:focus-visible {
  color: var(--bm-gold-active);
}

@media (max-width: 1050px) {
  .bm-account {
    grid-template-columns: minmax(0, 880px);
    gap: 16px;
  }

  .bm-account__sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 32px;
    padding: 20px 22px 14px;
  }

  .bm-account__identity {
    padding: 0;
    border-bottom: 0;
  }

  .bm-account__nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 4px 18px;
    overflow-x: auto;
    border-top: 1px solid rgba(var(--bm-rim), 0.18);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    scrollbar-width: none;
  }

  .bm-account__group,
  .bm-account__link::before {
    display: none;
  }

  /* Lets the last tab scroll clear of the strip's fade-out edge. */
  .bm-account__nav::after {
    content: "";
    flex: none;
    width: 28px;
  }

  .bm-account__link {
    flex: none;
    min-height: 44px;
    padding: 0 4px;
    border-bottom: 1px solid transparent;
    white-space: nowrap;
  }

  .bm-account__link:hover,
  .bm-account__link:focus-visible {
    background: none;
  }

  .bm-account__content {
    padding: 34px 32px 48px;
  }

  .bm-account__link[aria-current="page"] {
    border-bottom-color: var(--bm-gold-active);
    background: none;
    box-shadow: none;
  }
}

@media (max-width: 760px) {
  .bm-account__sidebar {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 18px 10px;
  }

  .bm-account__content {
    padding: 28px 18px 42px;
  }
}

@media (max-width: 680px) {
  .bm-stat-grid,
  .bm-pass-banner,
  .bm-skel-cards,
  .bm-account__content .bm-card-grid {
    grid-template-columns: 1fr;
  }

  .bm-character dl {
    grid-template-columns: repeat(2, auto);
  }

  .bm-feature {
    flex-direction: column;
    align-items: flex-start;
  }
}

.bm-table-wrap:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

/* ---------- Hover completeness ---------- */

.bm-wordmark {
  transition: color 160ms ease;
}

.bm-wordmark:hover,
.bm-wordmark:focus-visible {
  color: var(--bm-numeral-hi);
}

.bm-nav__link[aria-current="page"]:hover {
  color: var(--bm-gold-title);
}

.bm-account__link[aria-current="page"]:hover {
  color: var(--bm-numeral-hi);
}

.bm-list__row {
  transition: background-color 160ms ease;
}

a.bm-list__row:hover,
a.bm-list__row:focus-visible {
  background-color: rgba(var(--bm-gold-line), 0.05);
}

.bm-auth__links a,
.bm-prose a,
.bm-kicker a {
  transition: color 160ms ease;
}

.bm-auth__links a:hover,
.bm-auth__links a:focus-visible,
.bm-prose a:hover,
.bm-prose a:focus-visible,
.bm-kicker a:hover,
.bm-kicker a:focus-visible {
  color: var(--bm-numeral-hi);
  text-decoration-thickness: 2px;
}

/* Invalid fields: outrank the base input rule (which carries two :not() selectors). */
.bm-field.is-invalid input:not([type="checkbox"]):not([type="radio"]),
.bm-field.is-invalid select,
.bm-field.is-invalid textarea {
  outline: 1px solid var(--bm-error);
  outline-offset: -1px;
}

/* Stable dimensions: every countdown state keeps the upcoming state's height, so the title never moves. */
@media (min-width: 761px) {
  .bm-countdown__days {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 194.5px;
  }
}

/* Reached and passed states show a label in place of the numeral. */
.bm-countdown__days [data-launch-label="reached"] .bm-countdown__label,
.bm-countdown__days [data-launch-label="passed"] .bm-countdown__label {
  margin-top: 0;
  padding-left: 0;
  color: var(--bm-gold-title);
  font: 500 26px/1.25 var(--bm-display-hero);
  letter-spacing: 0.1em;
}

/* ---------- Page banner (blood-moon plate window) ---------- */

.bm-page {
  position: relative;
  isolation: isolate;
  background: var(--bm-ink-900);
}

/* A native-size window of the blood-moon plate (moon and peaks) behind the page title, veiled toward the
   left for the title and faded fully into ink, so content below sits on plain ink. The window (plate rows 150-590)
   ships as its own native-pixel crop, AVIF with a WebP fallback (derive_page_banner.py). */
.bm-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 440px;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.82) 0%, rgba(8, 9, 8, 0.5) 40%, rgba(8, 9, 8, 0.25) 70%, rgba(8, 9, 8, 0.45) 100%),
    url("../img/blood-moon/hero-window-1536x440.1de5efa693fd.webp") no-repeat 50% 0 / 1536px 440px;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.82) 0%, rgba(8, 9, 8, 0.5) 40%, rgba(8, 9, 8, 0.25) 70%, rgba(8, 9, 8, 0.45) 100%),
    image-set(url("../img/blood-moon/hero-window-1536x440.02ae33709e2e.avif") type("image/avif"), url("../img/blood-moon/hero-window-1536x440.1de5efa693fd.webp") type("image/webp")) no-repeat 50% 0 / 1536px 440px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%), linear-gradient(90deg, transparent 0, #000 120px, #000 calc(100% - 120px), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%), linear-gradient(90deg, transparent 0, #000 120px, #000 calc(100% - 120px), transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
}

@media (min-width: 1537px) {
  .bm-page::before {
    left: calc(50% - 768px);
    right: auto;
    width: 1536px;
  }
}

/* ---------- Section kicker plaque (client "new server" banner, 410x50, ends 60px) ---------- */

.bm-kicker-plaque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  height: 50px;
  margin: 0;
  padding: 0 8px;
  border: 0 solid transparent;
  border-image: url("../img/game/plaque-410x50.b28293971a83.png") 0 60 fill / 0 60px;
  color: var(--bm-gold-text);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: var(--bm-chrome-shadow);
}

.bm-section__head--center {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  border-bottom: 0;
}

.bm-section__head--center .bm-section__title {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 38px);
}

/* ---------- ClassShowcase ---------- */

.bm-classes {
  position: relative;
  isolation: isolate;
  margin-top: 56px;
  padding-top: 64px;
  padding-bottom: 24px;
}

.bm-classes + .bm-feed {
  padding-top: 48px;
}

.bm-classes::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 58%, rgba(132, 35, 36, 0.32), transparent 70%),
    linear-gradient(180deg, var(--bm-ink-900), rgba(14, 10, 12, 1) 30%, rgba(14, 10, 12, 1) 70%, var(--bm-ink-900));
}

.bm-factions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 12px;
}

/* Each medallion is a native 330x360 crop; the button window shows its central 280x300 and fades the
   cut edges. Faces: normal at 0, selected at -360px. */
.bm-faction {
  position: relative;
  display: grid;
  justify-items: center;
  width: 280px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bm-nav);
  cursor: pointer;
}

.bm-faction__art {
  display: block;
  width: 280px;
  height: 300px;
  background: var(--faction-art) no-repeat -25px -30px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 80%, transparent 100%);
  transition: filter 200ms ease;
}

.bm-faction.is-active .bm-faction__art {
  background-position: -25px -390px;
}

.bm-faction:hover .bm-faction__art {
  filter: brightness(1.18);
}

.bm-faction__name {
  margin-top: -18px;
  font: 500 22px/1.2 var(--bm-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: var(--bm-chrome-shadow);
  transition: color 160ms ease;
}

.bm-faction__count {
  margin-top: 6px;
  color: var(--bm-label);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bm-faction:hover,
.bm-faction:focus-visible {
  color: var(--bm-gold-active);
}

.bm-faction.is-active {
  color: var(--bm-gold-title);
}

.bm-faction.is-active:hover {
  color: var(--bm-numeral-hi);
}

.bm-faction:active .bm-faction__art {
  transform: translateY(1px);
}

/* Non-Chinese pages: the medallions spell the faction in Chinese, so the selector is the client tab (3-sliced like
   .bm-tabs) carrying the translated name, with the class count under it. */
.bm-faction.bm-faction--tab {
  width: auto;
  gap: 8px;
}

.bm-faction--tab .bm-faction__name {
  display: grid;
  place-items: center;
  height: 45px;
  min-width: 200px;
  margin: 0;
  padding: 0 40px;
  border: 0 solid transparent;
  border-image: url("../img/game/tab-ink-140x45-normal.353dfd4bd60c.png") 0 64 0 6 fill / 0 64px 0 6px;
  font-size: 17px;
  white-space: nowrap;
}

.bm-faction--tab:hover .bm-faction__name,
.bm-faction--tab:focus-visible .bm-faction__name {
  border-image-source: url("../img/game/tab-ink-140x45-hover.dd1e11ea4c33.png");
}

.bm-faction--tab.is-active .bm-faction__name {
  border-image-source: url("../img/game/tab-ink-140x45-selected.da2c362b5bc7.png");
}

.bm-faction--tab:active .bm-faction__name {
  transform: translateY(1px);
}

.bm-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.bm-stage__faction {
  margin: 0;
  color: var(--bm-gold-text);
  font: 600 13px/1 var(--bm-ui);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.bm-stage__name {
  margin: 14px 0 28px;
  color: var(--bm-gold-title);
  font: 500 clamp(40px, 4.4vw, 64px)/1 var(--bm-display-hero);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000, 0 0 24px rgba(0, 0, 0, 0.8);
}

/* Class banners: native 97x262 client faces stacked normal (0), hover (-262px), selected (-524px). */
.bm-banners {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-banner {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bm-label);
  cursor: pointer;
}

.bm-banner__art {
  display: block;
  width: 97px;
  height: 262px;
  background: var(--banner-art) no-repeat 0 0;
}

.bm-banner:hover .bm-banner__art,
.bm-banner:focus-visible .bm-banner__art {
  background-position: 0 -262px;
}

.bm-banner.is-active .bm-banner__art {
  background-position: 0 -524px;
}

/* Portraits (non-Chinese pages): the client's hover and selected faces are both the colour tag, so the selected
   class also gets a gold outline. */
.bm-banner--portrait .bm-banner__art {
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: outline-color 160ms ease;
}

.bm-banner--portrait.is-active .bm-banner__art {
  outline-color: var(--bm-gold-title);
}

.bm-banner__name {
  font: 600 11px/1.2 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.bm-banner:hover,
.bm-banner:focus-visible {
  color: var(--bm-gold-active);
}

.bm-banner.is-active {
  color: var(--bm-gold-title);
}

.bm-banner.is-active:hover {
  color: var(--bm-numeral-hi);
}

.bm-banner:active .bm-banner__art {
  transform: translateY(1px);
}

.bm-stage__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 560px;
}

.bm-stage__art::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  z-index: -1;
  background: radial-gradient(circle at 50% 55%, rgba(201, 164, 110, 0.18), rgba(132, 35, 36, 0.14) 45%, transparent 70%);
}

/* <picture> of right-sized AVIF cuts (class_picker.art_sources): the img stays the grid item, and its width and height
   attributes only give the aspect ratio. */
.bm-stage__art picture {
  display: contents;
}

.bm-stage__art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.7));
}

@media (max-width: 1340px) {
  .bm-factions {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .bm-faction {
    flex: none;
    scroll-snap-align: center;
  }

  .bm-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-banners {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .bm-banners li {
    flex: none;
    scroll-snap-align: start;
  }

  .bm-stage__art {
    order: -1;
    height: 440px;
  }

  .bm-stage__art img {
    max-height: 440px;
  }
}

@media (max-width: 760px) {
  .bm-classes {
    margin-top: 40px;
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .bm-faction {
    width: 200px;
  }

  .bm-faction.bm-faction--tab {
    width: auto;
  }

  .bm-faction--tab .bm-faction__name {
    min-width: 150px;
    padding: 0 24px;
    font-size: 15px;
  }

  .bm-faction__art {
    width: 200px;
    background-position: -65px -30px;
  }

  .bm-faction.is-active .bm-faction__art {
    background-position: -65px -390px;
  }

  .bm-faction__name {
    font-size: 18px;
  }

  .bm-stage {
    margin-top: 24px;
    gap: 16px;
  }

  .bm-stage__art {
    height: 340px;
  }

  .bm-stage__art img {
    max-height: 340px;
  }

  .bm-stage__name {
    margin-bottom: 20px;
  }

  .bm-banners {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
}

/* The first section after the hero starts close to it; the hero's bottom fade already separates them. */
.bm-hero + .bm-section {
  padding-top: 16px;
}

@media (max-width: 760px) {
  .bm-button {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .bm-auth > .bm-panel {
    padding: 52px 24px 72px;
  }
}

/* Keep a level and its ascended tag on one line, so table rows stay one line tall on phones. */
td:has(> .bm-tag--inline) {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .bm-button {
    padding-inline: 16px;
    letter-spacing: 0.1em;
  }

  /* The ink buttons keep clear of their 60px sword end. */
  .bm-button.bm-button--secondary {
    padding: 0 60px 0 20px;
    font-size: 11px;
  }

  /* Data tables scroll sideways in their wrapper; cells stay on one line so rows stay compact. */
  .bm-table-wrap th,
  .bm-table-wrap td {
    white-space: nowrap;
  }

  .bm-button.bm-button--outline {
    padding: 0 60px 0 16px;
  }
}


/* ---------- SkillCalculator (docs/DESIGN.md) ----------
   Client skill-tree dialogs at native size: each page's art is one composited client bitmap (skills/pages/),
   icons are 36x36 client icons (skills/icons/<slug>.webp, 16 per row), the slot frame and add button are the
   client's own faces. CSS only positions them and draws states (dimmed, selected, focus, hover, pressed). */

.bm-skillcalc {
  --bm-skill-cjk: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "main side";
  gap: 32px;
  align-items: start;
}

.bm-skillcalc__main {
  grid-area: main;
  min-width: 0;
}

.bm-skillcalc__side {
  grid-area: side;
  position: sticky;
  top: calc(var(--bm-header-height) + 16px);
  display: grid;
  gap: 20px;
  max-height: calc(100vh - var(--bm-header-height) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.bm-skillcalc__side .bm-panel {
  padding: 26px 26px 28px;
}

.bm-skillcalc__side .bm-panel + .bm-panel {
  margin-top: 0;
}

.bm-skillcalc__section + .bm-skillcalc__section {
  margin-top: 56px;
}

.bm-skillcalc__section .bm-kicker {
  margin: 0 0 8px;
}

.bm-skillcalc__section > .bm-meta {
  margin: 0 0 20px;
  max-width: 720px;
}

.bm-skillcalc__help {
  margin-top: 40px;
}

.bm-skillcalc__paths {
  margin-bottom: 20px;
}

.bm-skillcalc__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 20px;
  min-height: 120px;
}

/* Pages render at their final size on the server; slots fade in when the data arrives, and a path switch
   cross-fades its pages (docs/UX.md §2). */
.bm-skill,
.bm-skill-add {
  animation: 160ms cubic-bezier(0, 0, 0.2, 1) both bm-skill-in;
}

.bm-skillcalc__pages.is-entering {
  animation: 200ms cubic-bezier(0, 0, 0.2, 1) both bm-fade-in;
}

@keyframes bm-skill-in {
  from { opacity: 0; }
}

/* Class switcher. */
.bm-skillcalc__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 32px;
}

.bm-skillcalc__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--bm-label);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-skillcalc__switch select {
  appearance: none;
  min-width: 240px;
  height: 44px;
  padding: 0 40px 0 14px;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  color: var(--bm-gold-title);
  font: 600 14px/1 var(--bm-ui);
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  transition: box-shadow 120ms ease, color 120ms ease;
}

.bm-skillcalc__switch select:hover {
  color: var(--bm-gold-active);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.8);
}

.bm-skillcalc__switch select option,
.bm-skillcalc__switch select optgroup {
  background: var(--bm-ink-850);
  color: var(--bm-bone);
}

.bm-skillcalc__switch::after {
  content: "";
  position: absolute;
  top: 17px;
  right: 17px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--bm-gold-text);
  border-bottom: 1px solid var(--bm-gold-text);
  transform: rotate(45deg);
  pointer-events: none;
}

/* SkillTree: one client dialog. */
.bm-skilltree {
  max-width: 100%;
  margin: 0;
}

.bm-skilltree__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bm-skilltree__title {
  margin: 0;
  color: var(--bm-gold-title);
  font: 600 15px/1.3 var(--bm-ui);
  letter-spacing: 0.04em;
}

.bm-skilltree__title:lang(zh-Hans) {
  font-family: var(--bm-skill-cjk);
  letter-spacing: 0.12em;
}

.bm-skilltree__count {
  margin: 0;
  color: var(--bm-label);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bm-skilltree__count strong {
  color: var(--bm-numeral-hi);
  font: 500 20px/1 var(--bm-numerals);
  letter-spacing: 0;
}

.bm-skilltree__scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.bm-skilltree__art {
  position: relative;
  flex: none;
  background-color: var(--bm-ink-900);
  background-repeat: no-repeat;
  background-position: 0 0;
  box-shadow: 0 0 0 1px rgba(var(--bm-rim), 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* SkillSlot: a 36x36 client icon with a 44x44 hit area. */
.bm-skill,
.bm-skill-add,
.bm-step {
  -webkit-tap-highlight-color: transparent;
}

.bm-skill {
  position: absolute;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}

.bm-skill::before {
  content: "";
  position: absolute;
  inset: -4px;
}

.bm-skill__icon {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  transition: filter 120ms ease;
}

.bm-skill--framed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../skills/frame-36.6ac3c7c1ea26.png") no-repeat 0 0;
  pointer-events: none;
}

.bm-skill__rank {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  min-width: 13px;
  padding: 0 3px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffcb4a;
  font: 700 11px/14px var(--bm-ui);
  text-align: center;
}

.bm-skill__rank:empty {
  display: none;
}

.bm-skill.is-max .bm-skill__rank {
  color: var(--bm-numeral-hi);
  box-shadow: inset 0 -1px 0 rgba(var(--bm-gold-line), 0.9);
}

.bm-skill.is-locked .bm-skill__icon {
  filter: grayscale(0.75) brightness(0.45);
}

.bm-skill:hover .bm-skill__icon {
  filter: brightness(1.2);
}

.bm-skill.is-locked:hover .bm-skill__icon {
  filter: grayscale(0.5) brightness(0.7);
}

.bm-skill:hover {
  box-shadow: 0 0 0 1px rgba(var(--bm-gold-line), 0.65);
}

.bm-skill.is-selected {
  box-shadow: 0 0 0 1px var(--bm-ink-950), 0 0 0 3px var(--bm-gold-active), 0 0 14px rgba(var(--bm-gold-line), 0.6);
}

.bm-skill:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-skill:active {
  transform: translateY(1px);
}

/* Feedback where the user is looking: the rank badge pops on a change; a refused rank flashes red. */
.bm-skill.is-bumped .bm-skill__rank {
  animation: 180ms cubic-bezier(0, 0, 0.2, 1) bm-rank-bump;
}

.bm-skill.is-denied {
  animation: 360ms ease-out bm-skill-denied;
}

@keyframes bm-rank-bump {
  from { transform: scale(1.45); }
}

@keyframes bm-skill-denied {
  from { box-shadow: 0 0 0 2px var(--bm-error), 0 0 12px rgba(220, 60, 60, 0.6); }
}

/* The client's add button, shown where a rank can be added (mouse only; touch uses the detail panel). */
.bm-skill-add {
  position: absolute;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  background: url("../skills/add-12.90a3999d0686.png") no-repeat 0 0;
  cursor: pointer;
}

.bm-skill-add::before {
  content: "";
  position: absolute;
  inset: -5px;
}

.bm-skill-add:hover {
  background-position: 0 -12px;
}

.bm-skill-add:active {
  background-position: 0 -24px;
}

.bm-skill-add[hidden] {
  display: none;
}

@media (pointer: coarse) {
  .bm-skill-add {
    display: none;
  }
}

/* Build summary. */
.bm-skillcalc__totals {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.bm-skillcalc__totals:empty {
  display: none;
}

.bm-skillcalc__totals div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.22);
}

.bm-skillcalc__totals dt {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-skillcalc__totals dd {
  margin: 0;
  color: var(--bm-numeral-hi);
  font: 500 24px/1 var(--bm-numerals);
}

.bm-skillcalc__link {
  display: grid;
  gap: 8px;
  margin: 18px 0 16px;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-skillcalc__link input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  color: var(--bm-bone);
  font: 500 12px/1 var(--bm-ui);
  text-overflow: ellipsis;
}

.bm-skillcalc__link input:hover {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.8);
}

.bm-skillcalc__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.bm-skillcalc__actions .bm-button {
  min-width: 180px;
}

.bm-skillcalc__history {
  display: flex;
  gap: 14px;
}

.bm-skillcalc__textbtn:disabled {
  opacity: 0.4;
  cursor: default;
  text-decoration-color: transparent;
}

.bm-skillcalc__textbtn:hover:disabled {
  color: var(--bm-label);
}

.bm-skillcalc__copy.is-done .bm-button__label {
  color: var(--bm-gold-active);
}

.bm-skillcalc__hint {
  margin: 0 0 10px;
  color: var(--bm-gold-text);
  font-size: 13px;
}

.bm-skillcalc__textbtn,
.bm-skillcalc__close {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--bm-label);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-decoration-color: rgba(var(--bm-rim), 0.6);
  text-underline-offset: 4px;
  text-transform: uppercase;
  cursor: pointer;
}

.bm-skillcalc__textbtn:hover,
.bm-skillcalc__close:hover {
  color: var(--bm-gold-active);
  text-decoration-color: currentColor;
}

/* Selected skill. */
.bm-skillcalc__detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bm-skillcalc__close {
  display: none;
  min-width: 44px;
  font-size: 24px;
  text-decoration: none;
}

.bm-skillcalc__name {
  margin: 0 0 12px;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-skillcalc__name strong {
  margin-right: 8px;
  color: var(--bm-gold-title);
  font: 600 17px/1.3 var(--bm-ui);
}

.bm-skillcalc__name strong:lang(zh-Hans) {
  font-family: var(--bm-skill-cjk);
}

.bm-skillcalc__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.bm-step {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: var(--bm-card);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  color: var(--bm-steel-text);
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 120ms ease, box-shadow 120ms ease;
}

.bm-step span {
  font-size: 20px;
  letter-spacing: 0;
}

.bm-step:hover:not(:disabled) {
  color: var(--bm-gold-active);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.8);
}

.bm-step:active:not(:disabled) {
  transform: translateY(1px);
}

.bm-step:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* SkillTooltip: the client's tooltip text and colours (^rrggbb) on ink. */
.bm-skilltip {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.35);
  color: #fff;
  font: 400 13px/1.6 var(--bm-ui);
}

.bm-skilltip:lang(zh-Hans) {
  font-family: var(--bm-skill-cjk);
}

/* The hover tooltip beside the pointer (mouse and keyboard focus; touch uses the detail sheet). */
.bm-skilltip-float {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 340px;
  max-width: calc(100vw - 16px);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 100ms ease-out, visibility 0s linear 100ms;
}

.bm-skilltip-float.is-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 100ms ease-out;
}

.bm-skilltip-float .bm-skilltip {
  background: rgba(8, 6, 7, 0.97);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.6), 0 14px 36px rgba(0, 0, 0, 0.65);
}

/* Mobile totals bar: stays in view while the trees scroll (hidden where the summary column is sticky). */
.bm-skillcalc__bar {
  display: none;
}

.bm-skilltip p {
  margin: 0;
}

.bm-skilltip__body,
.bm-skilltip__next,
.bm-skilltip__reqs {
  margin-top: 10px !important;
}

.bm-skilltip__next {
  padding-top: 10px;
  border-top: 1px solid rgba(var(--bm-rim), 0.3);
  color: #cc0000;
}

.bm-skilltip__next:first-child {
  padding-top: 0;
  border-top: 0;
}

.bm-skilltip__reqs {
  display: grid;
  gap: 2px;
  padding: 0;
  list-style: none;
}

.bm-skilltip__reqs li.is-unmet,
.bm-skilltip__reqs li.is-unmet span {
  color: var(--bm-error) !important;
}

.bm-skilltip__reqs li.is-unmet::before {
  content: "✕ ";
}

/* Class picker. */
.bm-skillpick__list {
  flex-wrap: wrap;
  gap: 18px 14px;
}

.bm-skillpick .bm-banner {
  text-decoration: none;
}

@media (max-width: 1340px) {
  .bm-skillcalc {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "side" "bar" "main";
  }

  .bm-skillcalc__side {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .bm-skillcalc__bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 48px;
    padding: 0 14px;
    background: rgba(8, 6, 7, 0.94);
    box-shadow: inset 0 -1px 0 rgba(var(--bm-rim), 0.3);
    color: var(--bm-label);
    font: 600 11px/1 var(--bm-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    grid-area: bar;
  }

  .bm-skillcalc__bar strong {
    margin-left: 6px;
    color: var(--bm-numeral-hi);
    font: 500 20px/1 var(--bm-numerals);
    letter-spacing: 0;
  }

  .bm-skillcalc__bar .bm-skillcalc__textbtn {
    margin-left: auto;
  }

  /* The selected skill opens as a sheet over the bottom of the screen. */
  .bm-skillcalc__detail {
    display: none;
  }

  .bm-skillcalc__detail.is-open {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 60;
    display: block;
    max-height: min(52vh, 480px);
    overflow-y: auto;
    /* Opaque under the panel frame: the sheet covers the tree. */
    background: linear-gradient(var(--bm-menu-solid), var(--bm-menu-solid)) 3px 3px / calc(100% - 6px) calc(100% - 6px) no-repeat;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.7);
    animation: 220ms cubic-bezier(0, 0, 0.2, 1) both bm-sheet-in;
  }

  @keyframes bm-sheet-in {
    from { opacity: 0; transform: translateY(24px); }
  }

  .bm-skillcalc__close {
    display: inline-grid;
    place-items: center;
  }
}

@media (max-width: 760px) {
  .bm-skillcalc__pages {
    justify-content: center;
  }

  .bm-skillcalc__side .bm-panel {
    padding: 22px 20px 24px;
  }

  .bm-skillcalc__actions .bm-button {
    flex: 1 1 100%;
  }

  .bm-skillpick__list {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .bm-skillcalc__switch {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .bm-skillcalc__switch select {
    width: 100%;
    min-width: 0;
  }

  .bm-skillcalc__switch::after {
    top: auto;
    bottom: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-skill__icon,
  .bm-step,
  .bm-skilltip-float {
    transition: none;
  }
}

/* ---------- Game database (docs/DESIGN.md DatabaseSearch, RecordPage, ItemTooltip) ---------- */

/* Game text is rendered server-side in the page's language only (database_tags.dbtext). */
.bm-tx:lang(zh-Hans),
.bm-db [lang="zh-Hans"] {
  font-family: var(--bm-skill-cjk);
}

.bm-db-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 8px 0 16px;
}

.bm-db-search {
  flex: 1 1 360px;
  max-width: 560px;
}

.bm-db-search__input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: rgba(8, 6, 7, 0.72);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  color: var(--bm-text, #efe6d6);
  font: 500 15px/1.2 var(--bm-ui);
  transition: box-shadow 120ms ease;
}

.bm-db-search__input::placeholder {
  color: var(--bm-label);
}

.bm-db-search__input:hover {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.8);
}

.bm-db-search__input:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--bm-gold-active), 0 0 0 3px rgba(var(--bm-gold-line), 0.25);
}

.bm-db-tabs,
.bm-db-subtabs {
  flex-wrap: wrap;
  margin-bottom: 20px;
  overflow: visible;
}

.bm-db-table th.bm-db-num {
  text-align: right;
}

.bm-db-overview .bm-kicker {
  margin: 24px 0 8px;
}

.bm-db-record--single {
  grid-template-columns: minmax(0, 640px);
}

.bm-db-results:empty {
  display: none;
}

.bm-db-panel + .bm-db-panel,
.bm-db-results + .bm-db-panel {
  margin-top: 20px;
}

.bm-db-table td {
  vertical-align: middle;
}

.bm-db-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bm-db-id {
  color: var(--bm-label);
}

.bm-db-count {
  margin-left: 6px;
  color: var(--bm-label);
  font: 500 13px/1 var(--bm-numerals);
  letter-spacing: 0;
}

/* Client icons render at their native 36px from the release's sprite sheets. */
.bm-dbicon {
  display: inline-block;
  flex: none;
  width: 36px;
  height: 36px;
  background-repeat: no-repeat;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(var(--bm-rim), 0.45);
}

.bm-dbicon--empty {
  background: rgba(255, 255, 255, 0.03);
}

.bm-db-link,
.bm-table .bm-db-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--bm-gold-text);
  text-decoration: none;
  transition: color 120ms ease;
}

.bm-db-link:hover,
.bm-db-link:focus-visible,
.bm-table .bm-db-link:hover,
.bm-table .bm-db-link:focus-visible {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-table .bm-db-link--inline {
  display: inline;
  min-height: 0;
}

.bm-db-table .bm-db-note--inline {
  white-space: nowrap;
}
.bm-db-link:hover .bm-dbicon {
  box-shadow: 0 0 0 1px var(--bm-gold-active);
}

.bm-db-hint {
  margin-top: 12px;
}

.bm-db-browse {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.bm-db-browse a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.35);
  color: var(--bm-gold-text);
  text-decoration: none;
  transition: box-shadow 120ms ease, color 120ms ease, background-color 120ms ease;
}

.bm-db-browse a:hover,
.bm-db-browse a:focus-visible {
  background: rgba(var(--bm-gold-line), 0.06);
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
  color: var(--bm-gold-active);
}

.bm-db-browse__label {
  font: 600 13px/1.2 var(--bm-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bm-db-browse__count {
  color: var(--bm-numeral);
  font: 500 18px/1 var(--bm-numerals);
}

.bm-db-head__title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bm-db-head__alt {
  margin: 6px 0 0;
  color: var(--bm-label);
  font-size: 15px;
}

.bm-db-record {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.bm-db-links > .bm-db-panel + .bm-db-panel {
  margin-top: 20px;
}

.bm-db-stats {
  display: grid;
  gap: 0;
  margin: 0 0 16px;
}

.bm-db-stats div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.14);
}

.bm-db-stats dt {
  color: var(--bm-label);
  font-size: 13px;
}

.bm-db-stats dd {
  margin: 0;
  color: var(--bm-numeral);
  font: 500 15px/1.3 var(--bm-numerals);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bm-db-addons {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.bm-db-addons li {
  padding: 6px 0;
  color: var(--bm-crimson-text);
  font-size: 14px;
}

.bm-db-desc {
  margin: 0;
  color: var(--bm-steel-text);
  font-size: 14px;
  line-height: 1.6;
}

/* World panels (database_world.py): spawn places, monster behaviour and item sources. */
.bm-db-note {
  display: block;
  margin-top: 2px;
  color: var(--bm-label);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.bm-db-note--inline {
  display: inline;
  margin: 0 0 0 4px;
}

.bm-db-num .bm-db-note {
  text-align: right;
}

.bm-db-coords {
  color: var(--bm-steel-text);
  font: 500 14px/1.4 var(--bm-numerals);
  font-variant-numeric: tabular-nums;
}

.bm-db-where {
  font-size: 13px;
}

.bm-db-where .bm-db-link {
  display: inline;
}

.bm-db-behaviour {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-db-behaviour li {
  padding: 8px 0;
  border-top: 1px solid rgba(var(--bm-rim), 0.12);
  font-size: 14px;
  line-height: 1.5;
}

.bm-db-behaviour li:first-child {
  border-top: 0;
}

.bm-db-behaviour__when {
  display: block;
  color: var(--bm-crimson-text);
  font-weight: 600;
}

.bm-db-behaviour__do {
  color: var(--bm-steel-text);
}

.bm-db-behaviour__do .bm-db-link {
  display: inline;
}

/* Map figure: the map picture at native size in a scrolling window, place names, filterable markers. */
.bm-db-map {
  margin: 0 0 16px;
}

.bm-db-map__window {
  width: fit-content;
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(var(--bm-rim), 0.35);
}

.bm-db-map__window:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-db-map__plate {
  position: relative;
}

.bm-db-map__plate--blank {
  background: var(--bm-ink-850);
  background-image: linear-gradient(rgba(var(--bm-rim), 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--bm-rim), 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
}

.bm-db-map__plate img {
  display: block;
}

.bm-db-map__dot,
.bm-db-map__key {
  width: 9px;
  height: 9px;
  border: 2px solid var(--bm-ink-950);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.bm-db-map__dot {
  position: absolute;
  transform: translate(-50%, -50%);
}

.bm-db-map__dot--self {
  z-index: 2;
  width: 15px;
  height: 15px;
  background: var(--bm-gold-title);
  box-shadow: 0 0 0 2px var(--bm-ink-950), 0 0 10px 3px rgba(233, 207, 159, 0.9);
}

.bm-db-map__key {
  display: inline-block;
  margin: 0 6px 0 0;
  vertical-align: middle;
}

.bm-db-map__dot--monster {
  background: #ff4d42;
}

.bm-db-map__dot--npc {
  background: #8cf07f;
}

.bm-db-map__dot--mine {
  background: #63b6ff;
}

.bm-db-map--dense .bm-db-map__dot:not(.bm-db-map__dot--self) {
  width: 7px;
  height: 7px;
  border-width: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.bm-db-map.is-hidden-monster .bm-db-map__dot--monster,
.bm-db-map.is-hidden-npc .bm-db-map__dot--npc,
.bm-db-map.is-hidden-mine .bm-db-map__dot--mine {
  display: none;
}

.bm-db-map__label {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  max-width: 120px;
  color: var(--bm-bone);
  font: 600 11px/1.15 var(--bm-ui);
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 0 3px #000, 0 0 2px #000, 0 1px 0 #000;
  pointer-events: none;
}

.bm-db-map__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin: 10px 0 0;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-db-map__toggle {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  cursor: pointer;
}

.bm-db-map__toggle input {
  margin: 0 8px 0 0;
  accent-color: #c9a46e;
}

.bm-db-map__self {
  display: inline-flex;
  align-items: center;
  color: var(--bm-gold-title);
}

.bm-db-map__self .bm-db-map__key {
  width: 13px;
  height: 13px;
}

.bm-db-map__open {
  margin-left: auto;
  color: var(--bm-gold-text);
}

.bm-db-more {
  margin: 0 0 12px;
}

.bm-db-panel .bm-meta + .bm-kicker {
  margin-top: 20px;
}

.bm-db-more summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--bm-gold-text);
  font-size: 13px;
  cursor: pointer;
}

.bm-db-more summary:hover,
.bm-db-more summary:focus-visible {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-db-sources td:first-child {
  width: 46%;
}

.bm-db-sources td:nth-child(2) {
  width: 34%;
}

.bm-db-place {
  display: block;
  margin-top: 2px;
  color: var(--bm-steel-text);
  font-size: 12px;
}

/* Quest steps: the quest's sub-quests in client order; deeper steps indent one level. */
.bm-db-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: bm-db-step;
}

.bm-db-steps__item {
  position: relative;
  padding: 8px 0 8px 32px;
  border-top: 1px solid rgba(var(--bm-gold-line), 0.18);
  counter-increment: bm-db-step;
}

.bm-db-steps__item:first-child {
  border-top: 0;
}

.bm-db-steps__item::before {
  content: counter(bm-db-step);
  position: absolute;
  top: 8px;
  left: 0;
  min-width: 22px;
  color: var(--bm-gold-title);
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.bm-db-steps__item--nested {
  margin-left: 24px;
}

.bm-db-steps__name {
  display: block;
  color: var(--bm-gold-label);
  font-size: 14px;
  font-weight: 600;
}

.bm-db-steps__item .bm-db-desc {
  margin-top: 4px;
}

.bm-db-steps__item--d2 { margin-left: 24px; }
.bm-db-steps__item--d3 { margin-left: 48px; }
.bm-db-steps__item--d4,
.bm-db-steps__item--d5,
.bm-db-steps__item--d6 { margin-left: 72px; }

.bm-db-steps__link {
  display: inline-block;
  color: var(--bm-gold-text);
  text-decoration: none;
  transition: color 120ms ease;
}

.bm-db-steps__link:hover,
.bm-db-steps__link:focus-visible {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-db-steps__meta {
  display: block;
  margin-top: 2px;
  color: var(--bm-label);
  font-size: 12px;
}

/* Quest pages (docs/DESIGN.md QuestPage, QuestFacts). */
.bm-db-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.bm-db-crumbs li + li::before {
  content: "›";
  margin: 0 8px;
  color: var(--bm-label);
}

.bm-db-crumbs a {
  color: var(--bm-gold-label);
  text-decoration: none;
  transition: color 120ms ease;
}

.bm-db-crumbs a:hover,
.bm-db-crumbs a:focus-visible {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-db-quest .bm-notice {
  margin: 0 0 12px;
}

.bm-db-facts {
  display: grid;
  margin: 0 0 12px;
}

.bm-db-facts__row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.14);
}

.bm-db-facts dt {
  padding-top: 2px;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-db-facts dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  color: var(--bm-steel-text);
  font-size: 14px;
  line-height: 1.5;
}

.bm-db-facts__tag {
  color: var(--bm-gold-label);
}

.bm-db-refs {
  display: grid;
  flex-basis: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-db-refs li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
}

.bm-db-refs .bm-db-link {
  min-height: 40px;
}

.bm-db-refs__n {
  color: var(--bm-numeral);
  font: 500 15px/1 var(--bm-numerals);
  font-variant-numeric: tabular-nums;
}

.bm-db-refs__where {
  flex-basis: 100%;
  color: var(--bm-label);
  font-size: 12px;
  line-height: 1.5;
}

.bm-db-refs__where .bm-db-link,
.bm-db-facts__text .bm-db-link {
  min-height: 0;
  gap: 6px;
}

.bm-db-refs__where .bm-dbicon,
.bm-db-facts__text .bm-dbicon {
  display: none;
}

/* Quests list filters (docs/DESIGN.md QuestList). */
.bm-db-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin: 0 0 16px;
}

.bm-db-filters__field {
  flex: 0 1 220px;
}

.bm-db-filters__field--num {
  flex-basis: 120px;
}

.bm-db-filters__clear {
  align-self: center;
  color: var(--bm-gold-text);
  font-size: 13px;
}

.bm-db-filters__clear:hover,
.bm-db-filters__clear:focus-visible {
  color: var(--bm-gold-active);
}

.bm-db-cell__text {
  color: var(--bm-numeral);
}

.bm-db-refs__note,
.bm-db-refs__missing {
  color: var(--bm-label);
  font-size: 12px;
}

.bm-db-place {
  color: var(--bm-gold-label);
}

.bm-db-places li {
  color: var(--bm-steel-text);
}

.bm-dbtip-float {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 320px;
  max-width: calc(100vw - 16px);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 100ms ease-out, visibility 0s linear 100ms;
}

.bm-dbtip-float.is-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 100ms ease-out;
}

.bm-dbtip {
  padding: 14px 16px;
  background: rgba(8, 6, 7, 0.97);
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.6), 0 14px 36px rgba(0, 0, 0, 0.65);
}

.bm-dbtip__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--bm-gold-title);
  font-size: 15px;
}

.bm-dbtip__meta {
  margin: 8px 0 10px;
  color: var(--bm-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm-dbtip__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin: 0 0 10px;
}

.bm-dbtip__stats div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.bm-dbtip__stats dt {
  color: var(--bm-label);
}

.bm-dbtip__stats dd {
  margin: 0;
  color: var(--bm-numeral);
}

.bm-dbtip__addons {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--bm-crimson-text);
  font-size: 12px;
}

.bm-dbtip .bm-db-desc {
  font-size: 12px;
}

@media (max-width: 1100px) {
  .bm-db-record {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .bm-db-search {
    flex-basis: 100%;
    max-width: none;
  }

  .bm-db-browse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bm-db-browse a {
    padding: 12px;
  }

  .bm-db-browse__label {
    min-width: 0;
    letter-spacing: 0.06em;
  }

  /* Phones: one scrolling row (the current tab is scrolled into view by database.js), faded at the edge. */
  .bm-db-tabs,
  .bm-db-subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }

  .bm-db-tabs .bm-nav__link,
  .bm-db-subtabs .bm-nav__link {
    min-width: 112px;
    scroll-snap-align: start;
  }

  .bm-db-head__title {
    align-items: flex-start;
  }

  .bm-db-facts__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-db-filters__field,
  .bm-db-filters__field--num {
    flex: 1 1 40%;
  }

  .bm-db-steps__item--d3,
  .bm-db-steps__item--d4,
  .bm-db-steps__item--d5,
  .bm-db-steps__item--d6 {
    margin-left: 36px;
  }

  .bm-db-table th:nth-child(4),
  .bm-db-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 420px) {
  .bm-db-browse {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-dbtip-float {
    transition: none;
  }
}

/* ---------- Bug tracker (BugTracker: jade_dynasty/bugs/) ---------- */

.bm-bugs__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 24px;
}

.bm-bugs__search {
  flex: 1 1 320px;
  margin: 0;
}

.bm-bugs__count {
  margin-left: 6px;
  color: var(--bm-label);
  font: 600 11px/1 var(--bm-ui);
}

.bm-bugs__stage-inline {
  display: none;
}

.bm-bugs__table td {
  vertical-align: top;
}

.bm-bugs__number {
  color: var(--bm-numeral) !important;
  font: 500 18px/1.3 var(--bm-numerals);
}

.bm-bugs__title {
  min-width: 260px;
  white-space: normal !important;
}

.bm-bugs__title a {
  display: block;
  font-weight: 600;
  text-underline-offset: 3px;
}

.bm-bugs__title a:hover,
.bm-bugs__title a:focus-visible {
  color: var(--bm-gold-label);
  text-decoration: underline;
}

.bm-bugs__title small,
.bm-bugs__when {
  display: block;
  margin-top: 4px;
  color: var(--bm-label);
  font-size: 12px;
}

.bm-bugs__activity span {
  display: block;
  color: var(--bm-label);
  font-size: 13px;
  white-space: nowrap;
}

.bm-bug-stage {
  white-space: nowrap;
}

.bm-bug-stage--new {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-crimson), 0.8);
  color: var(--bm-crimson-text);
}

.bm-bug-stage--backlog,
.bm-bug-stage--rejected {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.55);
  color: var(--bm-label);
}

.bm-bug-stage--rejected {
  text-decoration: line-through;
  text-decoration-color: rgba(var(--bm-rim), 0.8);
}

.bm-bug-stage--fixing {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.8);
  color: var(--bm-gold-active);
}

.bm-bug-stage--validation {
  box-shadow: inset 0 0 0 1px rgba(227, 221, 208, 0.6);
  color: var(--bm-bone);
}

.bm-bug-stage--done {
  box-shadow: inset 0 0 0 1px rgba(185, 211, 168, 0.6);
  color: var(--bm-success);
}

.bm-bug-stage--done::before {
  content: "✓";
  margin-right: 6px;
}

.bm-bug-decision {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.5);
  color: var(--bm-gold-label);
}

.bm-bug__meta {
  margin: 0;
}

.bm-bug__status-help {
  margin: 0 0 20px;
  color: var(--bm-bone);
  font-size: 14px;
}

.bm-bug__status-help strong {
  color: var(--bm-gold-label);
  font-weight: 600;
}

.bm-bug-legend {
  margin: 0 0 20px;
  color: var(--bm-bone);
}

.bm-bug-legend summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--bm-gold-active);
  font: 600 12px/1.4 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.bm-bug-legend summary:hover,
.bm-bug-legend summary:focus-visible {
  color: var(--bm-gold-label);
}

.bm-bug-legend dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px 32px;
  margin: 8px 0 0;
  padding: 18px 20px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.35);
  background: var(--bm-card);
}

.bm-bug-legend__row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
}

.bm-bug-legend dt,
.bm-bug-legend dd {
  margin: 0;
}

.bm-bug-legend dd {
  font-size: 13px;
  line-height: 1.5;
}

.bm-bug__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bm-bug__staff-note {
  margin: 20px 0 0;
}

.bm-bug__staff-note a {
  color: var(--bm-gold-active);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-bug-files {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.bm-bug-file img,
.bm-bug-file video {
  display: block;
  width: 240px;
  height: 150px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(var(--bm-rim), 0.5);
  background: var(--bm-ink-950);
}

.bm-bug-file video {
  width: 320px;
  height: 180px;
  object-fit: contain;
}

.bm-bug-file a:hover img,
.bm-bug-file a:focus-visible img {
  box-shadow: 0 0 0 1px rgba(var(--bm-gold-line), 0.9);
}

.bm-bug-file__doc {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  color: var(--bm-gold-active);
}

.bm-bug-comments {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.bm-bug-comment {
  padding: 18px 0;
  border-top: 1px solid rgba(var(--bm-rim), 0.2);
}

.bm-bug-comment .bm-meta {
  margin-bottom: 8px;
}

.bm-bug-comment .bm-meta strong {
  color: var(--bm-gold-text);
}

.bm-bug-comment.is-staff {
  padding-left: 14px;
  border-left: 2px solid rgba(var(--bm-gold-line), 0.9);
}

.bm-bug__form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(var(--bm-rim), 0.2);
}

.bm-field input[type="file"] {
  padding: 8px 10px;
  cursor: pointer;
}

.bm-field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.7);
  background: var(--bm-menu-solid);
  color: var(--bm-gold-text);
  font: 600 12px/1.4 var(--bm-ui);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.bm-field input[type="file"]:hover::file-selector-button {
  color: var(--bm-gold-active);
}

@media (max-width: 760px) {
  .bm-bugs__toolbar .bm-button {
    width: 100%;
  }

  .bm-bug-legend dl {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .bm-bug-legend__row {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .bm-bug-file,
  .bm-bug-file img,
  .bm-bug-file video {
    width: 100%;
  }

  .bm-bug-file img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .bm-bug-file video {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .bm-bugs__table th:nth-child(n + 3),
  .bm-bugs__table td:nth-child(n + 3) {
    display: none;
  }

  .bm-bugs__table td.bm-empty {
    display: table-cell;
  }

  .bm-bugs__title {
    min-width: 0;
  }

  .bm-bugs__stage-inline {
    display: block;
    margin-top: 8px;
  }
}

/* ---------- Suggestions board (docs/DESIGN.md SuggestionBoard, SuggestionVote, SuggestionStage, SuggestionDetail) ---------- */

.bm-sug-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin: 18px 0 20px;
}

.bm-sug-filters .bm-field {
  flex: 0 1 200px;
  margin: 0;
}

.bm-sug-filters__clear {
  align-self: center;
  margin-top: 18px;
  font-size: 13px;
}

.bm-sug-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-sug-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid rgba(var(--bm-rim), 0.2);
}

.bm-sug-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.bm-sug-row:last-child {
  padding-bottom: 0;
}

.bm-sug-row.is-pinned {
  padding-left: 14px;
  border-left: 2px solid rgba(var(--bm-gold-line), 0.9);
}

.bm-sug-row__main {
  flex: 1 1 auto;
  min-width: 0;
}

.bm-sug-row__title {
  display: block;
  color: var(--bm-gold-text);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.bm-sug-row__title:hover,
.bm-sug-row__title:focus-visible {
  color: var(--bm-gold-label);
  text-decoration: underline;
}

.bm-sug-row.is-closed .bm-sug-row__title {
  color: var(--bm-label);
}

.bm-sug-row__meta {
  margin: 6px 0 0;
  color: var(--bm-label);
  font-size: 13px;
}

.bm-sug-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.bm-sug-author {
  color: var(--bm-gold-text);
  font-weight: 600;
}

a.bm-sug-author:hover,
a.bm-sug-author:focus-visible {
  color: var(--bm-gold-label);
  text-decoration: underline;
}

.bm-sug-author__class {
  margin-left: 6px;
  color: var(--bm-label);
  font-size: 12px;
}

.bm-sug-vote {
  display: flex;
  flex: 0 0 52px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.bm-sug-vote__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  padding: 0;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  background: rgba(10, 8, 9, 0.62);
  color: var(--bm-label);
  font-size: 12px;
  cursor: pointer;
  transition: color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.bm-sug-vote__btn:hover,
.bm-sug-vote__btn:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.8);
  color: var(--bm-gold-active);
}

.bm-sug-vote__btn--up[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.9);
  background: rgba(var(--bm-crimson), 0.35);
  color: var(--bm-gold-active);
}

.bm-sug-vote__btn--down[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-crimson), 0.8);
  color: var(--bm-crimson-text);
}

.bm-sug-vote__btn.is-static {
  box-shadow: none;
  background: none;
  cursor: default;
}

.bm-sug-vote__count {
  color: var(--bm-numeral);
  font: 500 22px/1.1 var(--bm-numerals);
  font-variant-numeric: tabular-nums;
}

.bm-sug-vote__down {
  color: var(--bm-crimson-text);
  font: 600 11px/1 var(--bm-ui);
}

.bm-sug-vote__error {
  max-width: 120px;
  color: var(--bm-crimson-text);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.bm-sug-stage {
  white-space: nowrap;
}

.bm-sug-stage--new {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-crimson), 0.8);
  color: var(--bm-crimson-text);
}

.bm-sug-stage--review,
.bm-sug-stage--declined {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.55);
  color: var(--bm-label);
}

.bm-sug-stage--declined {
  text-decoration: line-through;
  text-decoration-color: rgba(var(--bm-rim), 0.8);
}

.bm-sug-stage--planned {
  box-shadow: inset 0 0 0 1px rgba(227, 221, 208, 0.6);
  color: var(--bm-bone);
}

.bm-sug-stage--in-progress {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.8);
  color: var(--bm-gold-active);
}

.bm-sug-stage--done {
  box-shadow: inset 0 0 0 1px rgba(185, 211, 168, 0.6);
  color: var(--bm-success);
}

.bm-sug-stage--done::before {
  content: "✓";
  margin-right: 6px;
}

.bm-sug-closed {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.35);
  color: var(--bm-label);
}

.bm-sug-pinned {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.9);
  color: var(--bm-gold-label);
}

.bm-sug-category {
  color: var(--bm-label);
}

.bm-sug-detail {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.bm-sug-detail__main {
  flex: 1 1 auto;
  min-width: 0;
}

.bm-sug-detail .bm-sug-row__tags {
  margin-bottom: 12px;
}

.bm-sug-response {
  border-left: 2px solid rgba(var(--bm-gold-line), 0.9);
}

.bm-sug-similar {
  margin: -4px 0 16px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.5);
}

.bm-sug-similar ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.bm-sug-similar small {
  color: var(--bm-label);
}

.bm-sug-note {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .bm-sug-filters .bm-field {
    flex: 1 1 calc(50% - 8px);
  }

  .bm-sug-row {
    gap: 12px;
  }

  .bm-sug-vote {
    flex-basis: 40px;
  }

  .bm-sug-detail {
    gap: 12px;
  }

  .bm-sug-author__class {
    display: inline-block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-sug-vote__btn {
    transition: none;
  }
}

/* ---------- Game data pages (players, character, rankings, armory; docs/DESIGN.md PlayerFilters, PlayerCard, GearList) ---------- */

.bm-table .bm-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bm-player-link {
  color: var(--bm-bone);
  text-decoration: none;
}

.bm-player-link:hover,
.bm-player-link:focus-visible {
  color: var(--bm-gold-title);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-tabs--sub {
  margin-top: -4px;
}

.bm-tabs--sub .bm-nav__link {
  min-width: 110px;
}

.bm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
  margin: 8px 0 18px;
}

.bm-filters .bm-field {
  flex: 0 1 200px;
}

.bm-filters .bm-filters__search {
  flex: 1 1 260px;
  max-width: 420px;
}

.bm-filters .bm-filters__num {
  flex: 0 1 110px;
}

.bm-filters__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--bm-bone);
  font: 500 14px/1.2 var(--bm-ui);
  cursor: pointer;
}

.bm-filters__check input {
  width: 18px;
  height: 18px;
  accent-color: var(--bm-gold-active);
}

.bm-filters__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bm-filters__reset {
  color: var(--bm-label);
  font: 500 13px/1 var(--bm-ui);
}

.bm-filters__reset:hover,
.bm-filters__reset:focus-visible {
  color: var(--bm-gold-title);
}

.bm-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 20px;
  margin-bottom: 20px;
}

.bm-player > .bm-panel {
  margin: 0;
}

.bm-player__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
}

.bm-player__facts--small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-player__facts dt {
  color: var(--bm-label);
  font: 500 12px/1.4 var(--bm-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm-player__facts dd {
  margin: 2px 0 0;
  color: var(--bm-bone);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.bm-gear {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Equipment as the in-game character window: left side and right side, each read top to bottom; the sides stack
   on narrow screens (tracker #485). */
.bm-gear-sides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 16px;
  align-items: start;
}

.bm-gear--side {
  grid-template-columns: minmax(0, 1fr);
}

.bm-gear__item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  min-width: 0;
}

.bm-gear__item .bm-db-link {
  min-width: 0;
}

.bm-gear__item .bm-db-link__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-gear__unknown {
  color: var(--bm-label);
}

.bm-gear__skel {
  width: 100%;
  height: 36px;
  margin: 0;
}

.bm-armory {
  display: grid;
  gap: 18px;
}

.bm-armory__body {
  flex: 1 1 auto;
  min-width: 0;
}

.bm-armory__gear {
  margin-top: 14px;
}

.bm-table-wrap--tall {
  max-height: 560px;
  overflow-y: auto;
}

.bm-achievements .bm-table__sub {
  max-width: 520px;
}

.bm-clan-panel {
  margin-bottom: 20px;
}

.bm-clan-panel .bm-table-panel {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .bm-player {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .bm-filters .bm-field,
  .bm-filters .bm-filters__search {
    flex: 1 1 100%;
    max-width: none;
  }

  .bm-filters .bm-filters__num {
    flex: 1 1 calc(50% - 8px);
  }

  .bm-player__facts--small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bm-armory .bm-character dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- AccountPanel section layouts (docs/DESIGN.md AccountPanel, 2026-11-25) ----------
   A section is one column inside the panel; short parts that belong together sit in pairs either side of a hairline. */

/* Wallet balances in the sidebar's identity block (account_shell.header_balances): one line per currency. */
.bm-account__balances {
  display: grid;
  margin: 0;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(var(--bm-rim), 0.18);
}

.bm-account__balances[hidden] {
  display: none;
}

.bm-account__balances > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.bm-account__balances dt {
  color: var(--bm-label);
  font: 600 10.5px/1.4 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bm-account__balances dd {
  margin: 0;
  color: var(--bm-numeral);
  font: 500 20px/1.2 var(--bm-numerals);
  font-variant-numeric: lining-nums;
  text-align: right;
}

@media (max-width: 1050px) {
  .bm-account__balances {
    padding: 0;
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .bm-account__balances {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    gap: 4px 12px;
  }

  .bm-account__balances > div {
    display: block;
  }

  .bm-account__balances dd {
    text-align: left;
  }
}

.bm-account-grid {
  display: grid;
  align-items: start;
  gap: 36px;
}

.bm-account-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  background: linear-gradient(180deg, transparent, rgba(var(--bm-rim), 0.26) 14%, rgba(var(--bm-rim), 0.26) 86%, transparent) 50% 0 / 1px 100% no-repeat;
}

.bm-account-grid > .bm-panel + .bm-panel,
.bm-account-grid > * + .bm-panel {
  margin-top: 0;
}

.bm-panel--compact {
  padding: 22px 24px;
}

.bm-account__content .bm-panel h2 small {
  font: 600 12px/1 var(--bm-ui);
  letter-spacing: 0.08em;
  text-transform: none;
}

.bm-panel--compact .bm-list__row {
  min-height: 44px;
  padding: 7px 0;
}

.bm-panel--compact .bm-list__row small {
  white-space: normal;
}

.bm-list--tight .bm-list__row {
  min-height: 0;
  padding: 6px 0;
}

/* One label/value per row in the account (the home page's .bm-facts--compact is two columns). */
.bm-account__content .bm-facts--compact {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.bm-account__content .bm-facts--compact > div {
  padding: 7px 0;
}

.bm-subhead {
  margin: 16px 0 6px;
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bm-small {
  font-size: 13px;
}

.bm-account__content p.bm-small,
.bm-account__content p.bm-muted {
  margin: 8px 0 0;
}

.bm-ok {
  color: var(--bm-success);
}

.bm-panel__more {
  margin: 10px 0 0;
  font-size: 13px;
}

.bm-panel__more a {
  color: var(--bm-gold-text);
  text-decoration: underline;
  text-decoration-color: rgba(var(--bm-gold-line), 0.4);
  text-underline-offset: 3px;
}

.bm-panel__more a:hover,
.bm-panel__more a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-button--compact {
  --bm-button-w: 150px;
}

.bm-form--row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
}

.bm-form--row .bm-field {
  flex: 1 1 160px;
  margin: 0;
}

.bm-account__content .bm-form {
  gap: 14px;
}

.bm-panel--compact .bm-form {
  margin-top: 12px;
}

/* Lining figures: Cormorant's default old-style 1 and 0 read as letters ("1o Green Jaden"). Named one by one because
   each class's font shorthand resets the variant. */
.bm-account .bm-vote__reward,
.bm-account .bm-shop-item__amount,
.bm-account .bm-shop-item__price b,
.bm-account .bm-shop-item__price s,
.bm-account .bm-topup__package strong,
.bm-account .bm-lotto__price,
.bm-account .bm-lotto__amount,
.bm-account .bm-sponsor__total strong,
.bm-account .bm-gach-category summary small {
  font-variant-numeric: lining-nums;
}

.bm-account__content .bm-notice,
.bm-account__content #codes .bm-muted {
  text-align: center;
  text-wrap: balance;
}

.bm-account__content .bm-inline-notice {
  justify-content: center;
  text-align: center;
}

.bm-account__content p + .bm-ready {
  margin-top: 14px;
}

.bm-account__content .bm-table tbody tr:last-child td {
  border-bottom: 0;
}

.bm-account__content .bm-table td:first-child:not(.bm-empty) {
  white-space: nowrap;
}

/* Actions sit under the middle of what they act on. */
.bm-account__content .bm-form > .bm-button,
.bm-account__content .bm-panel > .bm-button {
  justify-self: center;
}

.bm-account__content .bm-form--row {
  justify-content: center;
}

.bm-account__content .bm-form--row .bm-field {
  flex-basis: 130px;
}

.bm-account__content .bm-actions {
  justify-content: center;
}

.bm-account__content .bm-panel__more {
  text-align: center;
}

.bm-account__content .bm-section__head--compact {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  text-align: center;
}

.bm-account__content .bm-section__head--compact .bm-eyebrow {
  margin-bottom: 8px;
}

.bm-account__content .bm-section__head--compact .bm-panel__title {
  margin: 0;
}

.bm-account__content .bm-head-actions {
  justify-content: center;
  gap: 4px 20px;
}

.bm-account__content .bm-head-actions .bm-meta {
  margin: 0;
}

/* Alerts start like every other part: a heading between hairlines, no eyebrow. */
.bm-account__content #notifications-panel > .bm-section__head {
  gap: 4px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.bm-account__content #notifications-panel > .bm-section__head > div:first-child {
  width: 100%;
}

.bm-account__content #notifications-panel .bm-eyebrow {
  display: none;
}

.bm-account__content #notifications-panel .bm-panel__title {
  display: flex;
  align-items: center;
  gap: 14px;
  text-shadow: none;
}

.bm-account__content #notifications-panel .bm-panel__title::before,
.bm-account__content #notifications-panel .bm-panel__title::after {
  content: "";
  flex: 1 1 0;
  min-width: 20px;
  height: 1px;
  background: var(--bm-account-rule);
}

.bm-account__content #notifications-panel .bm-panel__title::after {
  transform: scaleX(-1);
}

.bm-disclosure {
  margin-top: 10px;
}

.bm-disclosure > summary {
  color: var(--bm-gold-text);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.bm-disclosure > summary:hover,
.bm-disclosure > summary:focus-visible {
  color: var(--bm-gold-active);
}

/* Rewards: claim rows, 7-day strip, small wheel, goals with progress. */
.bm-claim--compact {
  flex-wrap: nowrap;
  gap: 16px;
  margin-bottom: 12px;
}

.bm-claim--compact .bm-streak strong {
  font-size: 40px;
}

.bm-claim--compact .bm-claim__done small {
  display: block;
  margin-top: 2px;
}

.bm-day-grid--compact {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
}

.bm-day-grid--compact > li {
  gap: 2px;
  padding: 8px 2px;
}

.bm-day-grid--compact small {
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.bm-day-grid--compact span {
  color: var(--bm-bone);
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.bm-wheel--small {
  flex: none;
  width: 96px;
  max-width: 96px;
}

.bm-wheel--small span {
  max-width: 34%;
  font-size: 9px;
}

.bm-ready {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.bm-ready > .bm-list__row {
  position: relative;
  min-height: 72px;
  padding: 12px 18px;
  border-bottom: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
  transition: box-shadow 150ms ease-out;
}

.bm-ready > .bm-list__row:hover,
.bm-ready > .bm-list__row:focus-within {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.7);
}

/* The whole tile opens its section. */
.bm-ready > .bm-list__row b a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.bm-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
}

.bm-goals > .bm-list__row:nth-last-child(-n + 2):nth-child(odd),
.bm-goals > .bm-list__row:last-child {
  border-bottom: 0;
}

.bm-goals .bm-list__row > span:first-child {
  flex: 1;
}

.bm-ready .bm-button--small,
.bm-goals .bm-button--small {
  --bm-button-w: 112px;
}

.bm-goals .bm-list__row > .bm-small {
  flex: none;
}

.bm-goals .bm-progress {
  margin-top: 4px;
}

.bm-goals .is-claimed b {
  color: var(--bm-label);
}

/* Vote: one card per site. */
.bm-vote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.bm-vote {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 24px 12px 22px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
}

.bm-vote.is-ready {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.55);
  background: linear-gradient(180deg, rgba(var(--bm-crimson), 0.14), transparent 70%), var(--bm-card);
}

.bm-account__content .bm-vote h2 {
  margin: 0;
  font-size: 16px;
}

.bm-vote__reward {
  margin: 0;
  color: var(--bm-numeral);
  font: 500 24px/1.1 var(--bm-numerals);
}

.bm-vote__rule {
  color: var(--bm-label);
  font-size: 12.5px;
}

.bm-vote .bm-button {
  margin-top: 6px;
}

.bm-vote__status {
  margin: 4px 0 0;
  color: var(--bm-label);
  font-size: 13px;
  text-wrap: balance;
}

.bm-vote.is-cooldown .bm-vote__status span {
  color: var(--bm-gold-text);
  font-variant-numeric: tabular-nums;
}

/* Characters: one tile per character, clans under them. */
.bm-account__content .bm-armory {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.bm-account__content .bm-armory__card {
  margin: 0;
  padding: 22px 24px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
}

.bm-account__content .bm-armory__card dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 20px;
}

.bm-account-clans {
  margin-top: 36px;
}

.bm-account-clans .bm-clan-panel {
  margin: 0;
  text-align: center;
}

.bm-account-clans .bm-clan-panel + .bm-clan-panel {
  margin-top: 24px;
}

.bm-account-clans .bm-table-wrap {
  text-align: left;
}

.bm-clan-panel__name {
  margin: 0;
  color: var(--bm-gold-title);
  font: 500 17px/1.3 var(--bm-display);
  letter-spacing: 0.06em;
}

.bm-clan-panel__name a:hover,
.bm-clan-panel__name a:focus-visible {
  color: var(--bm-gold-active);
}

.bm-account-stack {
  display: grid;
  gap: 32px;
}

.bm-account-stack > .bm-panel + .bm-panel {
  margin-top: 0;
}

/* Achievements still to earn: categories in two columns, each opening in place. */
.bm-account__content #open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  align-items: start;
  column-gap: 56px;
}

.bm-account__content #open > h2,
.bm-account__content #open > details[open] {
  grid-column: 1 / -1;
}

/* Referrals and codes read centred; their lists keep rows. */
.bm-account__content .bm-referral > p {
  max-width: 620px;
  margin: 0 auto 12px;
  text-align: center;
  text-wrap: balance;
}

.bm-account__content .bm-referral__link {
  max-width: 620px;
  margin: 0 auto 14px;
}

.bm-account__content .bm-panel > .bm-muted.bm-small,
.bm-account__content .bm-panel > .bm-empty,
.bm-account__content .bm-list > .bm-empty {
  text-align: center;
}

#support-form textarea {
  height: 120px;
  min-height: 96px;
}

@media (max-width: 1439px) {
  .bm-vote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bm-account-grid--2,
  .bm-goals,
  .bm-account__content #open {
    grid-template-columns: minmax(0, 1fr);
    background: none;
  }

  .bm-goals > .bm-list__row:nth-last-child(2) {
    border-bottom: 1px solid rgba(var(--bm-rim), 0.1);
  }

  .bm-account__content .bm-armory__card {
    padding: 18px 16px;
  }

  .bm-account__content .bm-armory__card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bm-panel--compact {
    padding: 18px 16px;
  }

  .bm-claim--compact {
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  .bm-vote-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-account__link:active {
    transform: none;
  }
}

/* ---------- Webshop and Divine Trader (account tabs; docs/DESIGN.md ShopGrid, WalletBar, TraderQuality) ---------- */
.bm-wallet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 28px;
  margin: 0 0 28px;
}
.bm-wallet__balance {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}
.bm-wallet__balance small {
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bm-wallet__balance strong {
  color: var(--bm-numeral);
  font: 500 26px/1 var(--bm-numerals);
}
.bm-wallet__deliver {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.bm-wallet__deliver label {
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bm-wallet__deliver select,
.bm-shop-search input,
.bm-shop-form input,
.bm-shop-item__qty {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  background: rgba(10, 8, 9, 0.62);
  color: var(--bm-bone);
  font: 500 14px/1.3 var(--bm-ui);
}
.bm-wallet__deliver select {
  max-width: 220px;
}
.bm-wallet__deliver select:focus-visible,
.bm-shop-search input:focus-visible,
.bm-shop-form input:focus-visible,
.bm-shop-item__qty:focus-visible {
  outline: 1px solid var(--bm-gold-active);
  outline-offset: -1px;
}
.bm-wallet__save,
.bm-text-button,
.bm-shop-item__btn,
.bm-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.6);
  background: rgba(var(--bm-crimson), 0.12);
  color: var(--bm-gold-label);
  font: 700 12px/36px var(--bm-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.bm-wallet__save:hover,
.bm-text-button:hover,
.bm-shop-item__btn:hover:not(:disabled),
.bm-chip:hover {
  background: rgba(var(--bm-crimson), 0.32);
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
  color: #fff6e6;
}
.bm-wallet__save:active,
.bm-text-button:active,
.bm-shop-item__btn:active:not(:disabled) {
  background: rgba(var(--bm-crimson), 0.48);
}
.bm-wallet__save:focus-visible,
.bm-text-button:focus-visible,
.bm-shop-item__btn:focus-visible,
.bm-chip:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}
.bm-shop-item__btn:disabled,
.bm-wallet__save:disabled,
.bm-text-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.bm-wallet__note {
  font-size: 13px;
  text-align: center;
}
.bm-wallet:has(+ .bm-shop-tabs) {
  margin-bottom: 18px;
}
.bm-shop-tabs {
  justify-content: safe center;
  margin-bottom: 16px;
}
.bm-shop-tabs + .bm-grid,
.bm-shop-tabs + .bm-panel {
  margin-top: 24px;
}
.bm-shop-tabs .bm-nav__link {
  min-width: 112px;
}
.bm-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}
.bm-shop-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bm-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
  line-height: 32px;
  background: transparent;
  color: var(--bm-label);
}
.bm-chip[aria-current] {
  background: rgba(var(--bm-crimson), 0.3);
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
  color: var(--bm-gold-title);
}
.bm-shop-search input {
  width: 240px;
}
.bm-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bm-shop-item {
  display: grid;
  align-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.4);
  background: var(--bm-card);
  transition: box-shadow 150ms ease;
}
.bm-shop-item:hover {
  box-shadow: inset 0 0 0 1px rgba(var(--bm-gold-line), 0.7);
}
.bm-shop-item__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bm-shop-item__head .bm-db-link {
  gap: 10px;
  min-width: 0;
  min-height: 36px;
}
.bm-shop-item__head .bm-db-link__name,
.bm-shop-item__head > .bm-db-link__name {
  overflow: hidden;
  font: 600 13px/1.25 var(--bm-ui);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bm-shop-item__amount {
  margin-left: auto;
  color: var(--bm-numeral);
  font: 500 17px/1 var(--bm-numerals);
  white-space: nowrap;
}
.bm-shop-item__buy {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.bm-shop-item__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: 0 auto 0 0;
  color: var(--bm-label);
  font-size: 12px;
}
.bm-shop-item__price b {
  color: var(--bm-numeral-hi);
  font: 600 18px/1 var(--bm-numerals);
}
.bm-shop-item__price s {
  color: var(--bm-label);
}
.bm-shop-item__price small {
  flex-basis: 100%;
  color: var(--bm-crimson-text);
  font-size: 11px;
}
.bm-shop-item__qty {
  width: 56px;
  min-height: 32px;
  padding: 4px 6px;
  text-align: center;
}
.bm-shop-item__btn {
  min-height: 32px;
  line-height: 32px;
  padding: 0 12px;
}
/* Item quality: the client's own name colours (white, blue, purple, orange) as a rim on the tile. */
.bm-quality {
  font: 700 11px/1.4 var(--bm-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bm-quality--common { color: #e3ddd0; }
.bm-quality--rare { color: #6fb2ff; }
.bm-quality--epic { color: #c38cff; }
.bm-quality--legendary { color: #ffad4d; }
.bm-shop-item--rare { box-shadow: inset 3px 0 0 #6fb2ff, inset 0 0 0 1px rgba(var(--bm-rim), 0.4); }
.bm-shop-item--epic { box-shadow: inset 3px 0 0 #c38cff, inset 0 0 0 1px rgba(var(--bm-rim), 0.4); }
.bm-shop-item--legendary { box-shadow: inset 3px 0 0 #ffad4d, inset 0 0 0 1px rgba(var(--bm-rim), 0.4); }
.bm-trader {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 56px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(var(--bm-rim), 0.26) 14%, rgba(var(--bm-rim), 0.26) 86%, transparent) 50% 0 / 1px 100% no-repeat;
}
.bm-trader .bm-panel {
  margin: 0;
}
.bm-trader .bm-inline-form {
  justify-content: center;
}
.bm-trader__line {
  margin: 0 0 16px;
  text-wrap: balance;
  color: var(--bm-gold-text);
  font: italic 500 17px/1.35 var(--bm-numerals);
}
.bm-trader__progress {
  height: 6px;
  margin: 4px 0 6px;
}
.bm-trader__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--bm-label);
  font-size: 12px;
}
.bm-trader__mine {
  margin-top: 8px;
  font-size: 13px;
}
.bm-trader__deposit p {
  margin: 0 0 8px;
}
.bm-trader__depositor {
  color: var(--bm-gold-title);
}
.bm-trader__deposits {
  display: grid;
  gap: 2px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.bm-trader__deposits li {
  display: flex;
  justify-content: space-between;
  color: var(--bm-label);
}
.bm-trader__deposits b {
  color: var(--bm-success);
}
.bm-trader__stock-head {
  margin: 36px 0 14px;
  text-align: center;
}
.bm-account__content .bm-trader__stock-head h2 {
  margin-bottom: 6px;
}
.bm-trader__stock-head p {
  font-size: 13px;
}
.bm-shop-lumen {
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  margin: 0;
  text-align: center;
}
.bm-shop-lumen .bm-inline-form {
  justify-content: center;
}
.bm-shop-lumen__side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 56px;
  align-items: start;
  background: linear-gradient(180deg, transparent, rgba(var(--bm-rim), 0.26) 14%, rgba(var(--bm-rim), 0.26) 86%, transparent) 50% 0 / 1px 100% no-repeat;
}
.bm-shop-lumen__side > .bm-panel:only-child {
  grid-column: 1 / -1;
}
.bm-shop-lumen__side:has(> .bm-panel:only-child) {
  background: none;
}
.bm-shop-lumen .bm-panel {
  margin: 0;
}
.bm-account__content .bm-shop-lumen p.bm-muted {
  max-width: 560px;
  margin: 0 auto 16px;
  font-size: 13px;
  text-wrap: balance;
}
.bm-shop-form {
  flex-wrap: wrap;
}
.bm-shop-form input {
  flex: 1 1 120px;
  min-width: 0;
  width: auto;
}
.bm-shop-closed {
  margin: 0 0 12px;
}
.bm-topup {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin: 0;
}
.bm-topup__packages {
  width: 100%;
}
.bm-topup__packages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.bm-topup__packages:disabled {
  opacity: 0.6;
}
.bm-topup__package {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 6px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.45);
  background: var(--bm-card);
  cursor: pointer;
  transition: box-shadow 150ms ease;
}
.bm-topup__package input {
  position: absolute;
  opacity: 0;
}
.bm-topup__package strong {
  color: var(--bm-numeral-hi);
  font: 500 24px/1 var(--bm-numerals);
}
.bm-topup__package small {
  color: var(--bm-label);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bm-topup__package span {
  color: var(--bm-gold-text);
  font-size: 13px;
}
.bm-topup__package:hover,
.bm-topup__package:has(input:checked) {
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
}
.bm-topup__package:has(input:checked) {
  background: rgba(var(--bm-crimson), 0.24);
}
.bm-topup__package:has(input:focus-visible) {
  box-shadow: var(--bm-focus);
}
.bm-wallet-history .is-plus {
  color: var(--bm-success);
}
.bm-wallet-history .is-minus {
  color: var(--bm-crimson-text);
}
@media (max-width: 760px) {
  .bm-trader,
  .bm-shop-lumen__side {
    grid-template-columns: minmax(0, 1fr);
    background: none;
  }
  .bm-wallet {
    gap: 8px 18px;
  }
  .bm-wallet__deliver {
    flex-wrap: wrap;
    width: 100%;
  }
  .bm-wallet__deliver label {
    flex-basis: 100%;
    text-align: center;
  }
  .bm-wallet__deliver select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .bm-shop-search,
  .bm-shop-search input {
    width: 100%;
  }
  .bm-shop-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .bm-topup__packages {
    gap: 4px;
  }
  .bm-topup__package {
    padding: 8px 2px;
  }
  .bm-topup__package strong {
    font-size: 19px;
  }
  .bm-topup__package small {
    display: none;
  }
  .bm-topup__package span {
    font-size: 11px;
  }
  .bm-shop-form {
    flex-wrap: wrap;
  }
  .bm-shop-form input {
    flex: 1 1 120px;
    width: auto;
    min-width: 0;
  }
  .bm-shop-form .bm-button {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bm-shop-item,
  .bm-topup__package,
  .bm-chip,
  .bm-shop-item__btn {
    transition: none;
  }
}
@media (max-width: 760px) {
  .bm-shop-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
  }
  .bm-shop-item__head .bm-db-link {
    gap: 8px;
  }
  .bm-shop-item__amount {
    font-size: 15px;
  }
  .bm-shop-item__buy {
    gap: 4px;
  }
  .bm-shop-item__price {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    margin: 0 4px 0 0;
  }
  .bm-shop-item__price .bm-quality {
    font-size: 9px;
  }
  .bm-shop-item__price b {
    font-size: 16px;
    white-space: nowrap;
  }
  .bm-shop-item__qty {
    width: 40px;
    padding: 4px 2px;
  }
  .bm-shop-item__btn {
    padding: 0 8px;
  }
}
.bm-trader--single {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  background: none;
}
.bm-trader__closed {
  margin: 10px 0 0;
  font-size: 13px;
}
/* ---------- Lottery, Sponsor (account tabs; docs/DESIGN.md LotteryCard, SponsorForm) ---------- */
.bm-lotto-grid {
  display: grid;
  gap: 36px;
}
.bm-lotto-grid .bm-panel {
  margin: 0;
  text-align: center;
}
.bm-lotto__head {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.bm-account__content .bm-lotto__head .bm-part-title {
  width: 100%;
  margin: 0;
}
.bm-lotto__price {
  color: var(--bm-numeral-hi);
  font: 600 18px/1 var(--bm-numerals);
}
.bm-lotto__price small {
  color: var(--bm-label);
  font: 500 12px/1 var(--bm-ui);
}
.bm-lotto__prizes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  margin: 14px 0;
  text-align: left;
  padding: 0;
  list-style: none;
}
.bm-lotto__prize {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.25);
  background: rgba(10, 8, 9, 0.35);
}
.bm-lotto__prize .bm-db-link {
  gap: 8px;
  min-width: 0;
  min-height: 38px;
}
.bm-lotto__prize .bm-db-link__name {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bm-lotto__amount {
  color: var(--bm-numeral);
  font: 500 15px/1 var(--bm-numerals);
}
.bm-lotto__chance {
  min-width: 96px;
  color: var(--bm-label);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.bm-lotto__chance .bm-quality {
  font-size: 9.5px;
}
.bm-lotto__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}
.bm-lotto__buy label {
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bm-account__section > .bm-lotto-logs {
  margin-top: 36px;
}
.bm-topup__soon {
  display: block;
}
.bm-sponsor {
  display: grid;
  gap: 36px;
}
.bm-sponsor .bm-panel {
  margin: 0;
}
.bm-sponsor__form form {
  display: grid;
  justify-items: center;
  max-width: 620px;
  margin: 0 auto;
}
.bm-sponsor__form .bm-field {
  width: 100%;
  text-align: center;
}
.bm-sponsor__group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}
.bm-sponsor__group legend {
  width: 100%;
  margin-bottom: 8px;
  text-align: center;
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bm-sponsor__option {
  position: relative;
  cursor: pointer;
}
.bm-sponsor__option input {
  position: absolute;
  opacity: 0;
}
.bm-sponsor__option span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  box-shadow: inset 0 0 0 1px rgba(var(--bm-rim), 0.5);
  color: var(--bm-label);
  font: 600 12px/1 var(--bm-ui);
  transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.bm-sponsor__option:hover span {
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
  color: var(--bm-gold-title);
}
.bm-sponsor__option input:checked + span {
  background: rgba(var(--bm-crimson), 0.3);
  box-shadow: inset 0 0 0 1px var(--bm-gold-active);
  color: var(--bm-gold-title);
}
.bm-sponsor__option input:focus-visible + span {
  box-shadow: var(--bm-focus);
}
.bm-sponsor__anon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  color: var(--bm-label);
  font-size: 13px;
}
.bm-sponsor__total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 12px;
  margin: 0 0 16px;
  text-align: center;
}
.bm-sponsor__total span {
  color: var(--bm-label);
  font: 600 11px/1.4 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bm-sponsor__total strong {
  color: var(--bm-numeral-hi);
  font: 500 28px/1 var(--bm-numerals);
}
.bm-sponsor__total small {
  flex-basis: 100%;
}
.bm-sponsor__now {
  margin: 0 0 4px;
  text-align: center;
  color: var(--bm-gold-title);
  font: 600 15px/1.4 var(--bm-ui);
}
.bm-sponsor__message {
  display: block;
  margin-top: 2px;
  color: var(--bm-gold-text);
  font: italic 500 15px/1.35 var(--bm-numerals);
}
@media (max-width: 760px) {
  .bm-lotto__prizes {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bm-sponsor__option span {
    transition: none;
  }
}
/* Screen-reader-only text inside a scrolling table (position: absolute) must not escape the wrap and widen the page. */
.bm-table-wrap {
  position: relative;
}

/* ---------- Trailer link and VideoShowcase (owner request 2026-11-28; docs/DESIGN.md) ---------- */

/* The crimson play medallion shared by the hero link and the showcase stage. */
.bm-trailer__play {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(var(--bm-gold-line), 0.85);
  border-radius: 50%;
  background: rgba(var(--bm-crimson), 0.78);
  color: var(--bm-gold-label);
  box-shadow: 0 0 0 6px rgba(5, 5, 5, 0.45), 0 6px 24px rgba(0, 0, 0, 0.6);
  transition: transform 150ms ease-out, background-color 150ms ease-out;
}

.bm-trailer__play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}

.bm-trailer__play--small {
  width: 46px;
  height: 46px;
  box-shadow: 0 0 0 4px rgba(5, 5, 5, 0.45);
}

.bm-trailer__play--small svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

/* Hero link: "Watch the trailer" under the hero buttons, opening a dialog. */
.bm-trailer-cta {
  flex-basis: 100%;
}

.bm-trailer-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bm-gold-title);
  cursor: pointer;
}

.bm-trailer-cta__button:hover .bm-trailer__play,
.bm-trailer-cta__button:focus-visible .bm-trailer__play {
  transform: scale(1.06);
  background: rgba(var(--bm-crimson), 0.95);
}

.bm-trailer-cta__button:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-trailer-cta__label {
  font: 600 13px/1 var(--bm-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: var(--bm-chrome-shadow);
}

.bm-trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bm-ink-950);
  outline: 1px solid rgba(var(--bm-gold-line), 0.35);
}

.bm-trailer__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.bm-trailer-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}

.bm-trailer-dialog[open] {
  animation: bm-dialog-in 250ms ease-out;
}

.bm-trailer-dialog::backdrop {
  background: rgba(4, 4, 4, 0.86);
}

@keyframes bm-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

.bm-trailer-dialog__box {
  position: relative;
}

.bm-trailer-dialog__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--bm-gold-line), 0.5);
  background: rgba(5, 5, 5, 0.6);
  color: var(--bm-gold-title);
  font: 400 24px/1 var(--bm-ui);
  cursor: pointer;
}

/* Showcase */
/* The band from the top of the showcase down to its hairline (owner 2026-11-28; a grain texture here was tried and
   removed the same day). */
/* 34px plus the hero's own 22px bottom padding: 56px above the row, matching the 56px under it. */
.bm-showcase-band {
  padding-top: 34px;
}

/* Inset from the page gutter (owner request 2026-11-28). */
.bm-showcase {
  margin: 0 calc(var(--bm-gutter) + clamp(0px, 4.5vw, 72px));
}

/* The hairline between the showcase and the three columns, like the realm strip's. */
.bm-showcase-rule {
  margin: 56px var(--bm-gutter) 0;
  border-top: 1px solid rgba(var(--bm-rim), 0.18);
}

/* The band ends at its hairline; the columns keep their own top padding. */

.bm-showcase__main {
  display: grid;
  grid-template-columns: 150px minmax(0, 620px) minmax(260px, 380px);
  justify-content: center; /* centred as a group in the band (owner 2026-11-28) */
  align-items: center;
  gap: 36px;
}

/* Stage: every poster stacked in one 16:9 box; the chosen one crossfades in, the iframe fades in over it once loaded. */
.bm-showcase__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bm-ink-950);
  outline: 1px solid rgba(var(--bm-gold-line), 0.38);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.bm-showcase__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  filter: brightness(0.82) saturate(0.95);
  transition: opacity 250ms ease-out, transform 300ms ease-out, filter 200ms ease-out;
}

.bm-showcase__poster.is-active {
  opacity: 1;
  transform: none;
}

.bm-showcase.is-playing .bm-showcase__poster {
  filter: brightness(0.5) blur(6px);
}

.bm-showcase__poster--plain,
.bm-showcase__plain {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(var(--bm-crimson), 0.28), transparent 65%), var(--bm-ink-850);
  color: var(--bm-gold-title);
  font: 500 22px/1 var(--bm-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The play control covers the stage; the medallion sits lower left, clear of the title on the official posters. */
.bm-showcase__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 0 0 6% 5%;
  border: 0;
  background: linear-gradient(0deg, rgba(5, 5, 5, 0.45), rgba(5, 5, 5, 0) 45%);
  color: var(--bm-gold-label);
  cursor: pointer;
}

.bm-showcase__play:hover .bm-trailer__play,
.bm-showcase__play:focus-visible .bm-trailer__play {
  transform: scale(1.06);
  background: rgba(var(--bm-crimson), 0.95);
}

.bm-showcase__play:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(var(--bm-gold-line), 0.9);
}

.bm-showcase__play-label {
  margin-bottom: 30px;
  font: 600 13px/1 var(--bm-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: var(--bm-chrome-shadow);
}

.bm-showcase__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 250ms ease-out;
}

.bm-showcase__stage.is-loaded .bm-showcase__video {
  opacity: 1;
}

/* Card beside the stage: all cards share one grid cell, so switching never moves the layout. */
.bm-showcase__info {
  display: grid;
}

.bm-showcase__card {
  grid-area: 1 / 1;
  align-self: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease-in, transform 200ms ease-in, visibility 0s linear 200ms;
}

.bm-showcase__card.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 250ms ease-out 60ms, transform 250ms ease-out 60ms, visibility 0s;
}

.bm-showcase__kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--bm-label);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bm-showcase__badge {
  padding: 6px 10px;
  border: 1px solid rgba(var(--bm-crimson), 0.7);
  background: rgba(var(--bm-crimson), 0.18);
  color: var(--bm-gold-label);
}

.bm-showcase__badge--community {
  border-color: rgba(var(--bm-gold-line), 0.55);
  background: rgba(var(--bm-gold-line), 0.1);
}

.bm-showcase__title {
  margin: 18px 0 14px;
  color: var(--bm-bone);
  font: 500 32px/1.15 var(--bm-display-hero);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.bm-showcase__lead,
.bm-showcase__by {
  margin: 0;
  max-width: 44ch;
  color: var(--bm-label);
  font: 400 16px/1.6 var(--bm-ui);
}

.bm-showcase__by {
  font-size: 14px;
}

.bm-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

/* Filmstrip */
/* Wide screens: the filmstrip is a column left of the stage, exactly as tall as the row (it adds no height of its own)
   and scrolling up and down (owner 2026-11-28). Narrower screens put it back under the card as a swipe strip. */
.bm-showcase__rail {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 0;
  min-height: 100%;
}

.bm-showcase__rail .bm-showcase__arrow svg {
  transform: rotate(90deg);
}

.bm-showcase__rail .bm-showcase__strip {
  flex: 1;
  min-height: 0;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: 12px;
  padding: 6px 5px 6px 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
  scroll-padding: 6px 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.bm-showcase__rail .bm-showcase__strip.at-start {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
}

.bm-showcase__rail .bm-showcase__strip.at-end:not(.at-start) {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28px);
  mask-image: linear-gradient(180deg, transparent 0, #000 28px);
}

.bm-showcase__rail .bm-showcase__strip.at-start.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

.bm-showcase__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.bm-showcase__count {
  margin: 0 6px 0 0;
  color: var(--bm-label);
  font: 500 14px/1 var(--bm-numerals);
  letter-spacing: 0.08em;
}

.bm-showcase__arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--bm-gold-line), 0.5);
  background: rgba(5, 5, 5, 0.5);
  color: var(--bm-gold-title);
  cursor: pointer;
  transition: border-color 150ms ease-out, background-color 150ms ease-out, opacity 150ms ease-out;
}

.bm-showcase__arrow svg {
  width: 13px;
  height: 13px;
}

.bm-showcase__arrow:hover:not(:disabled),
.bm-showcase__arrow:focus-visible {
  border-color: rgba(var(--bm-gold-line), 0.95);
  background: rgba(var(--bm-crimson), 0.3);
}

.bm-showcase__arrow:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-showcase__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.bm-showcase__strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 136px;
  gap: 12px;
  margin: 0;
  padding: 5px 2px 10px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--bm-rim), 0.5) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.bm-showcase__strip.at-start {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
}

.bm-showcase__strip.at-start.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

.bm-showcase__strip.at-end:not(.at-start) {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px);
  mask-image: linear-gradient(90deg, transparent 0, #000 40px);
}

.bm-showcase__strip > li {
  scroll-snap-align: start;
  min-width: 0;
}

.bm-showcase__thumb {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bm-showcase__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 4px;
  background: var(--bm-ink-850);
  outline: 1px solid rgba(var(--bm-rim), 0.45);
  transition: transform 150ms ease-out, outline-color 150ms ease-out, box-shadow 200ms ease-out;
}

.bm-showcase__thumb img,
.bm-showcase__thumb .bm-showcase__plain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.78) saturate(0.9);
  transition: filter 150ms ease-out;
}

.bm-showcase__thumb .bm-showcase__plain {
  font-size: 15px;
}

.bm-showcase__thumb:hover .bm-showcase__frame,
.bm-showcase__thumb:focus-visible .bm-showcase__frame {
  transform: translateY(-2px);
  outline-color: rgba(var(--bm-gold-line), 0.75);
}

.bm-showcase__thumb:hover img,
.bm-showcase__thumb:focus-visible img,
.bm-showcase__thumb.is-active img {
  filter: none;
}

.bm-showcase__thumb:focus-visible {
  outline: none;
}

.bm-showcase__thumb:focus-visible .bm-showcase__frame {
  box-shadow: var(--bm-focus);
}

.bm-showcase__thumb.is-active .bm-showcase__frame {
  outline: 2px solid rgba(var(--bm-gold-line), 0.95);
  box-shadow: 0 0 0 3px rgba(var(--bm-crimson), 0.28), 0 8px 20px rgba(0, 0, 0, 0.5);
}

.bm-showcase__tag {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 3px 5px;
  background: rgba(5, 5, 5, 0.72);
  color: var(--bm-label);
  font: 600 8.5px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bm-showcase__tag.is-official {
  background: rgba(var(--bm-crimson), 0.85);
  color: var(--bm-gold-label);
}

/* "Now playing" with three bars, shown on the chosen thumbnail while its video plays. */
.bm-showcase__now {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 12px 6px 5px;
  background: linear-gradient(0deg, rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0));
  color: var(--bm-gold-label);
  font: 600 8.5px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.bm-showcase__now i {
  width: 2px;
  height: 8px;
  background: rgba(var(--bm-crimson), 1);
  transform-origin: bottom;
  animation: bm-eq 900ms ease-in-out infinite;
}

.bm-showcase__now i:nth-child(2) {
  animation-delay: -300ms;
}

.bm-showcase__now i:nth-child(3) {
  margin-right: 6px;
  animation-delay: -600ms;
}

@keyframes bm-eq {
  0%, 100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

.bm-showcase.is-playing .bm-showcase__thumb.is-active .bm-showcase__now {
  opacity: 1;
  transform: none;
}

.bm-showcase__thumb-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--bm-steel-text);
  font: 600 11.5px/1.3 var(--bm-ui);
  overflow-wrap: anywhere;
}

.bm-showcase__thumb.is-active .bm-showcase__thumb-title {
  color: var(--bm-gold-title);
}

.bm-showcase__thumb-by {
  color: var(--bm-label);
  font: 500 10.5px/1.3 var(--bm-ui);
}

.bm-showcase__thumb--share .bm-showcase__frame {
  display: grid;
  place-items: center;
  outline-style: dashed;
  outline-color: rgba(var(--bm-gold-line), 0.45);
  background: radial-gradient(ellipse at 50% 50%, rgba(var(--bm-crimson), 0.2), transparent 70%), var(--bm-ink-850);
}

.bm-showcase__plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--bm-gold-line), 0.7);
  border-radius: 50%;
  color: var(--bm-gold-title);
  font: 300 19px/1 var(--bm-ui);
  transition: transform 150ms ease-out, background-color 150ms ease-out;
}

.bm-showcase__thumb--share:hover .bm-showcase__plus,
.bm-showcase__thumb--share:focus-visible .bm-showcase__plus {
  transform: rotate(90deg);
  background: rgba(var(--bm-crimson), 0.45);
}

/* Wide screens: one compact group, centred: the "up next" list, the stage (at most 500px) and the card, each anchored
   to the stage (owner 2026-11-28). */
@media (min-width: 1341px) {
  .bm-showcase {
    margin: 0 var(--bm-gutter);
  }

  .bm-showcase__main {
    grid-template-columns: 290px minmax(0, 500px) 320px;
    justify-content: center;
    gap: 32px;
  }

  /* An "up next" list (thumbnail, then title and author beside it), so it weighs as much as the card on the right
     (owner 2026-11-28). */
  .bm-showcase__rail .bm-showcase__strip {
    gap: 10px;
  }

  .bm-showcase__rail .bm-showcase__thumb {
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 12px;
    row-gap: 3px;
    align-items: start;
  }

  .bm-showcase__rail .bm-showcase__frame {
    grid-row: 1 / 4;
    margin-bottom: 0;
  }

  .bm-showcase__rail .bm-showcase__thumb-title {
    padding-top: 2px;
    font-size: 12.5px;
  }

  .bm-showcase__rail .bm-showcase__thumb-by {
    font-size: 11px;
  }

}

@media (max-width: 1024px) {
  .bm-showcase__main {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .bm-showcase__rail {
    display: block;
    order: 3;
    height: auto;
    min-height: 0;
  }

  .bm-showcase__rail .bm-showcase__arrow svg {
    transform: none;
  }

  /* Back to the horizontal swipe strip. */
  .bm-showcase__rail .bm-showcase__strip {
    grid-auto-flow: column;
    grid-auto-columns: 136px;
    grid-template-columns: none;
    grid-auto-rows: auto;
    padding: 5px 2px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 2px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  }

  .bm-showcase__rail .bm-showcase__strip.at-start {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
  }

  .bm-showcase__rail .bm-showcase__strip.at-end:not(.at-start) {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px);
    mask-image: linear-gradient(90deg, transparent 0, #000 40px);
  }
}

@media (max-width: 680px) {
  .bm-showcase-band {
    padding-top: 0; /* the hero and realm strip already leave 48px on phones */
  }

  .bm-showcase {
    margin: 0 var(--bm-gutter);
  }

  .bm-showcase-rule {
    margin-top: 48px;
  }

  .bm-showcase__title {
    margin-top: 14px;
    font-size: 24px;
  }

  .bm-showcase__lead {
    font-size: 15px;
  }

  .bm-showcase__strip {
    grid-auto-columns: 128px;
    gap: 10px;
  }

  .bm-trailer__play {
    width: 56px;
    height: 56px;
  }

  .bm-trailer__play svg {
    width: 26px;
    height: 26px;
  }

  .bm-showcase__play-label {
    margin-bottom: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-trailer__play,
  .bm-trailer-dialog[open],
  .bm-showcase__poster,
  .bm-showcase__video,
  .bm-showcase__card,
  .bm-showcase__card.is-active,
  .bm-showcase__frame,
  .bm-showcase__thumb img,
  .bm-showcase__now,
  .bm-showcase__plus,
  .bm-showcase__arrow {
    animation: none;
    transition: none;
  }

  .bm-showcase__now i {
    animation: none;
    transform: none;
  }

  .bm-showcase__strip {
    scroll-behavior: auto;
  }
}

/* ---------- SocialRail (owner request 2026-11-28; docs/DESIGN.md) ---------- */

.bm-social {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px 8px;
  background: linear-gradient(180deg, rgba(20, 14, 15, 0.9), rgba(8, 8, 8, 0.9));
  outline: 1px solid rgba(var(--bm-rim), 0.55);
  box-shadow: inset 0 1px 0 rgba(var(--bm-gold-line), 0.35), inset 0 -1px 0 rgba(var(--bm-gold-line), 0.2), 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.bm-social__label {
  /* Rotated half a turn to read bottom-up, so the top border lands under the word. */
  margin-bottom: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(var(--bm-gold-line), 0.3);
  color: var(--bm-label);
  font: 600 9.5px/1 var(--bm-ui);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Chinese reads top-down upright, so no half turn. */
.bm-social__label:lang(zh-Hans) {
  padding: 0 0 10px;
  border-top: 0;
  border-bottom: 1px solid rgba(var(--bm-gold-line), 0.3);
  font-size: 11px;
  letter-spacing: 0.3em;
  transform: none;
}

.bm-social__link {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--bm-gold-label);
  transition: color 150ms ease-out, background-color 150ms ease-out;
}

.bm-social__link svg {
  width: 19px;
  height: 19px;
  opacity: 0.85;
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

a.bm-social__link:hover,
a.bm-social__link:focus-visible {
  background: rgba(var(--bm-crimson), 0.22);
}

a.bm-social__link:hover svg,
a.bm-social__link:focus-visible svg {
  opacity: 1;
  transform: scale(1.12);
}

.bm-social__link--bilibili:hover,
.bm-social__link--bilibili:focus-visible {
  color: #4fc3f7;
}

.bm-social__link--youtube:hover,
.bm-social__link--youtube:focus-visible {
  color: #ff4e45;
}

.bm-social__link:focus-visible {
  outline: none;
  box-shadow: var(--bm-focus);
}

.bm-social__link.is-disabled {
  color: var(--bm-label);
  cursor: not-allowed;
}

.bm-social__link.is-disabled svg {
  opacity: 0.32;
}

/* The name slides out to the left on hover or focus. */
.bm-social__tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  padding: 7px 10px;
  background: rgba(8, 8, 8, 0.94);
  outline: 1px solid rgba(var(--bm-rim), 0.55);
  color: var(--bm-gold-label);
  font: 600 11px/1 var(--bm-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(6px, -50%);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

.bm-social__link.is-disabled .bm-social__tip {
  color: var(--bm-label);
}

.bm-social__link:hover .bm-social__tip,
.bm-social__link:focus-visible .bm-social__tip {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Shown only where the page gutter has room for it; the footer carries the same links everywhere. */
@media (min-width: 1100px) {
  .bm-social {
    display: flex;
  }
}

@media (min-width: 1100px) and (max-width: 1340px) {
  .bm-social {
    right: 12px;
    padding-inline: 4px;
  }

  .bm-social__link {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-social__link,
  .bm-social__link svg,
  .bm-social__tip {
    transition: none;
  }
}
