/* The Podium deck list (round 5), shared: used by the Podium deck picker and the decks page's Import from Archidekt.
   Tokens are the Nightfall ones from timewalked.css. Class names start with dp-. The Podium-only parts of the
   screen (tabs, last used row, busy state) are in podium.css. */

/* Fixed values used on top of art (same in both themes, because art sits under a dark scrim) */
:root {
  --dp-on-art: #efe6da;
  --dp-on-art-muted: #d6cbe0;
  --dp-ember-on-art: #f2865a;
  --dp-scrim-bg: rgba(19, 15, 29, .8);
}
/* Source switch, search */
.dp-search { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 0 16px; min-height: 48px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text-muted); }
.dp-search input { flex: 1; min-width: 0; height: 44px; background: transparent; border: 0; color: var(--text); font-size: 16px; }
.dp-search input::placeholder { color: var(--text-muted); }
.dp-search svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
/* Art block: used by the thumbnail, the tile and the last-used card */
.dp-art { position: relative; overflow: hidden; }
.dp-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dp-fill { position: absolute; inset: 0; }
.dp-scrim { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(19,15,29,.1) 0%, rgba(19,15,29,.25) 38%, rgba(19,15,29,.9) 100%); }
/* Fallback art (until the image loads, or if there is none).
   Set the background inline from color identity:
   one color:   linear-gradient(150deg, HUE 0%, #2a2038 100%)
   two colors:  linear-gradient(150deg, HUE1 0%, HUE2 100%)
   three+:      linear-gradient(150deg, HUE1 0%, HUE2 50%, HUE_LAST 100%)
   HUE: W #cbbd8c  U #4d7db0  B #5a4a6a  R #c4573a  G #4f8a62  (art tint only, not mana pips)
   Overlay, inside .dp-art, flip every other deck with transform: scaleX(-1) so they do not all match:
   <svg viewBox="0 0 100 60" preserveAspectRatio="xMidYMax slice" aria-hidden="true" focusable="false"
        style="position:absolute;inset:0;width:100%;height:100%">
     <circle cx="76" cy="17" r="5" fill="#e8dcc0" opacity=".8"/>
     <path d="M0 40 C18 30 38 44 58 35 C78 26 90 36 100 31 V60 H0Z" fill="#130f1d" opacity=".34"/>
     <path d="M0 51 C26 43 52 55 100 45 V60 H0Z" fill="#130f1d" opacity=".55"/>
   </svg> */
/* Last used card */
.dp-last { position: relative; display: block; width: 100%; height: 156px; margin-top: 20px; padding: 0;
  border: 1.5px solid var(--accent); border-radius: 18px; overflow: hidden; background: var(--surface);
  color: var(--dp-on-art); text-align: left; cursor: pointer; }
.dp-last-in { position: absolute; inset: 0; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.dp-last-top { display: flex; align-items: center; justify-content: space-between; }
.dp-last .eyebrow { color: var(--dp-on-art); margin: 0; }
.dp-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px;
  background: #e0662e; color: #1a0f0a; font-size: 13px; font-weight: 800; }
/* ember on art: same in both themes */
.dp-last-bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dp-last-name { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 24px; line-height: 1.1; }
.dp-last-cmd { display: block; margin: 2px 0 8px; color: var(--dp-on-art-muted); font-size: 13px; }
.dp-last .dp-bn-num { color: var(--dp-ember-on-art); font-size: 38px; }
.dp-last .dp-bn-lab { color: var(--dp-on-art-muted); }
/* List header */
.dp-listhead { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.dp-tools { display: flex; align-items: center; gap: 6px; }
.dp-sort { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px 0 12px; background: none; border: 0;
  color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; }
.dp-sort svg { width: 11px; height: 11px; fill: currentColor; }
.dp-view { display: flex; padding: 2px; gap: 2px; background: var(--surface-sunk); border: 1px solid var(--line); border-radius: 999px; }
.dp-view button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; border: 0;
  border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer; }
.dp-view button[aria-pressed="true"] { background: var(--surface-raised); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.dp-view svg { width: 18px; height: 18px; fill: currentColor; }
/* Bracket numeral (list rows, last used card) */
.dp-bn { display: flex; flex-direction: column; align-items: center; min-width: 56px; text-align: center; }
.dp-bn-num { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 32px; line-height: 1; color: var(--accent); }
.dp-bn-none { color: var(--text-muted); opacity: .7; }
.dp-bn-lab { margin-top: 4px; color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.1; }
/* List view */
.dp-list { display: flex; flex-direction: column; gap: 10px; }
.dp-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 80px;
  padding: 8px 14px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); text-align: left; cursor: pointer; }
