/* Deck workspace views (.prd/19 W1–W8, L5) — WU2. Numbers are the reference's: fixture
   tests/fixtures/riftatlas-deck-builder.json ([CSS f:o] = its stylesheet offset, keys named inline) and the
   raw capture dumps in reports/riftatlas-deck-builder-2026-10-06/dumps ([dump] = outline-*.txt class
   lists and rects); [SHOT n] = read off screenshot n; [추정] = not measured, chosen here. */

/* ------------------------------------------------------------------ L5 container */

/* The reference's @container is the scroll panel itself ([dump] outline-fullart-panel.txt line 1:
   data-deck-workspace-scroll class "@container … px-2.5"): the two-column rules, the gallery's cqw tracks
   and the 34rem sort-control rule all measure it. R1 made the Main Deck section the container; at
   Full Art size 1 the 451px Main Deck column still shows the full sort control [SHOT 36 size 1], so the
   section stops being one here. */
.deck-builder .db-ws-scroll {
  container-type: inline-size;
}

.deck-builder [data-deck-workspace-section="mainDeck"] {
  container-type: normal;
}

.deck-builder .db-ws-columns[hidden] {
  display: none;
}

/* The columns do not stretch to each other's height: the reference's columns grid is "grid items-start"
   (its workspace columns component, module 35166 tl; fixture workspace.deckOnlyMode colSide 692.3 × 384.6
   beside colMain × 455.9). */
.deck-builder .db-ws-columns {
  align-items: start;
}

/* L5: container ≥ 52rem → 1.6fr / 1fr, 24px apart [CSS :255784 :255918]; at the 28 % splitter the
   workspace (1290 inside) reads 779.3 / 487.1 (fixture workspace.wideWorkspace28pct.colsGTC). */
@container (min-width: 52rem) {
  .db-workspace-pane:not([data-deck-workspace-view="fullArt"]) .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 24px;
  }
}

/* --------------------------------------------------------------------- W1 rows */

/* Row = fixture workspace.listRows1920: 61.2 tall, grid 4.35rem 1.6rem minmax(0,1fr) [CSS :41863],
   radius 4, padding 4, 0.8rem; rows per line from repeat(auto-fit, minmax(min(100%, 14rem), 1fr))
   [CSS :40645] with 8px between (3 per line at 1920, 2 at 1440). */
.db-section-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 8px;
}

.db-section-list:empty {
  display: none;
}

.db-list-row {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 4.35rem 1.6rem minmax(0, 1fr);
  align-items: center;
  column-gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklab, var(--background) 70%, transparent);
  font-size: 0.8rem;
}

.db-list-row:focus-within {
  z-index: 20;
}

/* Thumb 4.35rem × 3.2rem, radius 2; inside a 1px black/70 frame the art is scaled 1.08, top-anchored
   (center 6 %), opacity .95, saturate .92 (fixture listRows1920.*.chips IMG 73 × 53). */
.deck-builder .db-row-thumb {
  position: relative;
  display: block;
  width: 4.35rem;
  height: 3.2rem;
  overflow: visible;
  border-radius: 2px;
  cursor: pointer;
}

.deck-builder .db-row-thumb:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.db-row-thumb-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 0.16rem;
  background: linear-gradient(180deg, rgba(24, 31, 48, 0.08), rgba(10, 14, 24, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.db-row-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 6%;
  opacity: 0.95;
  filter: saturate(0.92);
  transform: scale(1.08);
}

.db-row-thumb-line {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.2);
}

/* "N alt arts" chip [dump outline-ws-legend-filled.txt]: top/right 4, 9px/600, white/88 on rgba(7,10,18,.76). */
.db-row-alt {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  padding: 0.08rem 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.28rem;
  background: rgba(7, 10, 18, 0.76);
  color: rgba(255, 255, 255, 0.88);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.db-row-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 2px;
}

.deck-builder .db-row-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
}

.deck-builder .db-row-step:hover {
  background: var(--secondary);
}

.deck-builder .db-row-step svg.lucide {
  width: 12px;
  height: 12px;
}

.db-row-body {
  align-self: stretch;
  min-width: 0;
  padding: 2px 0;
}

