/* ═══════════════════════════════════════════════════════════════════
   Zilla Engine · B+ broadcast · Phase 7A
   Venues (#11 · boards 64–66), Gallery (#9 · boards 58–61)
   Tokens only (tokens.css); every class bp- prefixed. Loaded after bp-content.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Map art ── */
.bp-vmap { display: block; width: 100%; height: 100%; color: var(--text); background: var(--surface); }

/* ═══════════════ Venues list ═══════════════ */
.bp-vgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.bp-vcard { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-top: 4px solid var(--league-accent); }
.bp-vcard:hover { filter: brightness(1.12); }
.bp-vcard__map { height: 150px; overflow: hidden; }
.bp-vcard__map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-vcard__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.bp-vcard__name { font-size: 26px; line-height: 1; margin: 0; overflow-wrap: anywhere; }
.bp-vcard__where { font-size: 12px; color: var(--muted); margin: 0; }
.bp-vcard__fac { font-size: 12px; color: var(--text); margin: 0; }
.bp-vcard__games { font-size: 12px; color: var(--league-accent); margin: 0; }

/* ═══════════════ Venue detail ═══════════════ */
.bp-vdgrid { display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 32px; margin-top: 20px; align-items: start; }
.bp-vdmain { min-width: 0; }
.bp-vdmap { position: relative; background: var(--surface); border-top: 4px solid var(--league-accent); }
.bp-vdmap .bp-vmap, .bp-vdmap__photo { height: 340px; width: 100%; object-fit: cover; display: block; }
.bp-vdmap__txt { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.bp-vdmap__txt h2 { font-size: 32px; margin: 0; line-height: 1; }
.bp-vdmap__txt p { margin: 0; font-size: 12px; color: var(--muted); }
.bp-vdmap__courts { color: var(--text) !important; }
.bp-vdmap__games { color: var(--league-accent) !important; }
.bp-vdsec { margin-top: 30px; }
.bp-courts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.bp-vcourt { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 16px; background: var(--surface); border-top: 3px solid var(--line-2); min-width: 0; }
.bp-vcourt--live { border-top-color: var(--live); }
.bp-vcourt--next { border-top-color: var(--league-accent); }
.bp-vcourt__name { font-size: 28px; line-height: 1; }
.bp-vcourt__state { font-size: 12px; color: var(--sub); overflow-wrap: anywhere; }
.bp-vcourt--live .bp-vcourt__state { color: var(--live); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bp-vcourt--live .bp-dot { background: var(--live); }
.bp-vcourt__state a:hover { text-decoration: underline; }
.bp-vcourt__meta { font-size: 11px; color: var(--dim); }
.bp-vinfo { padding: 20px 20px 22px; min-width: 0; }
.bp-vinfo__title { font-size: 32px; margin: 0 0 8px; }
.bp-vinfo__list { margin: 0; }
.bp-vinfo__list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.bp-vinfo__list dt { font-size: 12px; color: var(--muted); flex: none; }
.bp-vinfo__list dd { margin: 0; font-size: 19px; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.bp-vinfo__actions { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }

/* ═══════════════ Gallery ═══════════════ */
.bp-gtools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bp-gmenu { position: relative; }
.bp-gmenu__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; background: var(--surface-2); color: var(--text);
  border: 0; cursor: pointer; font-size: 14px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.bp-gmenu__drop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 200px; padding: 6px; background: var(--panel);
  border-top: 3px solid var(--league-accent); box-shadow: 0 18px 40px rgba(0,0,0,.55); display: flex; flex-direction: column; }
.bp-gmenu__drop--scroll { max-height: 320px; overflow-y: auto; }
.bp-gmenu__opt { padding: 8px 12px; font-size: 14px; color: var(--text); }
.bp-gmenu__opt:hover { background: var(--surface-2); }
.bp-gmenu__opt.is-active { color: var(--league-accent); }

/* Album card */
.bp-album { display: flex; flex-direction: column; min-width: 0; background: var(--surface); --tc: var(--league-accent); --tc2: var(--surface-3); }
.bp-album:hover { filter: brightness(1.12); }
.bp-album__mosaic { position: relative; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; height: 170px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 55%, var(--surface)), color-mix(in srgb, var(--tc2) 40%, var(--surface))); }
.bp-album--big .bp-album__mosaic { height: 230px; }
.bp-album__mosaic.is-single { grid-template-columns: 1fr; }
.bp-album__tile { position: relative; background-size: cover; background-position: center; background-color: color-mix(in srgb, var(--tc) 30%, var(--surface-2)); }
.bp-album__tile--1 { grid-row: 1 / span 2; }
.bp-album__mosaic.is-single .bp-album__tile--1 { grid-row: 1 / span 2; }
.bp-album__tile.is-empty { display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.4); background: none; }
.bp-album__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; background: rgba(10,11,12,.72); }
.bp-album__clips { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: rgba(0,0,0,.7); font-size: 11px; }
.bp-album__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.bp-album__name { font-size: 22px; line-height: 1.02; margin: 0; overflow-wrap: anywhere; }
.bp-album--big .bp-album__name { font-size: 26px; }
.bp-album__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); margin: 0; }
.bp-album__crest .bp-crest { --s: 16px; font-size: 7px; }

