/* The Banlist view (components/isback-banlist-view.js): card gallery's Banlist tab, shared/. */
.blv-root {
  --blv-panel: rgba(22, 27, 34, 0.78);
  --blv-line: #30363d;
  --blv-text: #e6edf3;
  --blv-muted: #8b949e;
  --blv-red: #e8141c;
  --blv-accent: #00ffcc;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--blv-text);
  font-family: 'Roboto', sans-serif;
}
.blv-root h2, .blv-root h3, .blv-root h4 { margin: 0; font-family: 'Roboto', sans-serif; }
.blv-muted { color: var(--blv-muted); font-size: 0.88rem; }
.blv-count {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 0.4em;
  border-radius: 999px; background: #21262d; color: #c9d1d9; font-size: 0.75rem; font-weight: 700;
}
.blv-root header { padding: 0; background: none; justify-content: initial; flex-wrap: nowrap; position: static; }
.blv-text p { margin: 0 0 0.6rem; line-height: 1.6; color: #c9d1d9; }
.blv-text p:last-child { margin-bottom: 0; }

/* ── Announcement ── */
.blv-ann {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--blv-line);
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(232, 20, 28, 0.14), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(0, 255, 204, 0.06), transparent 60%),
    var(--blv-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.blv-ann-compact { box-shadow: none; }
.blv-hero { background: #0d1117; border-bottom: 1px solid var(--blv-line); }
.blv-hero-img { display: block; width: 100%; max-height: 520px; object-fit: contain; cursor: zoom-in; }
.blv-hero-img:focus-visible { outline: 2px solid var(--blv-accent); outline-offset: -2px; }
.blv-zoom {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 12px;
  background: rgba(1, 4, 9, 0.92); cursor: zoom-out; touch-action: pinch-zoom;
}
.blv-zoom img { max-width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.blv-zoom-x {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #30363d; background: rgba(22, 27, 34, 0.9); color: #e6edf3; font-size: 1.1rem; cursor: pointer;
}
.blv-ann-body { padding: 1.4rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; }
.blv-root .blv-ann-head { display: flex; gap: 1rem; align-items: flex-start; }
.blv-ann-headtext { flex: 1 1 auto; min-width: 0; }
.blv-kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.45rem;
  font-family: 'Anton', sans-serif; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: #ff6a6a;
}
.blv-emergency {
  font-family: 'Roboto', sans-serif; letter-spacing: 0.04em; font-size: 0.7rem; font-weight: 800;
  padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--blv-red); color: #fff; text-transform: uppercase;
}
.blv-status {
  font-family: 'Roboto', sans-serif; letter-spacing: 0; text-transform: none; font-size: 0.75rem; font-weight: 600;
  padding: 0.12rem 0.55rem; border-radius: 999px; border: 1px solid #f0c040; color: #f0c040;
}
.blv-status-draft { border-color: #8b949e; color: #c9d1d9; }
.blv-title { font-size: clamp(1.3rem, 3.4vw, 1.75rem); font-weight: 800; line-height: 1.2; margin: 0.25rem 0 0.4rem !important; }
.blv-date {
  display: inline-block; vertical-align: middle; margin-left: 0.35rem;
  font-size: 0.8rem; font-weight: 600; color: var(--blv-muted);
  padding: 0.12rem 0.55rem; border: 1px solid var(--blv-line); border-radius: 999px;
}
.blv-effective { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; color: #c9d1d9; font-size: 0.95rem; }
.blv-effective strong { color: #fff; }
.blv-tz { color: var(--blv-muted); font-size: 0.82rem; font-style: italic; }
.blv-countdown { color: #f0c040; font-weight: 700; }
.blv-dot { flex: none; margin: 0 0.2rem 0 0.2rem; width: 9px; height: 9px; border-radius: 50%; background: #3fb950; box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.18); }
.blv-effective.is-soon .blv-dot { background: #f0c040; box-shadow: 0 0 0 4px rgba(240, 192, 64, 0.18); animation: blv-pulse 1.8s ease-in-out infinite; }
@keyframes blv-pulse { 50% { box-shadow: 0 0 0 7px rgba(240, 192, 64, 0.05); } }
.blv-hero-card { flex: none; width: 92px; }
.blv-share {
  flex: none; display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  padding: 0.5rem 0.9rem; border-radius: 10px; border: 1px solid var(--blv-line); background: #161b22; color: #c9d1d9;
  font-size: 0.88rem; font-weight: 600; transition: border-color 0.15s, color 0.15s;
}
.blv-share:hover, .blv-share.is-copied { border-color: var(--blv-accent); color: var(--blv-accent); }

/* Badges: "3 ▯ Banned" */
.blv-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.blv-badge {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.75rem 0.35rem 0.6rem;
  border-radius: 999px; background: #161b22; border: 1px solid var(--blv-line); font-size: 0.88rem;
}
.blv-badge b { font-size: 1.05rem; font-weight: 800; }
.blv-badge-banned { border-color: rgba(232, 20, 28, 0.6); background: rgba(232, 20, 28, 0.1); }
.blv-badge-limited1 { border-color: rgba(255, 106, 61, 0.55); }
.blv-badge-limited2 { border-color: rgba(240, 136, 62, 0.5); }
.blv-badge-limited3 { border-color: rgba(227, 179, 65, 0.5); }
.blv-badge-unlisted { border-color: rgba(63, 185, 80, 0.45); }
.blv-mini-card {
  position: relative; width: 17px; height: 24px; border-radius: 3px; flex: none; --rk-ban-size: 88%;
  background: linear-gradient(160deg, #3a4250, #1c2129); border: 1px solid #586170;
}
.blv-mini-card[data-ban]::after { top: -6px; right: -8px; }
.blv-mini-kw { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; color: var(--blv-muted); border: 1px solid var(--blv-line); border-radius: 4px; padding: 0 3px; }
.blv-badge-label { color: #c9d1d9; }

/* ── Graph ── */
.blv-graph { border-top: 1px solid var(--blv-line); padding-top: 1rem; }
.blv-graph-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
.blv-graph-head h4 { font-size: 0.95rem; color: var(--blv-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.blv-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #0d1117; border: 1px solid var(--blv-line); }
.blv-seg-btn {
  border: 0; background: transparent; color: var(--blv-muted); cursor: pointer;
  padding: 0.4rem 0.85rem; border-radius: 7px; font-size: 0.85rem; font-weight: 600; min-height: 34px;
}
.blv-seg-btn.active { background: #21262d; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset; }
.blv-flow { display: block; width: 100%; height: auto; max-height: 340px; }
.blv-band { opacity: 0.6; transition: opacity 0.2s; animation: blv-band-in 0.7s cubic-bezier(.2,.8,.3,1) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes blv-band-in { from { opacity: 0; } }
.blv-graph.has-hl .blv-band { opacity: 0.18; }
.blv-graph.has-hl .blv-band.is-hl { opacity: 0.9; }
.blv-node-label { fill: #c9d1d9; font-size: 15px; font-family: 'Roboto', sans-serif; }
.blv-node-n { font-weight: 800; fill: #fff; }
.blv-moves { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.8rem; }
.blv-move { border: 1px solid var(--blv-line); border-radius: 12px; padding: 0.6rem 0.75rem; background: rgba(13, 17, 23, 0.45); transition: border-color 0.2s, background 0.2s; }
.blv-move.is-hl { border-color: #586170; background: rgba(33, 38, 45, 0.7); }
.blv-move-head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; flex-wrap: wrap; }
.blv-arrow { color: var(--blv-muted); }
.blv-move-items { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.55rem; }
.blv-kw-chip { padding: 0.25rem 0.65rem; border-radius: 999px; background: #21262d; border: 1px solid var(--blv-line); font-size: 0.85rem; }

/* Card pictures */
.blv-card {
  position: relative; display: block; padding: 0; border: 0; background: #111; cursor: pointer;
  width: 64px; aspect-ratio: 1086 / 1512; border-radius: 6px; --rk-ban-size: 34%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45); transition: transform 0.15s;
}
.blv-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.blv-card:hover { transform: translateY(-2px); }
.blv-card:focus-visible { outline: 2px solid var(--blv-accent); outline-offset: 2px; }
.blv-hero-card .blv-card { width: 92px; border-radius: 8px; --rk-ban-size: 30%; }
.blv-note-cards .blv-card { width: 110px; border-radius: 8px; --rk-ban-size: 26%; }
.blv-cat-cards .blv-card { width: 100%; border-radius: 8px; --rk-ban-size: 24%; }

/* Notes */
.blv-notes { display: flex; flex-direction: column; gap: 0.75rem; }
.blv-note { border-left: 3px solid #586170; padding: 0.2rem 0 0.2rem 0.9rem; }
.blv-note-head { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 1rem; margin-bottom: 0.35rem !important; }
.blv-note-move { color: var(--blv-muted); font-size: 0.82rem; font-weight: 500; }
.blv-note-cards { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.6rem; }

/* ── The list by category ── (well apart from the announcement above it) */
.blv-list { margin-top: 1.5rem; }
.blv-list-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.4rem; }
.blv-list-head h2 { font-size: 1.3rem; font-weight: 800; padding-left: 0.8rem; }
/* The buttons sit a bit higher, further from the categories; the margins cancel out, so the head
   (and the heading's distance to the categories) stays as it was. */
.blv-list-head .blv-seg { margin: -0.225rem 0 0.225rem; }
.blv-cats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; } /* one category after another */
.blv-cat {
  border-radius: 14px; border: 1px solid var(--blv-line); background: var(--blv-panel);
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0;
}
.blv-cat-banned { border-top: 3px solid var(--blv-red); }
.blv-cat-limited1 { border-top: 3px solid #ff6a3d; }
.blv-cat-limited2 { border-top: 3px solid #f0883e; }
.blv-cat-limited3 { border-top: 3px solid #e3b341; }
/* No cards in it: looks disabled (grayed out, the colored top border too) */
.blv-cat.is-empty { opacity: 0.45; filter: grayscale(1); }
.blv-root .blv-cat-head { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.75rem; align-items: start; }
.blv-cat-ico { font-size: 2rem; line-height: 1; grid-row: span 2; }
.blv-cat-head h3 { font-size: 1.1rem; font-weight: 800; }
.blv-cat-head p { margin: 0.15rem 0 0; color: var(--blv-muted); font-size: 0.88rem; line-height: 1.45; }
.blv-cat-counts { grid-column: 2; color: #c9d1d9; font-size: 0.82rem; font-weight: 600; }
.blv-fold { border-top: 1px solid var(--blv-line); }
.blv-fold > summary, .blv-history > summary, .blv-history-item > summary {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; user-select: none;
  padding: 0.65rem 0.1rem; min-height: 44px; box-sizing: border-box; font-weight: 600;
}
.blv-fold > summary::-webkit-details-marker, .blv-history > summary::-webkit-details-marker, .blv-history-item > summary::-webkit-details-marker { display: none; }
.blv-fold > summary::after, .blv-history > summary::after, .blv-history-item > summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--blv-muted); border-bottom: 2px solid var(--blv-muted);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.2s;
}
.blv-fold[open] > summary::after, .blv-history[open] > summary::after, .blv-history-item[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.blv-kw-list { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.blv-kw-name { font-weight: 700; }
.blv-kw-desc { color: #c9d1d9; font-size: 0.88rem; line-height: 1.5; margin-top: 0.15rem; }
.blv-kw-tag { color: #e6edf3; }
.blv-kw-token { color: #00ffcc; font-style: normal; }
.blv-cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.75rem; padding: 0.35rem 0.25rem 0.75rem; }

/* ── History ── (the bars are panels; an opened announcement gets the same width as the latest) */
.blv-history { margin-top: 1.5rem; }
.blv-history > summary, .blv-history-item > summary {
  border-radius: 14px; border: 1px solid var(--blv-line); background: var(--blv-panel); padding: 0.65rem 1.1rem;
}
.blv-history > summary { font-size: 1.05rem; }
.blv-history[open] > summary, .blv-history-item[open] > summary { border-color: #586170; }
.blv-history-list { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 0.75rem; }
.blv-history-item > summary { font-weight: 500; border-radius: 12px; padding: 0.55rem 1rem; flex-wrap: wrap; row-gap: 0.35rem; }
.blv-history-title { font-weight: 600; }
.blv-history-body { padding-top: 0.75rem; }

.blv-empty { text-align: center; padding: 2.5rem 1rem; border-radius: 18px; border: 1px dashed var(--blv-line); background: var(--blv-panel); }
.blv-empty-ico { font-size: 2.6rem; }
.blv-empty h3 { margin: 0.5rem 0 0.4rem !important; font-size: 1.25rem; }
.blv-empty p { margin: 0 auto; max-width: 34rem; color: var(--blv-muted); line-height: 1.55; }

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .blv-root { gap: 1.1rem; }
  .blv-list { margin-top: 1rem; }
  .blv-ann { border-radius: 14px; box-shadow: none; }
  .blv-ann-body { padding: 1.05rem 1rem 1.2rem; gap: 0.9rem; }
  .blv-root .blv-ann-head { flex-wrap: wrap; }
  .blv-hero-card { display: none; }
  /* Share: just the icon, in the title's top-right corner ("Link copied!" shows when tapped) */
  .blv-root .blv-ann-head { position: relative; padding-right: 2.9rem; }
  .blv-share { position: absolute; top: 0; right: 0; padding: 0.5rem; min-width: 40px; min-height: 40px; justify-content: center; border-radius: 10px; }
  .blv-share span { display: none; }
  .blv-share.is-copied span { display: inline; }
  .blv-cats { grid-template-columns: 1fr; gap: 0.75rem; }
  .blv-cat { padding: 0.85rem 0.9rem; }
  .blv-node-label { font-size: 22px; }
  .blv-card { width: 56px; }
  .blv-note-cards .blv-card { width: 96px; }
  .blv-cat-cards { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 0.6rem; }
  .blv-history { margin-top: 1rem; }
  .blv-history > summary { padding: 0.6rem 0.9rem; }
  .blv-history-item > summary { padding: 0.5rem 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .blv-band, .blv-effective.is-soon .blv-dot { animation: none; }
}
