/* Deck builder catalog pane (.prd/19 C1, C6, C7) — R1 by WU0, owned by WU1 from R2. Numbers: fixture
   viewports.1920x1080.empty (catalogToolbar, tabNav, tab*, summary, search, viewBtn, filterBtn, grid,
   card0*, loadMore) and the reference stylesheet offsets in .prd/19 C6. */

.db-catalog {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Sticky toolbar: 64 tall (2px padding, two 28px rows 4px apart), under our header. */
.db-catalog-toolbar {
  position: sticky;
  top: var(--db-header-h);
  z-index: 10;
  display: grid;
  gap: 4px;
  padding: 2px 8px;
  background: color-mix(in oklab, var(--background) 78%, transparent);
  box-shadow: 0 14px 26px -27px rgba(0, 0, 0, 0.55);
}

.db-catalog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.db-catalog-row + .db-catalog-row {
  gap: 8px;
}

/* C1 tabs: 28 tall, 13px/500, radius 4, aria-pressed. */
.db-catalog-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  padding-right: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.deck-builder .db-catalog-tab {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklab, var(--background) 95%, transparent);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.deck-builder .db-catalog-tab[aria-pressed="true"] {
  border-color: transparent;
  background: var(--foreground);
  color: var(--background);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.db-catalog-summary {
  flex: none;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.db-catalog-search-wrap {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.db-catalog-search-wrap .db-catalog-search-icon {
  position: absolute;
  top: 7px;
  left: 12px;
  color: var(--muted-foreground);
  pointer-events: none;
}

.deck-builder .db-catalog-search {
  width: 100%;
  height: 28px;
  padding: 0 40px 0 36px;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklab, var(--background) 95%, transparent);
  color: var(--foreground);
  font-size: 14px;
  line-height: 20px;
}

/* The search sits in a <label>, which styles.css sets to 11px/850 uppercase: the field and its placeholder
   are 14px/400 (fixture viewports.1920x1080.empty.search.style). */
.deck-builder .db-catalog-search,
.deck-builder .db-filter-list-search {
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.deck-builder .db-catalog-search::placeholder {
  color: var(--muted-foreground);
}

/* focus:border-foreground/30 (outline dump: the search input's class). */
.deck-builder .db-catalog-search:focus {
  border-color: color-mix(in oklab, var(--foreground) 30%, transparent);
  outline: none;
}

.deck-builder .db-catalog-search::-webkit-search-cancel-button {
  appearance: none;
}

.deck-builder .db-catalog-search-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  transform: translateY(-50%);
  cursor: pointer;
}

.deck-builder .db-catalog-search-clear:hover {
  color: var(--foreground);
}

/* View (66.8 × 28) and Filter (79.8 × 28); their popovers are C4 / C5 (R2). */
.deck-builder .db-catalog-tool {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklab, var(--background) 95%, transparent);
  color: color-mix(in oklab, var(--foreground) 72%, transparent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.deck-builder .db-catalog-tool.is-filter {
  padding: 0 12px;
  font-size: 14px;
}

/* C6 grid: 2 columns below 40rem; from 40rem auto-fill on the active card-min [CSS :242352], which is
   the -wide clamp from 1920px [CSS :180378, :240196]. The clamps themselves are inline on the grid. */
.db-catalog-grid {
  --deck-workspace-catalog-active-card-min: var(--deck-workspace-catalog-card-min);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 40rem) {
  .db-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--deck-workspace-catalog-active-card-min)), 1fr));
  }
}

@media (min-width: 1920px) {
  .db-catalog-grid {
    --deck-workspace-catalog-active-card-min: var(--deck-workspace-catalog-card-min-wide);
  }
}

/* A portrait card is at most 16.5rem (19rem from 1920px) [CSS :32214, :240098]; a battlefield 24rem
   (28rem) [CSS :32318, :240147]. The 1px border sits outside the art, whose box is 488/680 [CSS :23449]
   (battlefield 1.5/1). */
.db-catalog-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 16.5rem;
}

.db-catalog-card.is-battlefield {
  max-width: 24rem;
}

@media (min-width: 1920px) {
  .db-catalog-card {
    max-width: 19rem;
  }

  .db-catalog-card.is-battlefield {
    max-width: 28rem;
  }
}

.deck-builder .db-card-button {
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

.deck-builder .db-card-button:hover,
.deck-builder .db-card-button:focus-visible {
  border-color: color-mix(in oklab, var(--border) 70%, transparent);
  outline: none;
}

.db-card-aspect {
  display: block;
  aspect-ratio: 488 / 680;
}

.db-catalog-card.is-battlefield .db-card-aspect {
  aspect-ratio: 1.5 / 1;
}

.db-card-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 26px -22px rgba(0, 0, 0, 0.82);
}