.dp-row:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.dp-thumb { width: 76px; height: 64px; border-radius: 10px; }
.dp-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 700; line-height: 1.25; }
.dp-cmd { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-muted); font-size: 13px; line-height: 1.25; }
.dp-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
/* Tiles view */
.dp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dp-tile { position: relative; display: block; width: 100%; height: 176px; padding: 0; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; background: var(--surface); color: var(--dp-on-art); text-align: left; cursor: pointer; }
.dp-tile:hover { border-color: var(--line-strong); }
.dp-tile-in { position: absolute; inset: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; justify-content: space-between; }
.dp-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dp-chip { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--dp-scrim-bg); color: var(--dp-ember-on-art); font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 21px; line-height: 1; }
.dp-chip-none { color: #b9aec4; font-size: 18px; }
.dp-tile-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 16px; line-height: 1.18; }
.dp-tile-cmd { display: block; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--dp-on-art-muted); font-size: 12px; }
/* Color symbols on art need a ring so they read on bright art */
.dp-last .mana-pip, .dp-tile .mana-pip { box-shadow: 0 0 0 1.5px rgba(19, 15, 29, .7); }
/* Skeleton rows while an Archidekt list loads */
.dp-skel { height: 80px; border-radius: 16px; background: var(--surface-sunk); border: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) { .dp-skel { animation: dp-pulse 1.4s ease-in-out infinite; } }
@keyframes dp-pulse { 50% { opacity: .55; } }
/* Focus */
.dp-last:focus-visible, .dp-row:focus-visible, .dp-tile:focus-visible, .dp-sort:focus-visible,
.dp-view button:focus-visible, .dp-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Sort menu */
.dp-listhead { position: relative; }
.dp-menu { position: absolute; right: 0; top: 48px; z-index: 5; width: 210px; padding: 6px; background: var(--surface-raised);
  border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 14px 32px rgba(0, 0, 0, .35); }
.dp-menu-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 12px; border: 0;
  border-radius: 10px; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.dp-menu-btn[aria-pressed="true"] { background: var(--surface-sunk); font-weight: 800; }
