/* Scoped to the explicit DeckEditorC render hook. Shared card faces are untouched. */
#app:has(#deckBuilder.deck-editor-c.active) { width: 100vw !important; height: 100dvh !important; top: 0 !important; left: 0 !important; transform: none !important; }
#deckBuilder.deck-editor-c { width: 100%; padding: 26px 32px; overflow: auto; background: #102328; color: #eee4cc; }
#deckBuilder.deck-editor-c.active { justify-content: flex-start; align-items: stretch; }
#deckBuilder.deck-editor-c .builder { max-width: 2700px; grid-template-columns: minmax(0,1fr) minmax(330px,27.5%); gap: 32px; align-items: stretch; }
#deckBuilder.deck-editor-c .builder-col { min-width: 0; padding: 24px 28px 16px; border: 1px solid #9a8352; border-radius: 0; overflow: visible; background: #0b171aeF; box-shadow: inset 0 0 0 4px #0b171a, inset 0 0 0 5px #514836; position: relative; }
#deckBuilder.deck-editor-c .builder-col::before,#deckBuilder.deck-editor-c .builder-col::after { content: ''; position: absolute; width: 33px; height: 33px; background: url('../assets/img/ui/deck-editor-c.png') center/contain no-repeat; pointer-events: none; top: 1px; left: 1px; }
#deckBuilder.deck-editor-c .builder-col::after { left: auto; right: 1px; transform: scaleX(-1); }
#deckBuilder.deck-editor-c .builder-top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; margin-bottom: 16px; }
#deckBuilder.deck-editor-c .builder-top h2 { margin: 0; font-size: clamp(22px,1.3vw,34px); color: #eee3c8; }
#deckBuilder.deck-editor-c .deck-c-subtitle { grid-column: 2; grid-row: 1; margin: 0; font-size: 16px; color: #a5beb8; text-align: right; }
#deckBuilder.deck-editor-c .builder-top > div { grid-column: 1/-1; display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; }
#deckBuilder.deck-editor-c .rarity-bar { display: flex; gap: 6px; margin: 0; flex-wrap: wrap; }
#deckBuilder.deck-editor-c .rarity-bar button,#deckBuilder.deck-editor-c .deck-c-pagination button { min-height: 42px; padding: 5px 12px; border: 1px solid #846f43; border-radius: 4px; color: #d3ded3; background: #14282c; font-size: 16px; cursor: pointer; }
#deckBuilder.deck-editor-c .rarity-bar button.on { color: #fff0c6; background: #334b4b; border-color: #d5b969; }
#deckBuilder.deck-editor-c .pool-search { width: 270px; flex: 1 1 230px; min-width: 0; min-height: 42px; margin: 0; padding: 6px 12px; border-color: #846f43; background: #101f24; color: #eee4cc; font-size: 16px; }
#deckBuilder.deck-editor-c .builder-top .menu-btn { font-size: 15px; min-height: 42px; }
#deckBuilder.deck-editor-c .pool-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); column-gap: 36px; row-gap: 16px; align-items: start; width: min(100%,calc((100dvh - 350px)*4/3 + 108px)); margin-inline: auto; }
#deckBuilder.deck-editor-c .pool-item { min-width: 0; width: 100%; justify-self: center; cursor: default; opacity: 1; }
#deckBuilder.deck-editor-c .deck-c-face { display: block; width: 100%; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 10px; }
#deckBuilder.deck-editor-c .pool-item .card { width: 100%; max-width: none; height: auto !important; margin: 0; aspect-ratio: 2/3; box-shadow: none; }
#deckBuilder.deck-editor-c .pool-item .card-face { width: 100%; height: 100%; object-fit: contain; }
#deckBuilder.deck-editor-c .pool-item.unowned .card-face { filter: grayscale(1); opacity: 1; }
#deckBuilder.deck-editor-c .pool-item.full .card-face { filter: grayscale(1); }
#deckBuilder.deck-editor-c .pool-item .play-glow { display: none; }
#deckBuilder.deck-editor-c .deck-c-card-footer { display: flex; align-items: center; gap: 4px; min-height: 28px; padding-top: 4px; font-size: 14px; color: #acbdb5; }
#deckBuilder.deck-editor-c .deck-c-ownership { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#deckBuilder.deck-editor-c .deck-c-ownership.shortage { color: #ffd18d; }
#deckBuilder.deck-editor-c .deck-c-detail,#deckBuilder.deck-editor-c .deck-c-add { border: 0; background: transparent; color: #c9ddcd; font-size: inherit; padding: 2px 4px; min-height: 28px; cursor: pointer; white-space: nowrap; }
#deckBuilder.deck-editor-c .deck-c-detail { text-decoration: underline; text-underline-offset: 3px; }
#deckBuilder.deck-editor-c .deck-c-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; color: #bdd4c8; font-size: 15px; }
#deckBuilder.deck-editor-c button:disabled { opacity: .5; cursor: default; }
#deckBuilder.deck-editor-c button:focus-visible,#deckBuilder.deck-editor-c input:focus-visible { outline: 3px solid #b8e4dc; outline-offset: 3px; }
#deckBuilder.deck-editor-c .deck-c-footer { margin: 10px 0 0; color: #9eafa7; font-size: 14px; line-height: 1.5; }
#deckBuilder.deck-editor-c .deck-c-empty { grid-column: 1/-1; min-height: 260px; display: grid; place-items: center; color: #ccd9cc; font-size: 18px; }
#deckBuilder.deck-editor-c .builder-col.deck-side { max-height: none; height: calc(100dvh - 52px); padding: 26px 30px 22px; }
#deckBuilder.deck-editor-c .deck-side .builder-top { margin-bottom: 8px; }
#deckBuilder.deck-editor-c .deck-c-count { grid-column: 2; color: #a8d2c7; font-size: clamp(24px,1.7vw,42px); }
#deckBuilder.deck-editor-c .deck-meta { font-size: 15px; line-height: 1.6; color: #aebfb4; margin-bottom: 18px; }
#deckBuilder.deck-editor-c .deck-list { flex: 1 1 auto; overflow: auto; max-height: 48dvh; min-height: 200px; gap: 16px; }
#deckBuilder.deck-editor-c .deck-c-group { padding: 12px 16px; background: #14282c; border: 1px solid #726542; border-radius: 5px; }
#deckBuilder.deck-editor-c .deck-c-group h3 { margin: 0 0 10px; font-size: 18px; color: #d0a873; }
#deckBuilder.deck-editor-c .deck-c-group-spell h3 { color: #97c9cf; }
#deckBuilder.deck-editor-c .deck-c-group-item h3 { color: #d7c478; }
#deckBuilder.deck-editor-c .deck-c-row { display: grid; grid-template-columns: 26px minmax(0,1fr) auto 36px; gap: 8px; align-items: center; min-height: 38px; font-size: 17px; }
#deckBuilder.deck-editor-c .deck-c-cost { color: #bdd8cd; font-variant-numeric: tabular-nums; }
#deckBuilder.deck-editor-c .deck-c-row-detail { text-align: left; min-width: 0; border: 0; background: transparent; color: #eee6cf; font: inherit; overflow-wrap: anywhere; cursor: pointer; }
#deckBuilder.deck-editor-c .deck-c-remove { background: #102126; color: #eee4cc; font-size: 22px; border: 1px solid #776f50; border-radius: 4px; min-height: 34px; cursor: pointer; }
#deckBuilder.deck-editor-c .deck-c-group-empty { font-size: 15px; color: #95a99f; margin: 0; }
#deckBuilder.deck-editor-c .deck-stats { gap: 14px; margin-top: 18px; }
#deckBuilder.deck-editor-c .deck-stat-panel { background: #11242a; border: 1px solid #756944; border-radius: 5px; padding: 16px; }
#deckBuilder.deck-editor-c .deck-stat-panel h4 { font-size: 16px; color: #e7dec1; }
#deckBuilder.deck-editor-c .deck-stat-panel:has(#deckComp) { order: -1; }
#deckBuilder.deck-editor-c #deckComp { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
#deckBuilder.deck-editor-c #deckComp .deck-stat-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 15px; }
#deckBuilder.deck-editor-c #deckComp .lbl { font-size: 17px; color: #bdd1be; }
#deckBuilder.deck-editor-c #deckComp .deck-stat-bar { width: 100%; height: 7px; }
#deckBuilder.deck-editor-c #deckComp .val { min-width: 0; font-size: 14px; white-space: normal; text-align: left; }
#deckBuilder.deck-editor-c #soulCurve { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 8px; }
#deckBuilder.deck-editor-c #soulCurve .deck-stat-row { display: flex; flex-direction: column; min-width: 0; gap: 5px; font-size: 14px; }
#deckBuilder.deck-editor-c #soulCurve .lbl { order: 2; }
#deckBuilder.deck-editor-c #soulCurve .deck-stat-bar { order: 1; width: 100%; height: 50px; background: #243735; position: relative; border-color: #575b43; }
#deckBuilder.deck-editor-c #soulCurve .deck-stat-bar > i { position: absolute; bottom: 0; background: #9c9565; border-radius: 0; }
#deckBuilder.deck-editor-c #soulCurve .val { min-width: 0; white-space: normal; text-align: center; font-size: 12px; }
#deckBuilder.deck-editor-c .deck-stat-avg { color: #add1c1; font-size: 15px; }
#deckBuilder.deck-editor-c .deck-c-remaining { font-size: 17px; color: #a9d5c4; margin: 16px 0; }
#deckBuilder.deck-editor-c .deck-c-actions { margin-top: auto; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 16px; }
#deckBuilder.deck-editor-c .deck-c-actions .menu-btn { min-width: 0 !important; margin: 0 !important; padding: 12px 18px !important; font-size: 18px; border-radius: 4px; background: #1d3030; min-height: 48px; }
#deckBuilder.deck-editor-c #btnPlaySaved { grid-column: 1/-1; font-size: 15px; padding: 8px 14px !important; min-height: 42px; }
/* The shared details modal remains available, with full text and keyboard access. */
body:has(#deckBuilder.deck-editor-c.active) .lore-box { max-height: 90dvh; overflow: auto; }
body:has(#deckBuilder.deck-editor-c.active) .lore-card .card { max-width: none; }
body:has(#deckBuilder.deck-editor-c.active) .lore-side { min-width: 0; overflow-wrap: anywhere; }
body:has(#deckBuilder.deck-editor-c.active) .lore-skill span { white-space: normal; overflow: visible; }
@media (max-width: 1700px) {
  #deckBuilder.deck-editor-c { padding: 16px; }
  #deckBuilder.deck-editor-c .builder { gap: 20px; }
  #deckBuilder.deck-editor-c .builder-col { padding: 20px 16px 14px; }
  #deckBuilder.deck-editor-c .builder-col.deck-side { padding: 20px; }
  #deckBuilder.deck-editor-c .pool-item { max-width: none; }
  #deckBuilder.deck-editor-c .pool-grid { column-gap: 36px; width: 100%; }
  #deckBuilder.deck-editor-c .builder-col.deck-side { height: calc(100dvh - 32px); }
  #deckBuilder.deck-editor-c .deck-c-card-footer { flex-wrap: wrap; }
  #deckBuilder.deck-editor-c .deck-c-ownership { flex-basis: 100%; }
}
@media (max-width: 1200px) {
  #deckBuilder.deck-editor-c .builder { grid-template-columns: minmax(0,1fr); }
  #deckBuilder.deck-editor-c .builder-col.deck-side { height: auto; }
  #deckBuilder.deck-editor-c .pool-item { max-width: 310px; }
  #deckBuilder.deck-editor-c .pool-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #deckBuilder.deck-editor-c .deck-list { max-height: 480px; }
  #deckBuilder.deck-editor-c .deck-stats { flex-direction: row; }
  #deckBuilder.deck-editor-c .deck-stat-panel { flex: 1; min-width: 0; }
  #deckBuilder.deck-editor-c .deck-c-actions { grid-template-columns: minmax(0,1fr) auto auto; }
  #deckBuilder.deck-editor-c #btnPlaySaved { grid-column: auto; }
}
@media (max-width: 1000px) {
  #deckBuilder.deck-editor-c .pool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
  #deckBuilder.deck-editor-c .pool-item { max-width: 360px; }
  #deckBuilder.deck-editor-c .deck-c-card-footer { flex-wrap: nowrap; }
  #deckBuilder.deck-editor-c .deck-c-ownership { flex-basis: auto; }
}
@media (max-width: 580px) {
  #deckBuilder.deck-editor-c { padding: 10px; }
  #deckBuilder.deck-editor-c .builder-col,#deckBuilder.deck-editor-c .builder-col.deck-side { padding: 20px 16px 16px; }
  #deckBuilder.deck-editor-c .builder-top { grid-template-columns: 1fr; }
  #deckBuilder.deck-editor-c .deck-c-subtitle { grid-column: 1; grid-row: auto; text-align: left; font-size: 15px; }
  #deckBuilder.deck-editor-c .builder-top > div { gap: 10px; }
  #deckBuilder.deck-editor-c .pool-search { width: 100%; flex-basis: 100%; }
  #deckBuilder.deck-editor-c .pool-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  #deckBuilder.deck-editor-c .pool-item { max-width: 350px; }
  #deckBuilder.deck-editor-c .deck-c-card-footer { flex-wrap: wrap; font-size: 15px; }
  #deckBuilder.deck-editor-c .deck-c-detail,#deckBuilder.deck-editor-c .deck-c-add { min-height: 40px; }
  #deckBuilder.deck-editor-c .deck-c-pagination { gap: 8px; flex-wrap: wrap; font-size: 14px; }
  #deckBuilder.deck-editor-c .deck-c-pagination span { text-align: center; }
  #deckBuilder.deck-editor-c .deck-stats { flex-direction: column; }
  #deckBuilder.deck-editor-c .deck-c-row { font-size: 16px; }
  #deckBuilder.deck-editor-c .deck-c-remove { min-height: 44px; }
  #deckBuilder.deck-editor-c .deck-c-actions { grid-template-columns: minmax(0,1fr) auto; }
  #deckBuilder.deck-editor-c #btnPlaySaved { grid-column: 1/-1; }
  body:has(#deckBuilder.deck-editor-c.active) .lore-box { display: flex; flex-direction: column; width: calc(100vw - 24px); padding: 14px; }
  body:has(#deckBuilder.deck-editor-c.active) .lore-card { width: 240px; max-width: 100%; align-self: center; }
  body:has(#deckBuilder.deck-editor-c.active) .lore-side { width: 100%; }
}