.db-card-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The empty / no-match message: a dashed box where the grid would start (fixture
   catalog.tabs.emptyTabMessages.*.msgs[0]: "rounded-lg border border-dashed border-border px-3 py-6 text-sm
   text-muted-foreground", 1060.5 × 70 at the grid's top). */
.db-catalog-empty {
  margin: 16px 0 0;
  padding: 24px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 20px;
}

/* "Load 24 more cards" 166 × 40, 14px/600, radius 6, centred 24px under the grid. */
.deck-builder .db-catalog-load-more {
  display: flex;
  align-items: center;
  align-self: center;
  height: 40px;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 0 16px;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--background) 95%, transparent);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

/* ======================================================================================== R2 (WU1) */

/* C1 tab rail: the tabs' wrapper (`relative min-w-0 flex-1`, outline dumps). On the desktop toolbar the
   tabs wrap (flex-wrap) and the rail button is absent; the phone rail is P1 below. */
.db-catalog-rail {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.deck-builder .db-catalog-rail-next {
  display: none;
}

@media (min-width: 64rem) {
  .db-catalog-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* The View button's text and the phone-only glyph of the Filter button (P1). */
.deck-builder .db-catalog-tool .db-catalog-tool-compact {
  display: none;
}

.deck-builder .db-catalog-tool svg.lucide {
  width: 16px;
  height: 16px;
}

.deck-builder .db-catalog-tool .db-catalog-tool-chevron {
  width: 14px;
  height: 14px;
}

.deck-builder .db-catalog-tool[aria-expanded="true"] {
  background: var(--secondary);
  color: var(--foreground);
}

/* Open, the Filter chevron points up (screenshot 07). */
.deck-builder .db-catalog-tool[aria-expanded="true"] .db-catalog-tool-chevron {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------------- P1 phone toolbar (< 64rem) */
/* fixture viewports.390x844.empty: toolbar 98 tall, padding 6/8, rows 6 apart; tabs 36 tall on a
   horizontal rail with "Scroll catalog sections right" (40 × 40, absolute right, centred; a 28 × 28 round
   knob, chevron-right 16); summary "57/57" 10px/500 tabular; search 44 tall; View / Filter 44 × 44 icon
   buttons (arrow-up-down / sliders-horizontal 16). */
@media (max-width: 63.999rem) {
  .db-catalog-toolbar {
    gap: 6px;
    padding: 6px 8px;
  }

  .db-catalog-tabs {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .db-catalog-tabs::-webkit-scrollbar {
    display: none;
  }

  .deck-builder .db-catalog-tab {
    height: 36px;
  }

  .deck-builder .db-catalog-rail-next {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 40px;
    height: 40px;
    padding-right: 4px;
    transform: translateY(-50%);
    background-image: linear-gradient(to left, var(--background) 0%, color-mix(in oklab, var(--background) 95%, transparent) 50%, transparent 100%);
    color: var(--foreground);
  }

  .db-catalog-rail-knob {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid color-mix(in oklab, var(--border) 75%, transparent);
    border-radius: 999px;
    background: color-mix(in oklab, var(--background) 95%, transparent);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  }

  .deck-builder .db-catalog-rail-knob svg.lucide {
    width: 16px;
    height: 16px;
  }

  .db-catalog-summary {
    font-size: 10px;
    font-weight: 500;
    line-height: 15px;
    font-variant-numeric: tabular-nums;
  }

  .deck-builder .db-catalog-search {
    height: 44px;
  }

  .db-catalog-search-wrap .db-catalog-search-icon {
    top: 14px;
  }

  .deck-builder .db-catalog-tool,
  .deck-builder .db-catalog-tool.is-filter {
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .deck-builder .db-catalog-tool .db-catalog-tool-text,
  .deck-builder .db-catalog-tool .db-catalog-tool-chevron {
    display: none;
  }

  .deck-builder .db-catalog-tool .db-catalog-tool-compact {
    display: block;
  }
}

/* ------------------------------------------------------------------- C4 grouped catalog */
/* Reference DOM: div.space-y-4 > section.space-y-2 > div.grid.gap-4 > grid. The group header is [추정]:
   the catalog grouping was never opened; this is the workspace's group header (W2: h3 12px/600/0.18em
   uppercase + "N cards" 12px muted, bottom border border/60, pb 8). */
.db-catalog-groups {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.db-catalog-groups .db-catalog-grid {
  margin-top: 0;
}

.db-catalog-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.db-catalog-group-grid {
  display: grid;
  gap: 16px;
}

.db-catalog-group-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

.db-catalog-group-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.db-catalog-group-count {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 16px;
}

/* ------------------------------------------------------------------- C10 ×N, C11 Banned */
/* fixture catalog.inDeckBadge.html / catalog.bannedBadge: the badges stack (flex-col, items-end, gap 4) at
   right 6px, top 15% of a portrait card and 21% of a battlefield (screenshot 23: ×1 above Banned on
   Aspirant's Climb). */
.db-card-badges {
  position: absolute;
  top: 15%;
  right: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: calc(100% - 0.75rem);
  pointer-events: none;
}

.db-catalog-card.is-battlefield .db-card-badges {
  top: 21%;
}

.db-card-copies {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 30%, rgb(10 14 24 / 0.9));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.db-card-banned {
  display: block;
  height: 22px;
  max-width: 100%;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid rgba(255, 142, 142, 0.4);
  border-radius: 999px;
  background: rgba(110, 18, 30, 0.88);
  color: rgba(255, 226, 226, 0.96);
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

/* ------------------------------------------------------------------- C7 / C8 hover actions + P1 bar */
/* The action bar (Add · Bookmark · Details) is the reference's `lg:contents` block: below 64rem a 42px dark
   bar tucked 11px under the card (fixture viewports.390x844.empty.mobileActions: 179 × 42, bg rgb(12,18,28),
   pt 10, radius 0 0 10 10; buttons 44 × 32, radius 4, white/75); from 64rem its bookmark (44 × 44, top 0,
   right 44px) and details (32 × 32, bottom 8, right 8) sit on the card and fade in on hover (fixture
   catalog.cardHover: opacity 0 → 1; viewports.1920x1080.empty.card0Bookmark / card0Details). */
.db-card-badges[hidden] {
  display: none;
}

.deck-builder .db-card-action,
.deck-builder .db-card-bookmark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border-radius: calc(var(--radius) - 2px);
  color: inherit;
  cursor: pointer;
}

.deck-builder .db-card-action:hover,
.deck-builder .db-card-bookmark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.deck-builder .db-card-action:focus-visible,
.deck-builder .db-card-bookmark:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 0;
}

.deck-builder .db-card-action svg.lucide {
  width: 16px;
  height: 16px;
}

.deck-builder .db-card-details svg.lucide {
  width: 14px;
  height: 14px;
}

/* The ribbon: 24 × 32 (phone 14 × 20), gradient #777983 → #595b65 → #41434c, a 1px highlight line and a
   dot (outline dumps); hovering the bookmark grows it to 40 (fixture catalog.bookmark.ribbonH). The notch
   and the bookmarked tan (#c6b8a1 → #7b6d5a) are read off screenshots 08 / 10 [추정]. */
.db-ribbon {
  position: relative;
  display: block;
  width: 14px;
  height: 20px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.42));
  transition: height 0.2s ease-out, filter 0.2s ease-out;
}

.db-ribbon::before {
  position: absolute;
  inset: 0;
  border-radius: 2px 2px 0 0;
  background-image: linear-gradient(to bottom, #777983, #595b65, #41434c);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.12), inset -1px 0 rgba(13, 17, 28, 0.3);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%);
  content: "";
}

.db-card-bookmark[aria-pressed="true"] .db-ribbon::before {
  background-image: linear-gradient(to bottom, #c6b8a1, #a08d72, #7b6d5a);
}

.db-ribbon-line {
  position: absolute;
  top: 4px;
  right: 4px;
  left: 4px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 0 rgba(20, 24, 35, 0.34);
}

.db-ribbon-dot {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
}

.db-card-bookmark:hover .db-ribbon {
  filter: drop-shadow(0 5px 3px rgba(0, 0, 0, 0.46)) brightness(1.1);
}

@media (max-width: 63.999rem) {
  .deck-builder .db-card-button {
    z-index: 10;
  }

  .db-card-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    height: 42px;
    margin: -11px 1px 0;
    padding-top: 10px;
    border-radius: 0px 0px 10px 10px;
    background: #0c121c;
    color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 26px -22px rgba(0, 0, 0, 0.82);
  }
}

@media (min-width: 64rem) {
  .db-card-actions {
    display: contents;
  }

  .deck-builder .db-card-mobile-add {
    display: none;
  }

  .db-card-bookmark-anchor {
    position: absolute;
    top: 0;
    right: 44px;
    z-index: 10;
    pointer-events: none;
  }

  .deck-builder .db-card-bookmark {
    align-items: flex-start;
    height: 44px;
    border-radius: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
  }

  .deck-builder .db-card-bookmark:hover {
    background: transparent;
  }

  .db-ribbon {
    width: 24px;
    height: 32px;
  }

  .db-card-bookmark:hover .db-ribbon,
  .db-card-bookmark:focus-visible .db-ribbon {
    height: 40px;
  }

  .db-card-details-anchor {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 10;
    pointer-events: none;
  }

  .deck-builder .db-card-details {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 13, 24, 0.88);
    color: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: background-color 0.15s, opacity 0.15s;
  }

  .deck-builder .db-card-details:hover {
    background: rgba(8, 13, 24, 0.95);
  }

  /* Hover or keyboard focus inside the card reveals both; a bookmarked card keeps its ribbon [추정]. */
  .db-catalog-card:hover .db-card-bookmark,
  .db-catalog-card:has(:focus-visible) .db-card-bookmark,
  .deck-builder .db-card-bookmark[aria-pressed="true"],
  .db-catalog-card:hover .db-card-details,
  .db-catalog-card:has(:focus-visible) .db-card-details {
    opacity: 1;
    pointer-events: auto;
  }

  .db-catalog-card:hover .db-card-button {
    border-color: color-mix(in oklab, var(--border) 70%, transparent);
  }
}

/* A touch screen has no hover: the ribbon and the details button stay shown ([@media(any-pointer:coarse)]
   classes in the fixture's card markup). */
@media (min-width: 64rem) and (any-pointer: coarse) {
  .deck-builder .db-card-bookmark,
  .deck-builder .db-card-details {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ------------------------------------------------------------------- C9 details dialog */
/* fixture catalog.detailsDialog: 1024 × 609.5 centred (max-w-5xl, max-h min(94vh, 58rem)), radius 16,
   border border/60, bg background, shadow 0 32px 80px rgba(0,0,0,.46); × "Close card details" 36 × 36 at
   15 / 20 from the corner; card image 360 × 501.6 at 20 / 20 inside the body, the facts 32px right of it;
   "Full card page" 136.7 × 36 at the right. Type sizes are read off screenshot 09 [추정]. */
.db-cd-layer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.db-cd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.db-cd-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 64rem;
  max-height: min(94vh, 58rem);
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-radius: 16px;
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.46);
  outline: none;
}

.db-cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 0 20px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

.db-cd-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.db-cd-type,
.db-cd-label {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.deck-builder .db-cd-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  cursor: pointer;
}

.deck-builder .db-cd-close:hover {
  background: var(--secondary);
}

.deck-builder .db-cd-close svg.lucide {
  width: 18px;
  height: 18px;
}

.db-cd-body {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  overflow-y: auto;
  padding: 20px;
}

.db-cd-art {
  min-width: 0;
}

.db-cd-image {
  display: block;
  width: 360px;
  max-width: 100%;
  aspect-ratio: 360 / 501.6;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.db-cd-main {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 0;
}

.db-cd-stats {
  display: flex;
  gap: 24px;
  padding: 0 0 12px;
}

.db-cd-stat {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.db-cd-stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  font-style: italic;
}

.db-cd-subtypes {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0 24px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

.db-cd-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  line-height: 18px;
}

.db-cd-section {
  padding: 16px 0 20px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

/* The rules' Might icons sit on lines 24.7 apart, the first 37 under the section rule (fixture
   catalog.detailsDialog.imgs "Might" y 466.3 / 491.0); the info links 37 apart (SET 585.5, DOMAINS 622.5). */
.db-cd-rules {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.65;
}

.db-cd-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin: 12px 0 0;
}

.db-cd-info-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: baseline;
  min-height: 37px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 50%, transparent);
}

.db-cd-value {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.db-cd-value.is-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 13px;
}

.db-cd-link {
  color: var(--foreground);
  text-decoration: none;
}

.db-cd-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.db-cd-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.db-cd-full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.db-cd-full:hover {
  background: var(--secondary);
}

.deck-builder .db-cd-full svg.lucide {
  width: 16px;
  height: 16px;
}

@media (max-width: 47.999rem) {
  .db-cd-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .db-cd-image {
    margin: 0 auto;
  }

  .db-cd-info {
    grid-template-columns: minmax(0, 1fr);
  }
}