/* Name 0.82rem/600, leading tight (16.4 tall). */
.db-row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--foreground);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.db-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Meta line: 4px under the name, 22 tall, 10px muted; "Nx" 1rem/600 #6aa4c2; then energy chip + power
   pips (2px apart) · might + glyph, 6px apart (fixture listRows1920.champion.chips x positions). */
.db-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 22px;
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1;
}

/* A narrow row runs out of room before its stats do: the stats box shrinks (its content may overflow into
   the 8px gap before ⇆, as the reference's does — Adaptatron's MIGHT image ends 2px before ⇆ in a 126px
   body), and the power pips are what gets clipped (screenshot 29: no pip on Ahri, Alluring in a
   3-per-line Main Deck row, a sliver on Alpha Wildclaw; screenshot 30-energy: the pip shows in a
   full-width row; the 360-wide Champion row shows it — fixture listRows1920.champion.chips IMG 11 × 11). */
.db-row-qty {
  flex-shrink: 0;
  color: #6aa4c2;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.db-row-stats {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.db-row-cost,
.db-row-might {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.db-row-cost {
  flex: 0 1 auto;
  min-width: 0;
}

.db-row-pips {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.db-row-energy,
.db-row-power,
.db-row-dot,
.db-row-might {
  flex-shrink: 0;
}

/* Energy chip: 0.95rem square, radius 0.22rem, black on white, 600 [listRows1920.mainDeck.chips]. */
.db-row-energy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 0.95rem;
  min-width: 0.95rem;
  padding: 0 0.18rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.22rem;
  background: #fff;
  color: #000;
  font-weight: 600;
}

/* Power pip 11 × 11 (the reference draws its domain icon; ours the domain colour). */
.db-row-power {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.db-row-dot {
  color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
  font-size: 10px;
}

.db-row-might {
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  font-size: 12px;
  font-weight: 600;
}

.deck-builder svg.db-row-might-icon {
  width: 13px;
  height: 13px;
  color: var(--muted-foreground);
}

.db-row-actions {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  margin-left: auto;
}

/* ⇆ and ⤢: 22 × 22, radius 4, muted; glyph 14 [dump: h-5.5 w-5.5, lucide h-3.5]. */
.deck-builder .db-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  cursor: pointer;
}

.deck-builder .db-row-action:hover {
  background: var(--secondary);
  color: var(--foreground);
}

/* ------------------------------------------------------------------- W2 groups */

/* Groups 16px apart, header 8px over its rows (fixture workspace.groupHeaderStyle sectionGap / groupsGap):
   h3 12px/600/0.18em uppercase + "N cards" 12px, both muted, border-bottom border/60, pb 8. */
.db-section-list[data-grouped] {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

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

.db-group-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 8px;
}

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

.db-group-title {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

/* ------------------------------------------------------- W4 preview + art chooser */

/* Fixed 332 × 462, rounded-xl, the reference's shadow; xl only (≥ 80rem) [listRowOps.hoverPreview]. */
.db-row-preview {
  position: fixed;
  z-index: 2147483647;
  width: 332px;
  height: 462px;
  pointer-events: none;
}

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

.db-row-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (width < 80rem) {
  .db-row-preview {
    display: none;
  }
}

/* Vertical list of printings labelled by code [SHOT 32]; the code 11px/600 white, bottom-left 8
   ([dump] artchooser-fullart.json chooser span). Frame and spacing read off the screenshot [추정 ±2px]. */
.db-art-chooser {
  position: fixed;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 154px;
  max-height: 416px;
  padding: 8px 9px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--popover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.deck-builder .db-art-option {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  aspect-ratio: 488 / 680;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--secondary);
  cursor: pointer;
}

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

.db-art-code {
  position: absolute;
  bottom: 8px;
  left: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

/* ----------------------------------------------------------- W5 Full Art: controls */

/* Header row 3 wraps (at 1440 Discard Draft drops under the Full Art controls [SHOT 41-fullart-1440]).
   Two segmented groups like the view tabs: Stacked 80 × 28 / All copies 87 × 28, and S · range 64 × 12 ·
   "N/6" ([dump] artchooser-fullart.json headerAfter rects). */
.db-ws-row.is-views {
  flex-wrap: wrap;
  row-gap: 6px;
}

.db-fa-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

/* Discard Draft stays at the end of the line at 1920 and starts the second line when the row wraps
   (1440: under the view tabs, left [SHOT 41-fullart-1440]): the controls take the free space instead of
   Discard's auto margin. */
.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-ws-row.is-views .db-discard {
  margin-left: 0;
}

.db-fa-toggle,
.db-fa-size {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 2px;
  border: 1px solid color-mix(in oklab, var(--border) 50%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklab, var(--background) 45%, transparent);
}

.deck-builder .db-fa-layout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  border-radius: 0.36rem;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}

.deck-builder .db-fa-layout-button[data-deck-full-art-layout-option="stacked"] {
  width: 80px;
}

.deck-builder .db-fa-layout-button[data-deck-full-art-layout-option="separate"] {
  width: 87px;
}

.deck-builder .db-fa-layout-button[aria-pressed="true"] {
  background: color-mix(in oklab, var(--foreground) 90%, transparent);
  color: var(--background);
}

.db-fa-size {
  gap: 6px;
  padding: 2px 10px 2px 8px;
}

.db-fa-size-mark {
  color: var(--muted-foreground);
  font-size: 9px;
  font-weight: 600;
}

.db-fa-range-wrap {
  position: relative;
  display: inline-flex;
  width: 64px;
  height: 12px;
}

.deck-builder .db-fa-range {
  --db-fa-fill: 40%;
  width: 64px;
  height: 12px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.deck-builder .db-fa-range::-webkit-slider-runnable-track {
  height: 10px;
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  border-radius: 999px;
  background: linear-gradient(to right, var(--foreground) var(--db-fa-fill), color-mix(in oklab, var(--muted) 80%, transparent) var(--db-fa-fill));
}

/* Thumb filled with the foreground, as the reference's dark knob on its light theme [SHOT 36]. */
.deck-builder .db-fa-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -3px;
  border: 2px solid var(--background);
  border-radius: 50%;
  background: var(--foreground);
  appearance: none;
}

.deck-builder .db-fa-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--muted) 80%, transparent);
}

