/* ==========================================================================
   Draft Simulator — draft.css
   Dark-theme styles for the 3-phase draft UI.
   ========================================================================== */

/* ── App shell ──────────────────────────────────────────────────────────── */
.draft-app {
  flex: 1 0 auto;   /* Fills remaining space in flex-column body → footer always at page end */
  padding: 0 0 3rem;
}

/* Phase visibility */
.draft-phase { width: 100%; }

/* ── Setup phase ─────────────────────────────────────────────────────────── */
.draft-setup-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
  text-align: center;
}

.draft-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold, #c9a84c);
  margin-bottom: .5rem;
}

.draft-subtitle {
  color: var(--text-muted, #aaa);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.tier-note { display: block; font-size: .9rem; margin-top: .4rem; }
.upgrade-link { color: var(--gold, #c9a84c); font-weight: 600; }

.setup-card {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  text-align: left;
}

.setup-label {
  display: block;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--text, #f0f0f0);
}

.draft-set-select {
  background: var(--bg-input, #14141f);
  color: var(--text, #f0f0f0);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  margin-bottom: .5rem;
}
.draft-set-select:focus { outline: none; border-color: var(--gold, #c9a84c); }

.set-card-count { font-size: .8rem; color: var(--text-muted, #888); margin: .2rem 0 1rem; }

.draft-start-btn { width: 100%; margin-top: .5rem; }

.draft-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
}

.draft-info-card {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: 10px;
  padding: 1.2rem;
}
.draft-info-card .info-icon { font-size: 1.5rem; display: block; margin-bottom: .4rem; }
.draft-info-card strong { color: var(--gold, #c9a84c); }
.draft-info-card p { font-size: .85rem; color: var(--text-muted, #aaa); margin: .4rem 0 0; }

/* ── My Drafts (setup page) ──────────────────────────────────────────────── */

.my-drafts-section {
  margin-top: 2rem;
  text-align: left;
}
.my-drafts-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold, #c9a84c);
  margin-bottom: .75rem;
  letter-spacing: .03em;
}
.my-drafts-group-label {
  font-size: .75rem;
  color: var(--text-muted, #aaa);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: .5rem 0 .4rem;
}
.my-drafts-list { display: flex; flex-direction: column; gap: .5rem; }

.my-draft-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.my-draft-row:hover { border-color: var(--gold, #c9a84c); background: rgba(201,168,76,.07); }
.my-draft-row--active { border-color: rgba(201,168,76,.3); }
.my-draft-row--done   { opacity: .75; }

.my-draft-info { flex: 1; min-width: 0; }
.my-draft-set  { display: block; font-weight: 600; color: #e0e0e0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-draft-meta { display: block; font-size: .78rem; color: var(--text-muted, #aaa); margin-top: .15rem; }

.my-draft-bar-wrap {
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  flex-shrink: 0;
}
.my-draft-bar { height: 100%; background: var(--gold, #c9a84c); border-radius: 2px; }

/* Override the global width:100% on .opt-btn-primary so it stays compact in the row */
.my-draft-row .opt-btn-primary,
.my-draft-row .opt-btn-secondary {
  width: auto;
  padding: 6px 16px;
  font-size: .82rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Draft board ─────────────────────────────────────────────────────────── */

.draft-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--bg-nav, #0d0d1a);
  border-bottom: 1px solid rgba(201,168,76,.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.draft-pack-label {
  font-weight: 700;
  color: var(--gold, #c9a84c);
  font-size: 1.05rem;
  white-space: nowrap;
}
.draft-pick-label { color: var(--text-muted, #aaa); font-size: .9rem; white-space: nowrap; }

.draft-progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  overflow: hidden;
}
.draft-progress-bar {
  height: 100%;
  background: var(--gold, #c9a84c);
  border-radius: 3px;
  transition: width .3s ease;
}

.pool-count-badge {
  font-size: .8rem;
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.3);
  color: var(--gold, #c9a84c);
  border-radius: 20px;
  padding: .2rem .7rem;
  white-space: nowrap;
}

/* Two-column layout */
.draft-columns {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  padding: 1.25rem 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .draft-columns { grid-template-columns: 1fr; }
}

.col-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted, #aaa);
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Pack grid */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: .6rem;
}

@media (max-width: 480px) {
  .pack-grid { grid-template-columns: repeat(3, 1fr); gap: .3rem; }
}

.pack-card {
  position: relative;
  cursor: pointer;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg-card, #1e1e2e);
  border: 2px solid transparent;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  aspect-ratio: 63/88;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pack-card:hover { border-color: var(--gold, #c9a84c); transform: scale(1.04); z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.pack-card.suggested { border-color: #4caf50; box-shadow: 0 0 14px rgba(76,175,80,.45); }
.pack-card.hate-zone  { border-color: #e53935; }

.pack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pack-card-fallback {
  padding: .5rem;
  font-size: .7rem;
  text-align: center;
  color: var(--text-muted, #aaa);
  word-break: break-word;
}

.rarity-pip {
  position: absolute;
  bottom: 3px;
  right: 4px;
  font-size: .6rem;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.4;
}
.rarity-mythic  { background: #9c27b0; color: #fff; }
.rarity-rare    { background: #c9a84c; color: #000; }
.rarity-uncommon{ background: #607d8b; color: #fff; }
.rarity-common  { background: #37474f; color: #fff; }

/* ── Right column ──────────────────────────────────────────────────────── */
.draft-right-col { display: flex; flex-direction: column; gap: 1rem; }

.suggestion-panel {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 10px;
  padding: 1rem;
}

.suggestion-heading {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold, #c9a84c);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.lock-badge { font-size: .85rem; opacity: .7; }

.suggestion-loading { color: var(--text-muted, #888); font-size: .85rem; }

/* Individual suggestion row */
.suggestion-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .35rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: .2rem;
}
.suggestion-row:hover { background: rgba(255,255,255,.04); }
.suggestion-row.top-pick { background: rgba(76,175,80,.1); border: 1px solid rgba(76,175,80,.3); }

.suggestion-rank { width: 18px; text-align: center; font-size: .75rem; color: var(--text-muted, #888); font-weight: 700; }
.suggestion-thumb { width: 34px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-size: .82rem; font-weight: 600; color: var(--text, #f0f0f0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-meta { font-size: .7rem; color: var(--text-muted, #888); }
.suggestion-score { font-size: .75rem; color: var(--gold, #c9a84c); font-weight: 700; }
.synergy-note { font-size: .65rem; color: #4caf50; margin-top: 1px; }

/* Locked panel */
.suggestion-locked {
  text-align: center;
  padding: 1.2rem .5rem;
}
.lock-icon-wrap { font-size: 2rem; margin-bottom: .5rem; }
.lock-message { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.lock-sub { font-size: .78rem; color: var(--text-muted, #888); margin-bottom: .9rem; }
.lock-cta { display: inline-block; }

/* Set archetypes reference panel */
.archetypes-panel {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
}
.archetypes-panel-heading { font-size: .85rem; color: var(--text-muted, #888); text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem .5rem; margin: 0; }
.archetypes-accordion { }
.archetypes-accordion .accordion-item { background: transparent; border-color: rgba(255,255,255,.06); }
.archetypes-accordion .accordion-button {
  background: transparent;
  color: var(--text, #f0f0f0);
  font-size: .82rem;
  padding: .45rem .75rem;
  gap: .5rem;
  box-shadow: none;
}
.archetypes-accordion .accordion-button:not(.collapsed) { background: rgba(201,168,76,.08); color: var(--gold, #c9a84c); box-shadow: none; }
.archetypes-accordion .accordion-button::after { filter: invert(1) brightness(.6); }
.arch-ref-symbols { font-size: 1rem; flex-shrink: 0; }
.arch-ref-name { font-weight: 600; }
.archetypes-accordion .accordion-body { background: transparent; padding: .4rem .75rem .65rem; }
.archetype-ref-desc { font-size: .75rem; color: var(--text-muted, #aaa); margin-bottom: .4rem; }
.arch-panel-empty { font-size: .8rem; color: var(--text-muted, #888); padding: .75rem 1rem; margin: 0; }

/* Archetype signal badge in suggestion panel */
.archetype-signal-badge {
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 6px;
  padding: .45rem .7rem;
  font-size: .78rem;
  color: var(--gold, #c9a84c);
  margin-bottom: .6rem;
}
.arch-badge-header { font-weight: 600; }
.arch-badge-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .35rem;
}
.arch-badge-kw {
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .65rem;
  color: var(--text-muted, #ccc);
  font-weight: 500;
  letter-spacing: .02em;
}

/* On-plan / off-color tags in suggestion rows */
.arch-fit-tag {
  display: inline-block;
  background: rgba(76,175,80,.18);
  color: #81c784;
  border-radius: 4px;
  padding: 0 .35rem;
  font-size: .65rem;
  margin-left: .3rem;
  font-weight: 600;
}
.arch-off-tag {
  display: inline-block;
  background: rgba(229,57,53,.15);
  color: #ef9a9a;
  border-radius: 4px;
  padding: 0 .35rem;
  font-size: .65rem;
  margin-left: .3rem;
}
.hate-tag {
  display: inline-block;
  background: rgba(229,57,53,.12);
  color: #ef9a9a;
  border-radius: 4px;
  padding: 0 .35rem;
  font-size: .65rem;
  margin-left: .3rem;
  font-weight: 700;
}

/* ── Pack pass direction + dots ──────────────────────────────────────────── */
.pack-pass-dir {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .72rem;
  color: var(--gold, #c9a84c);
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 20px;
  padding: .15rem .55rem;
  margin-left: .5rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.pack-dots {
  display: flex;
  gap: .35rem;
  align-items: center;
}
.pack-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  transition: background .2s;
}
.pack-dot.active {
  background: var(--gold, #c9a84c);
  box-shadow: 0 0 5px rgba(201,168,76,.6);
}

/* ── Pack col header ─────────────────────────────────────────────────────── */
.pack-col-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.pack-cards-left {
  font-size: .75rem;
  color: var(--text-muted, #888);
}

/* ── Pack card name label (always visible) ───────────────────────────────── */
.pack-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .3rem .3rem .25rem;
  background: linear-gradient(to top, rgba(0,0,0,.88) 60%, transparent);
  font-size: .6rem;
  color: #e8e8e8;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  border-radius: 0 0 5px 5px;
  pointer-events: none;
}

/* ── Pack card CMC badge (top-left) ──────────────────────────────────────── */
.pack-card-cmc {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* ── Keyboard shortcut hint ──────────────────────────────────────────────── */
.kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-size: .65rem;
  font-family: monospace;
  padding: 0 .4rem;
  color: var(--text-muted, #aaa);
  margin-left: auto;
  cursor: default;
}

/* ── Suggestion panel: score bar + pick button ───────────────────────────── */
.suggestion-score-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
  margin: .3rem 0 .25rem;
}
.suggestion-score-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .3s ease;
}

.suggestion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  font-size: .65rem;
  min-height: 14px;
}
.synergy-note {
  color: #4caf50;
  font-size: .65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.suggestion-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  flex-shrink: 0;
  min-width: 44px;
}

/* Override old .suggestion-score positioning — now inside .suggestion-actions */
.suggestion-actions .suggestion-score {
  font-size: .78rem;
  color: var(--gold, #c9a84c);
  font-weight: 700;
}

.suggestion-pick-btn {
  background: rgba(201,168,76,.18);
  border: 1px solid rgba(201,168,76,.4);
  border-radius: 5px;
  color: var(--gold, #c9a84c);
  font-size: .68rem;
  font-weight: 700;
  padding: .18rem .5rem;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.suggestion-pick-btn:hover {
  background: rgba(201,168,76,.32);
  border-color: var(--gold, #c9a84c);
}
.suggestion-pick-btn:active { transform: scale(.96); }

/* Top-pick row: stronger highlight with gold left border */
.suggestion-row.top-pick {
  background: rgba(201,168,76,.08);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 8px;
}
.suggestion-row.top-pick .suggestion-name { color: var(--gold, #c9a84c); font-weight: 700; }
.suggestion-row.top-pick .suggestion-pick-btn {
  background: rgba(201,168,76,.28);
}

/* ── Pool strip header + color count badges ──────────────────────────────── */
.pool-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .3rem .75rem;
  margin-bottom: .5rem;
}
.pool-color-counts {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}
.color-count-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.cc-W { background: rgba(245,240,208,.1); border-color: rgba(240,230,180,.3); color: #f5f0d0; }
.cc-U { background: rgba(74,144,217,.12); border-color: rgba(74,144,217,.3); color: #7ab5e8; }
.cc-B { background: rgba(130,80,160,.1);  border-color: rgba(130,80,160,.3); color: #c4a8d8; }
.cc-R { background: rgba(229,57,53,.1);   border-color: rgba(229,57,53,.3); color: #ff8a80; }
.cc-G { background: rgba(76,175,80,.1);   border-color: rgba(76,175,80,.3); color: #80e27e; }

/* ── Progress bar pack markers ───────────────────────────────────────────── */
.draft-progress-bar-wrap { position: relative; }
.draft-progress-pack-marker {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255,255,255,.35);
  pointer-events: none;
  z-index: 1;
  /* sits on top of fill so it remains visible past the fill */
}

/* ── Mobile: pool-strip-header stacks on tiny screens ───────────────────── */
@media (max-width: 480px) {
  .pack-pass-dir { display: none; } /* progress bar colour + dots are enough */
  .pack-col-header { flex-wrap: wrap; gap: .2rem; }
  .suggestion-pick-btn { font-size: .62rem; padding: .15rem .4rem; }
  .suggestion-actions { min-width: 38px; }
  .pool-color-counts { justify-content: flex-end; }
}

/* ── Pool strip ─────────────────────────────────────────────────────────── */
.pool-strip-wrap {
  padding: .75rem 1rem .25rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.pool-strip-label {
  font-size: .8rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.pool-strip {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .6rem;
  scrollbar-width: thin;
  align-items: flex-start;
}
.pool-strip::-webkit-scrollbar { height: 4px; }
.pool-strip::-webkit-scrollbar-thumb { background: rgba(201,168,76,.3); border-radius: 2px; }

/* Each card in the pool strip: image + name label */
.pool-card-wrap {
  flex-shrink: 0;
  width: 66px;
  text-align: center;
}

.pool-thumb {
  width: 66px;
  height: 92px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid rgba(201,168,76,.2);
  transition: transform .1s;
  display: block;
}
.pool-thumb:hover { transform: scale(1.12); z-index: 5; position: relative; }

.pool-card-name {
  font-size: .58rem;
  color: var(--text-muted, #999);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 66px;
  margin-top: 3px;
  line-height: 1.2;
}

/* ── Report phase ──────────────────────────────────────────────────────── */
.report-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid rgba(201,168,76,.2);
}
.report-title { font-size: 1.8rem; font-weight: 700; color: var(--gold, #c9a84c); margin: 0; flex: 1 1 auto; }
.report-set-name { color: var(--text-muted, #aaa); font-size: .9rem; margin: 0; }
.report-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.report-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1rem;
}
.stat-card {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(201,168,76,.18);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted, #888); margin-bottom: .3rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--gold, #c9a84c); }

.report-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0 1rem 1.25rem;
}
.chart-card {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 1rem;
}
.chart-title { font-size: .85rem; font-weight: 600; color: var(--text, #f0f0f0); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .04em; }

.report-section { padding: 0 1rem 2rem; }
.section-title { font-size: 1.2rem; font-weight: 700; color: var(--text, #f0f0f0); margin-bottom: .3rem; }
.section-sub { font-size: .85rem; color: var(--text-muted, #888); margin-bottom: 1rem; }

.archetype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.archetype-card {
  background: var(--bg-card, #1e1e2e);
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid rgba(201,168,76,.25);
}
.archetype-rank-badge {
  display: inline-block;
  background: var(--gold, #c9a84c);
  color: #000;
  font-weight: 700;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: .4rem;
}
.archetype-name { font-size: 1.05rem; font-weight: 700; color: var(--text, #f0f0f0); margin-bottom: .15rem; }
.archetype-score { font-size: .78rem; color: var(--text-muted, #888); margin-bottom: .75rem; }
.archetype-cards-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.archetype-mini-card { width: 60px; height: 84px; border-radius: 5px; object-fit: cover; border: 1px solid rgba(255,255,255,.12); }
.archetype-mini-name { font-size: .68rem; color: var(--text-muted, #aaa); width: 60px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.picks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.pick-card {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: .5rem;
  width: 126px;
  text-align: center;
}
.pick-img { width: 114px; height: 160px; object-fit: cover; border-radius: 5px; margin-bottom: .4rem; }
.pick-name { font-size: .78rem; color: var(--text, #f0f0f0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-rarity { font-size: .68rem; color: var(--text-muted, #888); }

/* Bot pools accordion (reuse Bootstrap accordion with dark override) */
.report-accordion .accordion-item { background: var(--bg-card, #1e1e2e); border-color: rgba(255,255,255,.08); }
.report-accordion .accordion-button { background: var(--bg-card, #1e1e2e); color: var(--text, #f0f0f0); }
.report-accordion .accordion-button:not(.collapsed) { background: rgba(201,168,76,.08); color: var(--gold, #c9a84c); }
.report-accordion .accordion-button::after { filter: invert(1); }
.report-accordion .accordion-body { background: var(--bg-card, #1e1e2e); }

.full-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}
.full-pool-thumb { width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 5px; border: 1px solid rgba(255,255,255,.1); }

/* ── Card tooltip ──────────────────────────────────────────────────────── */
.card-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: opacity .1s;
  filter: drop-shadow(0 16px 48px rgba(0,0,0,.85));
}
.card-tooltip img {
  width: 320px;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,.85);
}

/* ── Pack loading overlay ────────────────────────────────────────────────── */
.pack-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  pointer-events: all; /* block clicks on the grid beneath */
}
.pack-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(201,168,76,.2);
  border-top-color: var(--gold, #c9a84c);
  border-radius: 50%;
  animation: spinnerRotate .7s linear infinite;
}
@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}
.pack-loading-text {
  font-size: .85rem;
  color: var(--text-muted, #aaa);
  letter-spacing: .04em;
  margin: 0;
}

/* ── Picking animation ─────────────────────────────────────────────────── */
@keyframes pickFade {
  0%   { opacity:1; transform:scale(1); }
  50%  { opacity:.4; transform:scale(.95); }
  100% { opacity:0; transform:scale(.9); }
}
.pack-card.picking { animation: pickFade .25s forwards; }

/* ════════════════════════════════════════════════════════════════════════
   Report — Tab navigation
   ════════════════════════════════════════════════════════════════════════ */
.report-tab-nav {
  display: flex;
  gap: 0;
  padding: 0 1rem;
  border-bottom: 2px solid rgba(201,168,76,.18);
  background: var(--bg-nav, #0d0d1a);
  position: sticky;
  top: 0;
  z-index: 80;
}
.report-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .7rem 1.1rem;
  color: var(--text-muted, #888);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.report-tab:hover  { color: var(--gold, #c9a84c); }
.report-tab.active { color: var(--gold, #c9a84c); border-bottom-color: var(--gold, #c9a84c); }

/* ── Report header updated ─────────────────────────────────────────────── */
.report-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1rem .75rem;
  border-bottom: 1px solid rgba(201,168,76,.15);
}

/* ── Insights callout ──────────────────────────────────────────────────── */
.report-insights {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 0 1rem 1rem;
  background: rgba(201,168,76,.05);
  border: 1px solid rgba(201,168,76,.18);
  border-radius: 10px;
  padding: .85rem 1.1rem;
}
.insight-chip {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
}
.insight-chip .insight-icon { font-size: .95rem; flex-shrink: 0; }
.insight-chip.good  { color: #81c784; }
.insight-chip.warn  { color: #ffb74d; }
.insight-chip.info  { color: #90caf9; }

/* ── Pool tab toolbar ──────────────────────────────────────────────────── */
.pool-tab-toolbar {
  padding: .85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.pool-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.filter-label {
  font-size: .75rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: .2rem;
}
.pool-filter-pill {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  padding: .22rem .7rem;
  font-size: .8rem;
  color: #bbb;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pool-filter-pill:hover { border-color: var(--gold, #c9a84c); color: var(--gold, #c9a84c); }
.pool-filter-pill.active {
  background: rgba(201,168,76,.13);
  border-color: var(--gold, #c9a84c);
  color: var(--gold, #c9a84c);
  font-weight: 700;
}
.color-pill-W.active { background: rgba(245,240,208,.12); border-color: #f0e8b0; color: #f5f0d0; }
.color-pill-U.active { background: rgba(74,144,217,.13);  border-color: #4a90d9; color: #7ab5e8; }
.color-pill-B.active { background: rgba(130,80,160,.13);  border-color: #9e7bb5; color: #c4a8d8; }
.color-pill-R.active { background: rgba(229,57,53,.13);   border-color: #e53935; color: #ff8a80; }
.color-pill-G.active { background: rgba(76,175,80,.13);   border-color: #4caf50; color: #80e27e; }
.pool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
}
.pool-sort-select {
  background: var(--bg-card, #1e1e2e);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  color: #eee;
  padding: .22rem .5rem;
  font-size: .8rem;
  margin-left: .3rem;
}
.pool-group-toggle { cursor: pointer; display: flex; align-items: center; gap: .3rem; }

/* ── Pool tab card grid ────────────────────────────────────────────────── */
.pool-tab-grid { padding: 1rem; }
.pool-type-group { margin-bottom: 1.5rem; }
.pool-type-group-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted, #888);
  margin-bottom: .55rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.pool-type-group-cards { display: flex; flex-wrap: wrap; gap: .5rem; }

.pool-tab-card {
  position: relative;
  width: 96px;
  cursor: pointer;
  transition: transform .1s;
}
.pool-tab-card:hover { transform: translateY(-2px); }
.pool-tab-img {
  width: 96px;
  height: 134px;
  object-fit: cover;
  border-radius: 6px;
  border-left: 3px solid rgba(255,255,255,.1);
  display: block;
}
.pool-tab-name {
  font-size: .64rem;
  color: var(--text-muted, #999);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 96px;
  margin-top: 3px;
  text-align: center;
}
.pool-tab-cmc-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Rarity left-border colours on pool tab cards */
.rarity-border-mythic   { border-left-color: #e87d2d !important; box-shadow: 0 0 6px rgba(232,125,45,.25); }
.rarity-border-rare     { border-left-color: #c9a84c !important; }
.rarity-border-uncommon { border-left-color: #90a4ae !important; }
.rarity-border-common   { border-left-color: rgba(255,255,255,.12) !important; }

/* Rarity tint on Overview pick cards */
.rarity-pick-mythic   { border-top: 2px solid #e87d2d; }
.rarity-pick-rare     { border-top: 2px solid #c9a84c; }
.rarity-pick-uncommon { border-top: 2px solid #90a4ae; }
.pick-rarity-mythic   { color: #e87d2d !important; }
.pick-rarity-rare     { color: #c9a84c !important; }
.pick-rarity-uncommon { color: #b0bec5 !important; }
.pick-rarity-common   { color: #555 !important; }

/* ── Archetype coverage bar ────────────────────────────────────────────── */
.archetype-coverage-bar-wrap { margin: .5rem 0 .7rem; }
.archetype-coverage-label {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-muted, #888);
  margin-bottom: .25rem;
}
.archetype-coverage-bar-bg {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
}
.archetype-coverage-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #4a90d9, #c9a84c);
  transition: width .6s ease;
}

/* Have / missing chips under coverage bar */
.arch-have-list { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.arch-have-chip {
  background: rgba(76,175,80,.16);
  color: #81c784;
  border-radius: 20px;
  font-size: .68rem;
  padding: .1rem .5rem;
  white-space: nowrap;
}
.arch-missing-chip {
  background: rgba(255,255,255,.05);
  color: #666;
  border-radius: 20px;
  font-size: .68rem;
  padding: .1rem .5rem;
  white-space: nowrap;
  text-decoration: line-through;
}

/* ════════════════════════════════════════════════════════════════════════
   Mobile — phones portrait  (≤ 480 px)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  /* ── Setup phase ─────────────────────────────────────────────────── */
  .draft-setup-inner { padding: 1.25rem .75rem 1rem; }
  .draft-title       { font-size: 1.65rem; }
  .draft-subtitle    { font-size: .92rem; }
  .setup-card        { padding: 1.1rem .9rem; }
  .draft-info-grid   { grid-template-columns: 1fr; }

  /* ── Draft board header ─────────────────────────────────────────── */
  .draft-header {
    flex-wrap: wrap;
    padding: .5rem .75rem;
    gap: .3rem .5rem;
  }
  .draft-header-left  { flex: 1 1 auto; }
  .draft-header-right { flex: 0 0 auto; }
  .draft-progress-bar-wrap { width: 100%; order: 10; }

  /* ── Tab nav: horizontal scroll, no wrap ────────────────────────── */
  .report-tab-nav {
    padding: 0 .5rem;
    overflow-x: auto;
    /* hide thumb so it doesn't consume height */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .report-tab-nav::-webkit-scrollbar { display: none; }
  .report-tab {
    padding: .6rem .75rem;
    font-size: .76rem;
    /* keep emoji + text together so nothing wraps mid-label */
    flex-shrink: 0;
  }

  /* ── Report header ──────────────────────────────────────────────── */
  .report-header {
    flex-direction: column;
    align-items: flex-start;
    padding: .9rem .75rem .6rem;
    gap: .65rem;
  }
  .report-title { font-size: 1.25rem; }
  .report-actions {
    width: 100%;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
  }
  /* Each action button stretches to fill the row evenly */
  .report-actions > * { flex: 1 1 auto; text-align: center; font-size: .8rem; padding: .42rem .5rem; }

  /* ── Stats row: 2-column grid ───────────────────────────────────── */
  .report-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: .55rem;
    padding: .75rem .75rem;
  }
  .stat-card   { padding: .75rem .6rem; }
  .stat-value  { font-size: 1.25rem; }
  .stat-label  { font-size: .68rem; }

  /* ── Insights callout ───────────────────────────────────────────── */
  .report-insights {
    margin: 0 .75rem .75rem;
    padding: .65rem .85rem;
    gap: .35rem .9rem;
  }
  .insight-chip { font-size: .78rem; }

  /* ── Charts: single column ──────────────────────────────────────── */
  .report-charts-row {
    grid-template-columns: 1fr;
    padding: 0 .75rem .9rem;
    gap: .65rem;
  }

  /* ── Picks grid ─────────────────────────────────────────────────── */
  .picks-grid { gap: .45rem; }
  .pick-card  { width: 96px; }
  .pick-img   { width: 84px; height: 118px; }

  /* ── Report sections ────────────────────────────────────────────── */
  .report-section { padding: 0 .75rem 1.25rem; }
  .section-title  { font-size: 1rem; }

  /* ── Pool toolbar: pills scroll horizontally ────────────────────── */
  .pool-tab-toolbar {
    padding: .6rem .75rem;
    gap: .5rem .75rem;
  }
  .pool-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1px;
    /* extend to page edge so pills aren't clipped */
    margin-right: -0.75rem;
    padding-right: .75rem;
  }
  .pool-filters::-webkit-scrollbar { display: none; }
  .pool-filter-pill {
    flex-shrink: 0;
    padding: .2rem .6rem;
    font-size: .74rem;
    /* min touch target */
    min-height: 30px;
    display: flex;
    align-items: center;
  }
  /* Controls on its own line */
  .pool-controls {
    width: 100%;
    justify-content: flex-start;
    gap: .5rem 1rem;
  }
  .filter-label { font-size: .72rem; }

  /* ── Pool card grid: tighter cards ─────────────────────────────── */
  .pool-tab-grid { padding: .65rem .75rem; }
  .pool-tab-card { width: 78px; }
  .pool-tab-img  { width: 78px; height: 108px; }
  .pool-tab-name { width: 78px; font-size: .58rem; }

  /* ── Archetype grid: single column ─────────────────────────────── */
  .archetype-grid { grid-template-columns: 1fr; }
  .archetype-mini-card { width: 50px; height: 70px; }
  .archetype-mini-name { width: 50px; }

  /* ── Card tooltip: smaller to avoid blocking content on mid screens ── */
  .card-tooltip img { width: 200px; }

  /* ── Full pool grid ─────────────────────────────────────────────── */
  .full-pool-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}

/* ════════════════════════════════════════════════════════════════════════
   Mobile — tablets & large phones / landscape  (481 px – 768 px)
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 481px) and (max-width: 768px) {

  /* ── Tab nav: still allow gentle scroll if device is narrow ──────── */
  .report-tab-nav { overflow-x: auto; scrollbar-width: none; }
  .report-tab-nav::-webkit-scrollbar { display: none; }
  .report-tab { flex-shrink: 0; }

  /* ── Report header ──────────────────────────────────────────────── */
  .report-title { font-size: 1.5rem; }
  .report-actions > * { font-size: .82rem; }

  /* ── Stats: 3-column (5 items → last spans 2 would be messy,
       so we keep auto-fit and let the 5th center itself) ────────── */
  .report-stats-row { grid-template-columns: repeat(3, 1fr); }

  /* ── Charts: 2 + 1 layout ───────────────────────────────────────── */
  .report-charts-row { grid-template-columns: repeat(2, 1fr); }

  /* ── Pool tab cards slightly smaller ───────────────────────────── */
  .pool-tab-card { width: 86px; }
  .pool-tab-img  { width: 86px; height: 120px; }
  .pool-tab-name { width: 86px; }

  /* ── Pool filter pills: allow scroll on very narrow tablets ──────── */
  .pool-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .pool-filters::-webkit-scrollbar { display: none; }
  .pool-filter-pill { flex-shrink: 0; }

  /* ── Archetype grid: ensure ≥1 col on narrow tablets ─────────────── */
  .archetype-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW DRAFT INTERACTION FEATURES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Undo & copy-link buttons in header ─────────────────────────────────── */
.btn-undo {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: #ccc;
  border-radius: 6px;
  padding: .3rem .7rem;
  font-size: .8rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-undo:hover:not(:disabled) {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.btn-undo:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.btn-copy-link {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: #aaa;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-copy-link:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

/* ── Pack sort pills ────────────────────────────────────────────────────── */
.pack-sort-pills {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}
.pack-sort-pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #aaa;
  border-radius: 20px;
  padding: .15rem .6rem;
  font-size: .72rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pack-sort-pill:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.pack-sort-pill.active {
  background: rgba(201,168,76,.18);
  border-color: #c9a84c;
  color: #c9a84c;
  font-weight: 600;
}

/* ── Synergy warning in suggestion panel ────────────────────────────────── */
.suggestion-synergy-warning {
  background: rgba(255,152,0,.12);
  border: 1px solid rgba(255,152,0,.3);
  color: #ffb74d;
  border-radius: 6px;
  padding: .45rem .75rem;
  font-size: .78rem;
  margin-bottom: .6rem;
}

/* ── Pick history panel ──────────────────────────────────────────────────── */
.pick-history-panel {
  margin-top: .75rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  overflow: hidden;
}
.pick-history-toggle {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: none;
  color: #ccc;
  padding: .55rem .85rem;
  text-align: left;
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .15s;
}
.pick-history-toggle:hover {
  background: rgba(255,255,255,.08);
}
.pick-history-chevron {
  opacity: .6;
  font-size: .9rem;
}
.pick-history-list {
  max-height: 240px;
  overflow-y: auto;
  padding: .4rem .5rem;
  background: rgba(0,0,0,.2);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.pick-history-empty {
  color: #666;
  font-size: .75rem;
  text-align: center;
  padding: .5rem;
}
.pick-history-entry {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .25rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  flex-wrap: wrap;
}
.pick-history-entry:last-child { border-bottom: none; }
.pick-history-label {
  font-size: .68rem;
  color: #666;
  min-width: 44px;
  font-family: monospace;
}
.pick-history-card {
  font-size: .78rem;
  color: #ddd;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-match-tag {
  font-size: .64rem;
  background: rgba(76,175,80,.15);
  color: #81c784;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}
.pick-off-tag {
  font-size: .64rem;
  background: rgba(96,125,139,.15);
  color: #90a4ae;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}
.pick-splash-tag {
  font-size: .64rem;
  background: rgba(156,39,176,.15);
  color: #ce93d8;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* ── Pool strip colour filter pills ────────────────────────────────────── */
.pool-strip-filters {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  padding: .3rem 0;
}
.pool-strip-pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #aaa;
  border-radius: 20px;
  padding: .12rem .55rem;
  font-size: .72rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pool-strip-pill:hover {
  background: rgba(255,255,255,.11);
  color: #fff;
}
.pool-strip-pill.active {
  background: rgba(201,168,76,.18);
  border-color: #c9a84c;
  color: #c9a84c;
  font-weight: 600;
}

/* ── Mana curve tracker ──────────────────────────────────────────────────── */
.pool-curve-tracker {
  padding: .25rem 0 .1rem;
  min-height: 30px;
}
.curve-dots-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: .2rem;
}
.curve-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  opacity: .85;
}
.curve-count-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .68rem;
  font-family: monospace;
}
.curve-count { opacity: .85; }

/* ── Bot divergence / pivot badges ─────────────────────────────────────── */
.bot-color-sig {
  font-size: .75rem;
  color: #90a4ae;
  margin-left: .25rem;
}
.bot-diverged-badge {
  font-size: .72rem;
  margin-left: .3rem;
  cursor: help;
  opacity: .75;
}
.bot-pivot-badge {
  font-size: .72rem;
  background: rgba(156,39,176,.18);
  color: #ce93d8;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: .25rem;
  font-size: .65rem;
}

/* ── Mobile card detail overlay ─────────────────────────────────────────── */
.mobile-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: overlayFadeIn .18s ease;
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.mobile-card-overlay.d-none { display: none !important; }
.mobile-card-overlay-inner {
  background: #1a1a2e;
  border-top: 1px solid rgba(255,255,255,.1);
  border-radius: 16px 16px 0 0;
  padding: 1.2rem 1rem 2rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.mobile-card-img {
  width: 300px;
  max-width: 92%;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.mobile-card-info {
  text-align: center;
}
.mobile-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: .2rem;
}
.mobile-card-type {
  font-size: .78rem;
  color: #888;
  margin-bottom: .4rem;
}
.mobile-card-oracle {
  font-size: .8rem;
  color: #aaa;
  line-height: 1.45;
  max-height: 80px;
  overflow-y: auto;
}
.mobile-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: .4rem;
}
.mobile-pick-btn {
  font-size: .9rem;
  padding: .65rem;
}

/* ── Responsive adjustments for new elements ─────────────────────────────── */
@media (max-width: 480px) {
  .pack-sort-pills { gap: .25rem; }
  .pack-sort-pill  { font-size: .68rem; padding: .12rem .5rem; }
  .btn-undo        { font-size: .72rem; padding: .25rem .5rem; }
  .curve-dot       { width: 6px; height: 6px; }
  .pick-history-list { max-height: 180px; }
}

/* ── Pack dots label ────────────────────────────────────────────────────── */
.pack-dots-label {
  font-size: .68rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: .3rem;
  align-self: center;
}

/* ── Pack card zoom button ──────────────────────────────────────────────── */
.pack-card-zoom {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  border: 1px solid rgba(255,255,255,.2);
  color: #ddd;
  font-size: .7rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .15s;
  z-index: 4;
  padding: 0;
}
/* Show on card hover (desktop) */
.pack-card:hover .pack-card-zoom {
  opacity: 1;
}
/* Always visible on touch devices */
@media (hover: none) {
  .pack-card-zoom {
    opacity: 1;
    background: rgba(0,0,0,.55);
  }
}
.pack-card-zoom:hover {
  background: rgba(201,168,76,.7);
  border-color: #c9a84c;
  color: #fff;
}
