.deck-gallery { display: none; box-sizing: border-box; width: min(1120px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #53647f; border-radius: 8px; background: #0c101b; color: #f4f7fc; letter-spacing: 0; box-shadow: 0 20px 70px #0009; }
.deck-gallery[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.deck-gallery::backdrop { background: #03050de0; }
.deck-gallery [hidden] { display: none !important; }
.deck-gallery-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #354155; }
.deck-gallery-head > div { min-width: 0; }
.deck-gallery h2 { margin: 0; font-size: 1.4rem; line-height: 1.3; overflow-wrap: anywhere; }
.deck-gallery-summary { margin: 8px 0 0; color: #aee7dc; font-size: .875rem; overflow-wrap: anywhere; }
.deck-gallery-button, .deck-gallery-link { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid #64738a; border-radius: 6px; background: #192331; color: #f4f7fc; font: inherit; font-size: .875rem; font-weight: 700; line-height: 1.4; text-decoration: none; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.deck-gallery-close { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; font-size: 1.8rem; line-height: 1; border-radius: 50%; }
.deck-gallery-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 20px; }
.deck-gallery-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.deck-gallery-filters label { display: grid; min-width: 0; gap: 6px; font-size: .8rem; font-weight: 700; }
.deck-gallery-filters input, .deck-gallery-filters select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; border: 1px solid #64738a; border-radius: 6px; padding: 9px; background: #111927; color: #fff; font: inherit; font-size: 1rem; }
.deck-gallery-status { min-height: 20px; margin: 12px 0; color: #c6d0e1; font-size: .8rem; overflow-wrap: anywhere; }
.deck-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
.deck-gallery-card { min-width: 0; overflow: hidden; border: 1px solid #3c475b; border-radius: 6px; background: #151b27; }
.deck-gallery-card-image { display: block; width: 100%; border: 0; padding: 0; background: #080b12; color: #c6d0e1; cursor: zoom-in; }
.deck-gallery-image { display: grid; width: 100%; aspect-ratio: 5 / 7; place-items: center; background: #080b12; }
.deck-gallery-image img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.deck-gallery-missing { padding: 12px; font-size: .8rem; text-align: center; color: #b7c2d4; }
.deck-gallery-card-copy { display: grid; gap: 5px; padding: 10px; overflow-wrap: anywhere; }
.deck-gallery-card-copy strong { font-size: .875rem; line-height: 1.35; }
.deck-gallery-card-copy small { font-size: .75rem; line-height: 1.4; color: #c6d0e1; }
.deck-gallery-card-copy .deck-gallery-section { color: #79e4cd; }
.deck-gallery-empty { grid-column: 1 / -1; text-align: center; padding: 20px 0; color: #c6d0e1; }
.deck-gallery-footer { display: flex; justify-content: end; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-top: 1px solid #354155; }
.deck-gallery-link { background: #e6f65d; color: #0b1320; border-color: #e6f65d; }
.deck-gallery-enlarged h3 { margin: 14px 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.deck-gallery-large-image { display: flex; justify-content: center; }
.deck-gallery-large-image .deck-gallery-image { width: min(100%, 390px); max-height: 60dvh; }
.deck-gallery-enlarged > p { color: #c6d0e1; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.deck-gallery :is(button, a, input, select):focus-visible { outline: 3px solid #e6f65d; outline-offset: 2px; }
.prebuilt-card-cover { display: block; min-height: 0; background: #080b1b; cursor: zoom-in; }
.prebuilt-card-cover img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.prebuilt-card-cover:focus-visible { outline: 3px solid #e6f65d; outline-offset: -3px; }
@media (max-width: 480px) {
  .deck-gallery-head { padding: 14px 12px; gap: 10px; }
  .deck-gallery h2 { font-size: 1.15rem; }
  .deck-gallery-body { padding: 12px; }
  .deck-gallery-filters { grid-template-columns: minmax(0, 1fr); }
  .deck-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .deck-gallery-card-copy { padding: 8px; }
  .deck-gallery-footer { padding: 12px; }
  .deck-gallery-footer > :is(button, a) { width: 100%; }
}