.bp-gfeat { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-top: 22px; }
.bp-gfeat .bp-album:first-child .bp-album__mosaic { grid-template-columns: 2fr 1fr; }
.bp-agrid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }

/* Clips */
.bp-clips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bp-clips--all { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bp-clip { position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; --tc: var(--league-accent); --tc2: var(--surface-3);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 60%, var(--surface)), color-mix(in srgb, var(--tc2) 45%, var(--surface))); }
.bp-clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-clip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.65)); }
.bp-clip__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 2px solid var(--white); border-radius: 50%; color: var(--white); background: rgba(0,0,0,.25); }
.bp-clip:hover .bp-clip__play { background: var(--league-accent); border-color: var(--league-accent); color: var(--ink); }
.bp-clip__cap { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 1; font-size: 11px; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Album page */
.bp-abar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 18px; }
.bp-abar__back { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; background: var(--surface-2); transform: skewX(-12deg); }
.bp-abar__back > span { transform: skewX(12deg); font-size: 13px; }
.bp-abar__meta { font-size: 13px; color: var(--sub); flex: 1 1 auto; min-width: 0; }
.bp-abar__actions { display: flex; gap: 6px; }
.bp-agame--album { margin: 0 0 18px; }
.bp-masonry { columns: 4 240px; column-gap: 6px; }
.bp-mtile { position: relative; display: block; margin: 0 0 6px; break-inside: avoid; background: var(--surface-2); overflow: hidden; }
.bp-mtile img { width: 100%; height: auto; display: block; transition: transform .25s; }
.bp-mtile:hover img { transform: scale(1.03); }
.bp-mtile.is-clip { aspect-ratio: 16 / 9; }
.bp-mtile.is-clip img { height: 100%; object-fit: cover; }
.bp-mtile__ph { display: flex; align-items: center; justify-content: center; min-height: 160px; color: var(--dim); }
.bp-mtile__dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; background: rgba(0,0,0,.7); font-size: 11px; }