.deck-builder .db-fa-range::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--foreground);
}

.deck-builder .db-fa-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--background);
  border-radius: 50%;
  background: var(--foreground);
}

/* Six step dots under the track [SHOT 36]. */
.db-fa-ticks {
  position: absolute;
  right: 5px;
  bottom: -5px;
  left: 5px;
  height: 3px;
  background-image: radial-gradient(circle, var(--muted-foreground) 1.2px, transparent 1.4px);
  background-size: calc((100% - 3px) / 5 + 0.6px) 3px;
  background-repeat: repeat-x;
  pointer-events: none;
}

.db-fa-size-readout {
  min-width: 22px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

/* ------------------------------------------------------------ W5 Full Art: sizes */

/* Per size (fixture workspace.fullArt.sizeSteps[*].per.*): card track clamp, battlefield track clamp,
   Legend / Champion tile max width, stacked gaps (x / y) + right padding for the 3px offsets, All copies
   gaps, h3 font + letter-spacing, counter font + height, Legend–Champion gap; the tile controls and the
   "xN" badge grow with the size (size 3 = [dump] h-6 / min-w-8; the others read off 36-fullart-stacked-
   size1..6 — badge heights 16 / 20 / 24 / 32 / 36 / 40 [SHOT], widths and fonts [추정]); section header padding,
   section gap and the spacer under a section are fitted to the measured tile tops [추정 except size 3 =
   [dump]: pb-1 pt-0.5, gap-1.5, h-0.5]. All copies gaps at sizes 2, 4, 5 are [추정]. */
.db-workspace-pane[data-deck-full-art-size="xxsmall"] {
  --fa-ctl: 16px;
  --fa-ctl-icon: 10px;
  --fa-badge-w: 24px;
  --fa-badge-fs: 9px;
  --fa-card: clamp(2.75rem, 11cqw, 4.5rem);
  --fa-bf: clamp(4.5rem, 16cqw, 6.75rem);
  --fa-identity: 6.5rem;
  --fa-gap-x: 4px;
  --fa-gap-y: 2px;
  --fa-pr: 4px;
  --fa-all-gap-x: 2px;
  --fa-all-gap-y: 2px;
  --fa-h3: 9px;
  --fa-track: 0.12em;
  --fa-counter-fs: 9px;
  --fa-counter-h: 16px;
  --fa-counter-min: 2.6rem;
  --fa-pair-gap: 2px;
  --fa-head-pt: 0px;
  --fa-head-pb: 2px;
  --fa-section-gap: 2px;
  --fa-spacer: 0px;
}

.db-workspace-pane[data-deck-full-art-size="xsmall"] {
  --fa-ctl: 20px;
  --fa-ctl-icon: 11px;
  --fa-badge-w: 28px;
  --fa-badge-fs: 10px;
  --fa-card: clamp(3.75rem, 15cqw, 6rem);
  --fa-bf: clamp(6rem, 22cqw, 9rem);
  --fa-identity: 8rem;
  --fa-gap-x: 6px;
  --fa-gap-y: 4px;
  --fa-pr: 6px;
  --fa-all-gap-x: 4px;
  --fa-all-gap-y: 4px;
  --fa-h3: 9px;
  --fa-track: 0.12em;
  --fa-counter-fs: 10px;
  --fa-counter-h: 18px;
  --fa-counter-min: 2.8rem;
  --fa-pair-gap: 4px;
  --fa-head-pt: 0px;
  --fa-head-pb: 2px;
  --fa-section-gap: 4px;
  --fa-spacer: 0px;
}

.db-workspace-pane[data-deck-full-art-size="small"] {
  --fa-ctl: 24px;
  --fa-ctl-icon: 12px;
  --fa-badge-w: 32px;
  --fa-badge-fs: 12px;
  --fa-card: clamp(5rem, 22cqw, 8rem);
  --fa-bf: clamp(8rem, 32cqw, 12rem);
  --fa-identity: 8rem;
  --fa-gap-x: 8px;
  --fa-gap-y: 4px;
  --fa-pr: 8px;
  --fa-all-gap-x: 6px;
  --fa-all-gap-y: 4px;
  --fa-h3: 10px;
  --fa-track: 0.14em;
  --fa-counter-fs: 11px;
  --fa-counter-h: 20px;
  --fa-counter-min: 3.1rem;
  --fa-pair-gap: 6px;
  --fa-head-pt: 2px;
  --fa-head-pb: 4px;
  --fa-section-gap: 6px;
  --fa-spacer: 2px;
}

.db-workspace-pane[data-deck-full-art-size="medium"] {
  --fa-ctl: 32px;
  --fa-ctl-icon: 14px;
  --fa-badge-w: 40px;
  --fa-badge-fs: 14px;
  --fa-card: clamp(6.5rem, 30cqw, 11rem);
  --fa-bf: clamp(11rem, 46cqw, 17rem);
  --fa-identity: 11rem;
  --fa-gap-x: 12px;
  --fa-gap-y: 6px;
  --fa-pr: 10px;
  --fa-all-gap-x: 10px;
  --fa-all-gap-y: 6px;
  --fa-h3: 12px;
  --fa-track: 0.18em;
  --fa-counter-fs: 15px;
  --fa-counter-h: 28px;
  --fa-counter-min: 3.8rem;
  --fa-pair-gap: 12px;
  --fa-head-pt: 6px;
  --fa-head-pb: 8px;
  --fa-section-gap: 8px;
  --fa-spacer: 12px;
}

.db-workspace-pane[data-deck-full-art-size="large"] {
  --fa-ctl: 36px;
  --fa-ctl-icon: 16px;
  --fa-badge-w: 44px;
  --fa-badge-fs: 16px;
  --fa-card: clamp(8rem, 42cqw, 14rem);
  --fa-bf: clamp(14rem, 68cqw, 22rem);
  --fa-identity: 14rem;
  --fa-gap-x: 16px;
  --fa-gap-y: 8px;
  --fa-pr: 12px;
  --fa-all-gap-x: 12px;
  --fa-all-gap-y: 8px;
  --fa-h3: 12px;
  --fa-track: 0.18em;
  --fa-counter-fs: 15px;
  --fa-counter-h: 28px;
  --fa-counter-min: 3.8rem;
  --fa-pair-gap: 16px;
  --fa-head-pt: 6px;
  --fa-head-pb: 8px;
  --fa-section-gap: 12px;
  --fa-spacer: 16px;
}

.db-workspace-pane[data-deck-full-art-size="xlarge"] {
  --fa-ctl: 40px;
  --fa-ctl-icon: 18px;
  --fa-badge-w: 48px;
  --fa-badge-fs: 18px;
  --fa-card: clamp(10rem, 55cqw, 18rem);
  --fa-bf: clamp(17rem, 82cqw, 26rem);
  --fa-identity: 18rem;
  --fa-gap-x: 20px;
  --fa-gap-y: 12px;
  --fa-pr: 16px;
  --fa-all-gap-x: 16px;
  --fa-all-gap-y: 12px;
  --fa-h3: 13px;
  --fa-track: 0.18em;
  --fa-counter-fs: 16px;
  --fa-counter-h: 32px;
  --fa-counter-min: 4rem;
  --fa-pair-gap: 20px;
  --fa-head-pt: 6px;
  --fa-head-pb: 8px;
  --fa-section-gap: 20px;
  --fa-spacer: 20px;
}

/* Two columns per size: the reference's container rules at 34 / 44 / 52 / 64 / 76 / 90rem with 12 / 16 /
   24 / 24 / 32 / 32px between [CSS :254629 :254763 :255558 :255692 :255784 :255918 :256116 :256250
   :256448 :256582 :256674 :256884]. Sizes 1–3 are pinned by the fixture (size 1: Battlefields at x 1595.9
   = 12px after a 451.4 column; size 2: 16px; size 3: one column at 745.5); 4–6 follow the rule order
   [추정]. */
@container (min-width: 34rem) {
  .db-workspace-pane[data-deck-full-art-size="xxsmall"] .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 12px;
  }
}

