@import url("./partner-fan.css");
/* Keep the existing frame, card art, typography and gold tokens. Only the
   deck header's hierarchy changes; the rest of the builder keeps its skin. */
.deck-header { display: grid; grid-template-columns: 22% minmax(0, 1fr) 27%; align-items: start; }
.deck-header .commander-frame { min-width: 0; width: 100%; }
.deck-header #commanderImg { width: 100%; }
.deck-header .commander-frame.deck-fan-frame { padding: 0; border: 0; background: none; box-shadow: none; }
.deck-card-fan { position: relative; width: 100%; aspect-ratio: 1 / 1.15; margin-top: .5rem; }
.deck-card-fan img { position: absolute; width: 60%; height: auto; left: 20%; top: 8%; border-radius: 5px; box-shadow: 0 8px 18px #0009; transform-origin: center bottom; }
.deck-card-fan img:first-child { transform: rotate(-16deg); }
.deck-card-fan img:last-child { transform: rotate(16deg); }
.deck-card-fan img:nth-child(2) { z-index: 1; transform: translateY(-8px); }
.deck-card-fan[data-count="2"] img:last-child { transform: rotate(12deg); }
.deck-card-fan[data-count="2"] img:first-child { transform: rotate(-12deg); }
.deck-card-fan[data-count="1"] img { transform: none; }
.deck-header .deck-meta { min-width: 0; width: 100%; }
.deck-header .curve-box { width: 100%; min-width: 0; }
#deckCommander { margin: 0 0 1.1rem; font-size: .88rem; }
.deck-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; margin: .9rem 0 .5rem; }
.deck-facts #deckStats { margin: 0; font-size: .88rem; font-weight: 600; }
.deck-facts .legality { margin: 0; min-width: 0; max-width: 100%; }
.deck-facts .lg-line { flex-wrap: wrap; }
.deck-price { font-size: .88rem; margin: .5rem 0; }
.deck-price strong { color: var(--ink); }
.deck-details { margin: .4rem 0 0; }
.deck-details > summary { list-style: none; color: var(--gold-bright); text-decoration: underline; font-size: .78rem; cursor: pointer; }
.deck-details > summary::-webkit-details-marker { display: none; }
.deck-header-panel { background: var(--surface-hi); border: 1px solid var(--border); padding: .85rem; border-radius: 3px; overflow-wrap: anywhere; }
.deck-details > .deck-header-panel { margin-top: .6rem; }
.deck-meta .deck-main-actions { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; align-items: start; margin: 1.25rem 0 .8rem; }
.deck-main-actions > button, .deck-action-fold > summary { padding: .5rem 1rem; font-size: .88rem; min-height: 38px; }
.deck-meta .deck-main-actions > button { width: auto; }
.deck-main-actions #saveBtn { background: linear-gradient(180deg, var(--gold-fill-bright), var(--gold-fill-deep)); color: var(--on-gold); font-family: inherit; text-transform: none; letter-spacing: normal; }
.deck-action-fold > summary { list-style: none; cursor: pointer; border: 1px solid var(--border); border-radius: 2px; background: linear-gradient(180deg, var(--surface-hi), var(--surface)); color: var(--ink); }
.deck-action-fold > summary::-webkit-details-marker { display: none; }
#deckMore > summary::after { content: " ▾"; }
.deck-action-fold > summary:hover { border-color: var(--gold); }
.deck-action-fold > .deck-header-panel { position: absolute; top: calc(100% + .4rem); left: 0; width: 100%; z-index: 40; box-shadow: var(--shadow-2); }
.deck-header .deck-place { margin-top: 0; }
.deck-header .deck-visibility { flex-wrap: wrap; max-width: 100%; }
.deck-header .deck-visibility select { max-width: 100%; }
.deck-more-actions { display: grid; gap: .45rem; }
.deck-more-actions button, .deck-more-actions .export-fold > summary { width: 100%; margin: 0; text-align: left; border-radius: 2px; }
.deck-more-actions #deckRenameSlot:empty { display: none; }
.deck-more-actions .export-body { position: static; min-width: 0; margin-top: .35rem; box-shadow: none; }
.deck-meta .ask-row { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: .8rem 0 0; margin-top: 0; }
#deckBrewmaster { border: 0; padding-top: 0; margin-top: .7rem; }
#deckBrewmaster > summary { font-size: .78rem; letter-spacing: .03em; }
#deckBrewmaster > summary::before { display: none; }
#deckBrewmaster > summary::after { content: "▾"; }
#deckBrewmaster[open] > summary::after { content: "▴"; }
#deckBrewmaster .brew-chip { margin-left: 0; }
.deck-action-fold > summary:focus-visible, .deck-details > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 760px) {
  .deck-header { grid-template-columns: 132px minmax(0, 1fr); gap: 1rem; }
  .deck-header .curve-box { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .deck-header { display: flex; flex-direction: column; align-items: center; }
  .deck-header .commander-frame { width: 142px; align-self: center; }
  .deck-header .deck-fan-frame { width: 190px; }
}
@media (pointer: coarse) {
  .deck-header button, .deck-action-fold > summary, .deck-details > summary, #deckBrewmaster > summary { min-height: 44px; }
  .deck-details > summary { display: flex; align-items: center; }
}

/* The overview reads as one paragraph; factual metadata stays secondary. */
.deck-header-panel .deck-description { color: #cdc0a5; font: 400 15px/1.8 Arial, sans-serif; text-shadow: none; -webkit-text-stroke: 0; margin: 0; }
.deck-description-facts { border-top: 1px solid var(--border); margin-top: 1.1rem; padding-top: .6rem; }
.deck-description-facts #commanderSource { font-size: .78rem; }

:root[data-theme="light"] .deck-header-panel .deck-description { color: var(--ink-2); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .deck-header-panel .deck-description { color: var(--ink-2); }
}