/* ═══════════════ Viewer ═══════════════ */
.bp-viewer { background: var(--black); min-height: calc(100vh - 72px); display: flex; flex-direction: column; }
.bp-viewer__main { display: grid; grid-template-columns: minmax(0, 1fr) 420px; flex: 1; min-height: 0; }
.bp-viewer__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 30px; min-height: 520px; min-width: 0; }
.bp-viewer__img { max-width: 100%; max-height: calc(100vh - 260px); object-fit: contain; display: block; }
.bp-viewer__video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--bg-2); }
.bp-viewer__ext { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
.bp-viewer__close, .bp-viewer__nav { position: absolute; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(14,15,17,.85); color: var(--white); z-index: 2; }
.bp-viewer__close { right: 18px; top: 18px; width: 40px; height: 40px; }
.bp-viewer__nav { top: 50%; width: 52px; height: 52px; transform: translateY(-50%); }
.bp-viewer__nav--prev { left: 14px; } .bp-viewer__nav--next { right: 14px; }
.bp-viewer__nav:hover, .bp-viewer__close:hover { background: var(--league-accent); color: var(--ink); }
.bp-viewer__side { background: var(--bg-2); padding: 28px 24px; min-width: 0; overflow-y: auto; }
.bp-viewer__count { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.bp-viewer__title { font-size: 36px; line-height: .98; margin: 0 0 8px; overflow-wrap: anywhere; }
.bp-viewer__meta { font-size: 12px; color: var(--muted); margin: 0; }
.bp-viewer__label { font-size: 12px; color: var(--muted); margin: 22px 0 8px; }
.bp-viewer__game { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--surface); border-left: 4px solid var(--tc, var(--league-accent)); }
.bp-viewer__game .bp-d { font-size: 22px; line-height: 1.02; }
.bp-viewer__game .bp-l { font-size: 11px; color: var(--muted); }
.bp-viewer__game:hover .bp-d { color: var(--league-accent); }
.bp-viewer__actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.bp-ashare__btn--quiet { color: var(--muted); }
.bp-viewer__done { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--win); margin: 14px 0 0; }
.bp-report { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 14px; background: var(--surface); }
.bp-report .bp-viewer__label { margin-top: 0; }
.bp-report__opt { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sub); cursor: pointer; }
.bp-report textarea, .bp-report input[type=email] { width: 100%; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); font: inherit; font-size: 14px; }
.bp-report .bp-btn { align-self: flex-start; }
.bp-viewer__strip { display: flex; gap: 6px; padding: 12px var(--gutter) 16px; overflow-x: auto; background: var(--bg-2); border-top: 1px solid var(--line); scrollbar-width: thin; }
.bp-viewer__thumb { position: relative; flex: 0 0 110px; height: 72px; background: var(--surface-2); border: 2px solid transparent; overflow: hidden; }
.bp-viewer__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .7; }
.bp-viewer__thumb:hover img, .bp-viewer__thumb.is-current img { opacity: 1; }
.bp-viewer__thumb.is-current { border-color: var(--league-accent); }
.bp-viewer__thumbplay { position: absolute; right: 4px; bottom: 4px; display: inline-flex; padding: 3px; background: rgba(0,0,0,.7); }

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 1100px) {
  .bp-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-vdgrid { grid-template-columns: minmax(0, 1fr); }
  .bp-agrid5, .bp-clips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bp-viewer__main { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 768px) {
  .bp-vgrid { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .bp-vcard__map { height: 110px; }
  .bp-vdmap .bp-vmap, .bp-vdmap__photo { height: 190px; }
  .bp-vinfo__list > div { flex-direction: column; gap: 2px; }
  .bp-vinfo__list dd { text-align: left; font-size: 17px; }
  .bp-courts { grid-template-columns: minmax(0, 1fr); }

  .bp-gtools { width: 100%; }
  .bp-gtools .bp-search { min-width: 0; flex: 1 1 100%; }
  .bp-gfeat { grid-template-columns: minmax(0, 1fr); }
  .bp-album--big .bp-album__mosaic { height: 190px; }
  .bp-agrid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .bp-agrid5 .bp-album__mosaic { height: 120px; }
  .bp-agrid5 .bp-album__name { font-size: 18px; }
  .bp-clips, .bp-clips--all { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .bp-clips--all { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; }
  .bp-clips::-webkit-scrollbar { display: none; }
  .bp-clips .bp-clip { flex: 0 0 78%; scroll-snap-align: start; }
  .bp-masonry { columns: 2; column-gap: 4px; }
  .bp-mtile { margin-bottom: 4px; }
  .bp-abar { gap: 10px; }

  .bp-viewer { min-height: 0; }
  .bp-viewer__main { grid-template-columns: minmax(0, 1fr); }
  .bp-viewer__stage { padding: 12px 0; min-height: 0; }
  .bp-viewer__img { max-height: 62vh; }
  .bp-viewer__nav { width: 40px; height: 40px; }
  .bp-viewer__nav--prev { left: 6px; } .bp-viewer__nav--next { right: 6px; }
  .bp-viewer__close { right: 8px; top: 8px; }
  .bp-viewer__side { padding: 18px 12px 22px; }
  .bp-viewer__title { font-size: 26px; }
  .bp-viewer__strip { padding: 10px 12px; }
  .bp-viewer__thumb { flex-basis: 76px; height: 52px; }
}