.dp-menu-btn:disabled { color: var(--text-muted); opacity: .55; cursor: default; }
.dp-menu-btn svg { width: 14px; height: 14px; fill: var(--accent); }
.dp-menu-note { margin: 2px 12px 6px; color: var(--text-muted); font-size: 12px; }
.dp-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Card count warning */
.dp-count-warn { display: inline-flex; align-items: center; gap: 6px; color: var(--flag-warm); font-weight: 700; }
.dp-count-warn svg { width: 13px; height: 13px; fill: currentColor; }
.dp-warn-tile { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin: 5px auto 0 6px;
  border-radius: 50%; background: var(--dp-scrim-bg); color: #e0b95a; }
/* fixed warm: sits on art */
.dp-warn-tile svg { width: 14px; height: 14px; fill: currentColor; }
.dp { display: block; }
.dp-body { display: block; }
.dp .eyebrow, .dp-last .eyebrow { font: 800 11px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.dp-last .eyebrow { color: var(--dp-on-art); }
.dp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dp-search { position: relative; cursor: text; }
.dp-search input { font-family: var(--font-body); outline: none; -webkit-appearance: none; appearance: none; }
.dp-search input::-webkit-search-cancel-button { display: none; }
.dp-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-search input:focus-visible { outline: none; }
.dp-last, .dp-row, .dp-tile, .dp-sort, .dp-menu-btn { font-family: var(--font-body); }
.dp-fillall { position: absolute; inset: 0; }
.dp-hills { position: absolute; inset: 0; pointer-events: none; }
.dp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.dp-img.is-in { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .dp-img { transition: opacity 240ms ease; } }
.dp-last-text { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; }
.dp-last-name { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.dp-last-cmd { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.dp-last .dp-bn-num { color: var(--dp-ember-on-art); }
.dp-last .dp-bn-lab { color: var(--dp-on-art-muted); }
.dp-last .dp-bn-none { color: #b9aec4; }
.dp-pips { display: inline-flex; align-items: center; min-height: 0; }
.dp-pips:empty { display: none; }
.dp-tile-left { display: flex; align-items: flex-start; min-width: 0; }
.dp-tile-bot { display: block; }
.dp-tile-name { margin: 0; }
.dp-listhead .eyebrow { margin: 0; }
.dp-none { margin: 22px 0 0; text-align: center; color: var(--text-muted); font: 500 14px var(--font-body); }
.dp-menu-btn span { display: inline-flex; }
.dp-sort-arrow { display: inline-flex; }
.dp-list, .dp-grid { margin-top: 4px; }
.dp-skel { margin-top: 0; }
.dp-count-warn svg { flex: none; }
.dp-bn-lab { white-space: nowrap; }
.dp-meta { flex-wrap: wrap; row-gap: 4px; }

/* Select mode (the decks page's Import from Archidekt): a tick circle on each deck, a tag when it cannot be ticked */
.dp-row { position: relative; }
.dp-check { position: absolute; top: 14px; left: 14px; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(239, 230, 218, .9); background: rgba(19, 15, 29, .55); color: transparent; }
.dp-check svg { width: 14px; height: 14px; fill: currentColor; }
.dp-tile .dp-check { top: auto; left: auto; right: 10px; bottom: 10px; }
.is-selected .dp-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dp-row.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.dp-tile.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.dp-row.is-locked, .dp-tile.is-locked { cursor: default; }
.dp-row.is-locked .dp-thumb, .dp-row.is-locked .dp-row-main, .dp-row.is-locked .dp-bn { opacity: .6; }
.dp-lock { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface-raised); color: var(--text-muted); font: 700 11px var(--font-body); white-space: nowrap; }
.dp-tile .dp-lock { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--dp-scrim-bg); color: var(--dp-on-art); border-color: rgba(239, 230, 218, .4); }
.dp-tile.is-locked .dp-art { opacity: .55; }
.dp-row:focus-visible, .dp-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The library's sort choice and its tiles-or-list switch (static/js/deck-view.js) */
.deck-sort { height: 44px; max-width: 200px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.deck-view-toggle { display: inline-flex; gap: 4px; }
.deck-view-toggle .icon-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); color: var(--accent); }

/* List view: one deck to a row, a small picture on the left and its numbers on the right */
.deck-library--list { grid-template-columns: 1fr; gap: var(--space-3); }
.deck-library--list .deck-card { flex-direction: row; align-items: stretch; height: auto; }
.deck-library--list .deck-card__art { width: 132px; height: auto; min-height: 88px; flex: none; border-radius: var(--radius-panel) 0 0 var(--radius-panel); }
.deck-library--list .deck-card__art::after { display: none; }
.deck-library--list .deck-card__menu-wrap { top: 8px; right: 8px; }
/* list rows: the favorite star sits under the ... button, a little smaller, so it never covers the scores (2026-11-08) */
.deck-library--list .deck-card__menu-wrap { flex-direction: column; align-items: center; gap: 6px; }
.deck-library--list .deck-card__menu, .deck-library--list .deck-card__fav { width: 34px; height: 34px; }
.deck-library--list .deck-card__fav { order: 1; }
.deck-library--list .deck-card__body { flex: 1; min-width: 0; padding: 10px 56px 10px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name scores" "commander scores" "meta scores"; column-gap: 16px; row-gap: 2px; align-items: center; }
.deck-library--list .deck-card__name { grid-area: name; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-library--list .deck-card__commander { grid-area: commander; }
.deck-library--list .deck-card__meta { grid-area: meta; }
.deck-library--list .deck-card__scores { grid-area: scores; margin: 0; padding: 0; }
.deck-library--list .deck-score { padding: 6px 10px; min-width: 76px; }
.deck-library--list .deck-score__n { font-size: 22px; }
@media (max-width: 640px) {
  .deck-library--list .deck-card__art { width: 84px; }
  .deck-library--list .deck-card__body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "commander" "meta" "scores"; padding-right: 48px; }
  .deck-library--list .deck-card__scores { padding-top: 6px; }
  /* the search box takes a line to itself; sort, view and filter share the next one (one row pushed the filter button off the screen) */
  .deck-filter-row { flex-wrap: wrap; }
  .deck-filter-search { flex: 1 1 100%; }
  .deck-sort { flex: 1 1 0; min-width: 0; max-width: none; }   /* shrinks so Select and the filter button stay on its line */
}

/* Public decks: below the person's own decks; first when they have none yet (decks.js sets data-empty) */
.deck-public { margin-top: var(--space-6); }
.deck-public h2 { margin: 0 0 var(--space-1); }
.deck-public__note { margin: 0 0 var(--space-4); color: var(--text-muted); }
/* with no decks of their own the start form comes first (a new person must see how to begin before a list of other people's decks), public decks below it */
#decks-layout[data-empty] { display: flex; flex-direction: column; }
#decks-layout[data-empty] .deck-public { order: 1; }