@container (min-width: 44rem) {
  .db-workspace-pane[data-deck-full-art-size="xsmall"] .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 16px;
  }
}

@container (min-width: 52rem) {
  .db-workspace-pane[data-deck-full-art-size="small"] .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 24px;
  }
}

@container (min-width: 64rem) {
  .db-workspace-pane[data-deck-full-art-size="medium"] .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 24px;
  }
}

@container (min-width: 76rem) {
  .db-workspace-pane[data-deck-full-art-size="large"] .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 32px;
  }
}

@container (min-width: 90rem) {
  .db-workspace-pane[data-deck-full-art-size="xlarge"] .db-ws-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 32px;
  }
}

/* Full Art panel: 10px sides, 12 below ([dump] line 1 px-2.5 pb-3); sections stack with no row gap, each
   = header · gap · gallery · gap · spacer (the last one, Runes, has none). */
.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-ws-scroll {
  padding: 0 10px 12px;
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-ws-columns,
.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-ws-column {
  row-gap: 0;
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-ws-pair {
  gap: var(--fa-pair-gap);
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-section {
  gap: var(--fa-section-gap);
  padding-bottom: calc(var(--fa-section-gap) + var(--fa-spacer));
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] [data-deck-workspace-section="runes"] {
  padding-bottom: 0;
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-section-header {
  padding: var(--fa-head-pt) 0 var(--fa-head-pb);
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-section-title {
  font-size: var(--fa-h3);
  line-height: 1.5;
  letter-spacing: var(--fa-track);
}

.db-workspace-pane[data-deck-workspace-view="fullArt"] .db-counter {
  height: var(--fa-counter-h);
  min-width: var(--fa-counter-min);
  padding: 0 6px;
  font-size: var(--fa-counter-fs);
}

/* Gallery: auto-fill tracks of the size's clamp (cqw of the scroll panel), start-aligned. Legend and
   Champion: one centred tile at most --fa-identity wide. Battlefields: the landscape clamp. */
.db-section-list.is-fullart,
.db-fa-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, var(--fa-card)));
  align-items: start;
  justify-content: start;
  column-gap: var(--fa-gap-x);
  row-gap: var(--fa-gap-y);
  padding-right: var(--fa-pr);
}

.db-section-list.is-fullart[data-grouped] {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-right: 0;
}

.db-section-list.is-fullart[data-deck-full-art-layout="separate"],
.db-section-list.is-fullart[data-deck-full-art-layout="separate"] .db-fa-gallery {
  column-gap: var(--fa-all-gap-x);
  row-gap: var(--fa-all-gap-y);
  padding-right: 0;
}

[data-deck-workspace-section="battlefields"] .db-section-list.is-fullart {
  grid-template-columns: repeat(auto-fill, minmax(0, var(--fa-bf)));
}

[data-deck-workspace-section="legend"] .db-section-list.is-fullart,
[data-deck-workspace-section="champion"] .db-section-list.is-fullart {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 0;
  padding-right: 0;
}

/* ------------------------------------------------------------- W5 Full Art: tiles */

/* Tile = the art (488/680, battlefields 3/2) + 9px under it when stacked (fixture: 128 × 187.4 over a
   128 × 178.4 art; All copies tile = the art). Frames: radius 6, shadow 0 8px 18px rgba(0,0,0,.24),
   3px apart. */
.db-fa-tile {
  position: relative;
  width: 100%;
  min-width: 0;
  cursor: pointer;
}

.db-fa-tile[data-deck-full-art-layout="stacked"] {
  padding-bottom: 9px;
}

[data-deck-workspace-section="legend"] .db-fa-tile,
[data-deck-workspace-section="champion"] .db-fa-tile {
  max-width: var(--fa-identity);
}

.db-fa-art {
  position: relative;
  width: 100%;
  aspect-ratio: 488 / 680;
}

[data-deck-workspace-section="battlefields"] .db-fa-art {
  aspect-ratio: 3 / 2;
}

.db-fa-frames {
  position: absolute;
  inset: 0;
}

.db-fa-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--secondary);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.db-fa-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "xN": top centre, 24 tall, min 32 wide, 700 white on rgba(7,12,21,.92) [dump count badge]. */
.db-fa-count {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--fa-ctl, 24px);
  min-width: var(--fa-badge-w, 32px);
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: rgba(7, 12, 21, 0.92);
  color: #fff;
  font-size: var(--fa-badge-fs, 12px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

/* Controls on rgba(7,12,21,.86) with a white/25 border, 24 × 24 at size 3 [fixture fullArt.tileHover],
   scaled with --fa-ctl: details top right (4px in), the art picker under it (always shown), −/+ along the
   bottom (2px in, 4px up) and ⇆ above − (4px gap). Hover / focus / coarse pointers show them. */
.deck-builder .db-fa-control,
.deck-builder .db-fa-art-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--fa-ctl, 24px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(7, 12, 21, 0.86);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.deck-builder .db-fa-control {
  width: var(--fa-ctl, 24px);
}

.deck-builder .db-fa-control:hover,
.deck-builder .db-fa-art-picker:hover {
  background: rgba(28, 39, 58, 0.94);
}

.deck-builder .db-fa-control svg.lucide,
.deck-builder .db-fa-art-picker svg.lucide {
  width: var(--fa-ctl-icon, 12px);
  height: var(--fa-ctl-icon, 12px);
}

.deck-builder .db-fa-details {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 20;
}

.deck-builder .db-fa-art-picker {
  position: absolute;
  top: calc(var(--fa-ctl, 24px) + 13.5px);
  right: 4px;
  z-index: 20;
  gap: 2px;
  padding: 0 5px;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(7, 12, 21, 0.82);
  font-weight: 600;
  line-height: 1;
}

.db-fa-art-count {
  font-size: calc(var(--fa-ctl-icon, 12px) - 2px);
  font-variant-numeric: tabular-nums;
}

/* Size 1 shows the picker glyph without its count [SHOT 36-fullart-stacked-size1-1920.png]. */
.db-workspace-pane[data-deck-full-art-size="xxsmall"] .db-fa-art-count {
  display: none;
}

.deck-builder .db-workspace-pane[data-deck-full-art-size="xxsmall"] .db-fa-art-picker {
  padding: 0;
  width: var(--fa-ctl);
}

.db-fa-quantity {
  position: absolute;
  right: 2px;
  bottom: 4px;
  left: 2px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.db-fa-left-actions {
  position: relative;
  display: flex;
  align-items: center;
}

.deck-builder .db-fa-move {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
}

.db-fa-details,
.db-fa-quantity {
  opacity: 0;
  transition: opacity 120ms ease;
}

.db-fa-tile:hover .db-fa-details,
.db-fa-tile:hover .db-fa-quantity,
.db-fa-tile:focus-within .db-fa-details,
.db-fa-tile:focus-within .db-fa-quantity {
  opacity: 1;
}

@media (any-pointer: coarse) {
  .db-fa-details,
  .db-fa-quantity {
    opacity: 1;
  }
}

/* The shortcut card: centred on the art's bottom edge, 66 % below it, on hover [dump
   data-deck-full-art-shortcuts]: 0.54rem/600 #e8f1ff on a navy gradient, rows "1.8rem auto". */
.db-fa-shortcuts {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 40;
  padding: 4px 2px;
  border: 1px solid rgba(171, 191, 238, 0.38);
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(168deg, rgba(27, 44, 72, 0.97), rgba(28, 45, 72, 0.96));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 66%);
  transition: opacity 120ms ease;
}

.db-fa-tile:hover .db-fa-shortcuts {
  opacity: 1;
}

.db-fa-shortcut-grid {
  display: grid;
  grid-template-columns: 1.8rem auto;
  align-items: center;
  gap: 2px;
  color: #e8f1ff;
  font-size: 0.54rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.db-fa-shortcut-input {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.db-fa-shortcut-text {
  padding-right: 4px;
}

.db-fa-mouse {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 0.68rem;
  height: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.28rem;
  background: rgba(14, 25, 44, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.db-fa-mouse-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.44rem;
  background: rgba(255, 255, 255, 0.45);
  transform: translateX(-50%);
}

.db-fa-mouse-key {
  position: absolute;
  top: 0.11rem;
  width: 0.23rem;
  height: 0.31rem;
  background: #fff;
}

.db-fa-mouse-key.is-left {
  left: 0.11rem;
  border-top-left-radius: 0.2rem;
}

.db-fa-mouse-key.is-right {
  right: 0.11rem;
  border-top-right-radius: 0.2rem;
}

.db-fa-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 0.95rem;
  min-width: 0.95rem;
  padding: 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 600;
  line-height: 1;
}

/* ------------------------------------------------------------------------ W6 Stats */

/* KPI tiles 2 × 2, 8px apart; section cards two per row, 16px apart, 20px between rows (fixture
   workspace.stats.blocks: 358.8 wide at 1920 = (733.5 − 16) / 2, 258 at 1440; ENERGY CURVE top 390.3 =
   20 under the KPIs). Inner sizes read off 39-stats-1920.png [추정 ±2px]. */
.db-stats {
  display: grid;
  gap: 20px;
  padding-top: 16px;
}

.db-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.db-kpi {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--background) 55%, transparent);
}

.db-kpi-label {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.db-kpi-value {
  color: var(--foreground);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 20px;
}

.db-stats-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.db-stats-card.is-energy {
  gap: 8px;
}

.db-stats-title {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.db-energy-list {
  display: grid;
  gap: 6px;
}

.db-energy-item {
  display: grid;
  gap: 4px;
}

.db-energy-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 20px;
}

.db-energy-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--background);
  color: var(--foreground);
  font-size: 10px;
  font-weight: 700;
}

.db-energy-count {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
}

.db-energy-percent {
  margin-left: -4px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.db-energy-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in oklab, var(--muted) 90%, transparent);
}

/* Bar = count / the tallest count, green → blue (sampled: rgb(89,223,139) → rgb(100,159,253)). */
.db-energy-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #59df8b, #649ffd);
}

.db-power-legend,
.db-donut-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 500;
}

.db-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.db-domain-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.db-power-chart {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
}

.db-power-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 118px;
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1;
  text-align: right;
}

.db-power-plot {
  display: grid;
  gap: 8px;
}

.db-power-columns {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 112px;
  margin-top: 6px;
}

.db-power-column {
  display: flex;
  flex-direction: column-reverse;
  width: 68px;
}

.db-power-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  color: #111;
  font-size: 13px;
  font-weight: 700;
}

.db-power-labels {
  display: flex;
  gap: 8px;
  color: var(--foreground);
  font-size: 12px;
}

.db-power-labels > span {
  width: 68px;
  text-align: center;
}

.db-donut-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 96px ring, 22px thick (screenshot 39). */
.db-donut {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 25px, #000 26px);
  mask: radial-gradient(circle, transparent 25px, #000 26px);
}

.db-donut-legend {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.db-legend-name {
  font-weight: 600;
}

.db-legend-value {
  color: var(--muted-foreground);
}
