:root {
  --red: #C8102E;
  --red-dark: #9E0B23;
  --red-soft: #FBEAED;
  --ink: #141414;
  --ink-2: #4A4A4A;
  --muted: #767676;
  --line: #E4E4E4;
  --bg: #F6F6F4;
  --card: #FFFFFF;
  --wa: #128C4A;
  --wa-dark: #0C6E39;
  --blue: #1A5FD0;
  --green: #0F7B4A;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 15px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(200,16,46,.45); outline-offset: 2px; }

/* ── header ── */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { height: 48px; width: auto; }
.brand img.brand-logo { height: 54px; }
/* advertisement band */
.banner-band { background: #fff; border-bottom: 1px solid var(--line); }
.banner-band .wrap { padding-top: 10px; padding-bottom: 10px; position: relative; }
.banner-viewport { position: relative; aspect-ratio: 4 / 1; border-radius: 12px; overflow: hidden; background: #F2F2F0; }
.banner-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
/* the band takes the shape of the first picture (set in market.js) and pictures are never cropped */
.banner-track .slide { flex: 0 0 100%; height: 100%; position: relative; overflow: hidden; display: block; background: #F2F2F0; }
.banner-track img { width: 100%; height: 100%; object-fit: contain; display: block; }
.banner-track .slide[data-video] { background: #1a1a1a; }
.banner-track .slide[data-video] img { object-fit: cover; }
/* videos fill the banner (cropped like a cover photo); clicks go to the banner link, not the player */
.banner-track video.bv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.banner-track iframe.bv { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 16 / 9; height: auto; transform: translateY(-50%); border: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .banner-track { transition: none; } }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.banner-dots:empty { display: none; }
.banner-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: #D0D0CE; }
.banner-dots button[aria-current="true"] { background: var(--red); width: 20px; border-radius: 4px; }
/* Top Connectors */
.badge.champ { background: var(--ink); color: #fff; }
.badges-row .badge.champ { border-color: var(--ink); }
.lb { padding: 24px; }
.lb-head { text-align: center; margin-bottom: 14px; }
.lb-head .lb-cup { font-size: 34px; line-height: 1; }
.lb-head h2 { margin: 6px 0 4px; font-size: 22px; }
.lb-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.lb-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.lb-champs { background: var(--red-soft); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lb-podium > div { background: #fff; border-radius: 10px; padding: 10px 6px; display: grid; justify-items: center; gap: 4px; position: relative; }
.lb-podium .lb-medal { position: absolute; top: 4px; left: 6px; font-size: 16px; }
.lb-podium b { font-size: 12.5px; line-height: 1.25; text-align: center; }
.lb-podium small { color: var(--muted); font-size: 12px; }
.lb-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #F0F0EE; border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.lb-tabs button { border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.lb-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; }
.lb-list li:first-child .lb-row { border-color: var(--red); }
.lb-list li.me .lb-row { background: var(--red-soft); }
.lb-me { background: #F0F0EE; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.5; text-align: center; }
.lb-rank { width: 26px; text-align: center; font-weight: 800; color: var(--muted); font-size: 15px; }
.lb-face { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: #EDEDEB; color: var(--ink-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.lb-who { flex: 1; min-width: 0; display: grid; }
.lb-who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-who small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-stars { font-weight: 800; font-size: 14px; white-space: nowrap; }
.lb-empty { margin: 0; padding: 18px 12px; text-align: center; color: var(--muted); background: #FAFAF8; border-radius: 10px; font-size: 14px; }
.lb-chapters { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-chapters span { font-size: 12.5px; background: #F0F0EE; border-radius: 999px; padding: 4px 10px; }
.lb-foot { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.7; }
/* contact revealed after the buyer shares details */
.reveal-number { font-size: 30px; font-weight: 800; letter-spacing: .02em; color: var(--ink); margin: 2px 0 0; }
/* copy protection on the public site (form fields stay usable) */
body.protected { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.protected input, body.protected textarea { -webkit-user-select: text; user-select: text; }
body.protected img { -webkit-user-drag: none; pointer-events: auto; }
@media print { body.protected * { display: none !important; } body.protected::after { content: 'Printing is disabled on Buy in BNI.'; display: block; padding: 40px; font: 16px Arial; } }
.brand .divider { width: 1px; height: 28px; background: var(--line); }
.brand .title { font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .title small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; font-size: 14px; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #bdbdbd; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ── hero ── */
.hero { background: #121212; color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background:
  radial-gradient(900px 400px at 85% -10%, rgba(200,16,46,.55), transparent 60%),
  radial-gradient(600px 300px at -10% 120%, rgba(200,16,46,.28), transparent 60%); }
.hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 60px rgba(255,255,255,.02), 0 0 0 120px rgba(255,255,255,.015); }
.hero .wrap { position: relative; z-index: 1; padding-top: 44px; padding-bottom: 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
.eyebrow .dot { width: 6px; height: 6px; background: #FFB547; border-radius: 50%; box-shadow: 0 0 10px #FFB547; }
.hero h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.1; margin: 16px 0 10px; letter-spacing: -.02em; max-width: 780px; }
.hero p.lead { color: rgba(255,255,255,.75); font-size: clamp(15px, 1.6vw, 18px); margin: 0 0 24px; max-width: 640px; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 22px; }
.stats div { font-size: 13px; color: rgba(255,255,255,.65); }
.stats b { display: block; font-size: 24px; color: #fff; font-weight: 700; }

/* ── search ── */
.search { display: flex; background: #fff; border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); max-width: 760px; }
.search label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 10px; min-width: 0; }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; width: 100%; font-size: 16px; padding: 12px 0; background: transparent; color: var(--ink); }
.search .btn { padding: 12px 22px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; max-width: 760px; align-items: center; }
.quick span { font-size: 12px; color: rgba(255,255,255,.6); margin-right: 2px; }
.quick button { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.quick button:hover { background: rgba(255,255,255,.18); }

/* ── filters ── */
.filters { position: sticky; top: 64px; z-index: 20; background: rgba(246,246,244,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.filters .wrap { padding-top: 12px; padding-bottom: 12px; display: grid; gap: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.chip:hover { border-color: #bbb; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.festive[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.chip svg { width: 15px; height: 15px; }
.chip .count { font-size: 11px; opacity: .7; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.filter-row .left { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.power-team { display: inline-flex; align-items: center; gap: 5px; margin: 8px 0 2px; padding: 4px 10px; border: 1px solid #F1C7CF; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.power-team small { font-weight: 600; color: var(--ink-2); font-size: 11px; }
.power-team:hover { border-color: var(--red); }
.select { appearance: none; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23767676'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  border-radius: 999px; padding: 7px 34px 7px 14px; font-size: 13px; font-weight: 500; max-width: 100%; }
.result-count { font-size: 13px; color: var(--muted); }

/* ── grid + cards ── */
main { padding: 24px 0 64px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 14px 32px rgba(0,0,0,.09); }
.card.top { border-color: rgba(200,16,46,.25); }
.cover { position: relative; height: 136px; background: linear-gradient(135deg, #FAFAFA, #EFEFEF); display: grid; place-items: center; cursor: pointer; border: 0; padding: 0; width: 100%; }
.cover img.logo { max-height: 84px; max-width: 70%; object-fit: contain; }
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: #2a2a2a; text-align: center; padding: 0 28px; line-height: 1.15; }
.wordmark span { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 6px; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; right: 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 4px 8px 4px 6px; border-radius: 999px; letter-spacing: .01em; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.badge svg { width: 13px; height: 13px; }
.badges-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.badges-row .badge { box-shadow: none; border: 1px solid var(--line); }
.badges-row .badge.recommended { border-color: var(--red); }
.badge.recommended { background: var(--red); color: #fff; }
.badge.verified { color: var(--blue); }
.badge.trusted { color: var(--green); }
.badge.green { color: #0B4D2C; }
.badges-row .badge.green { border-color: #9CC3A9; }
.badge .pin-icon { width: 15px; height: 15px; }
.chip .pin-icon { width: 16px; height: 16px; vertical-align: -3px; }
/* BNI Green Member pin on the photo */
.avatar-wrap { position: relative; flex: none; display: inline-block; line-height: 0; }
.pin-mark { position: absolute; right: -6px; bottom: -4px; width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.detail-body .pin-mark { width: 40px; height: 40px; right: -8px; bottom: -4px; }
.card.basic .pin-mark { width: 26px; height: 26px; }
.offer-ribbon { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, var(--red), #E0384F); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 12px 6px 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.offer-ribbon svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.card-body { padding: 0 16px 16px; display: flex; flex-direction: column; flex: 1; }
.who { display: flex; gap: 12px; align-items: flex-end; margin-top: -30px; position: relative; }
.avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); background: #eee; flex: none; }
.who .meta { padding-bottom: 2px; min-width: 0; }
.who .person { font-size: 13px; color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card h3 { margin: 12px 0 2px; font-size: 17px; line-height: 1.3; letter-spacing: -.005em; }
.card h3 button { all: unset; cursor: pointer; }
.card h3 button:hover { color: var(--red); }
.cat { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cat .sep { width: 3px; height: 3px; background: #bbb; border-radius: 50%; }
.cat .chapter { font-weight: 700; color: var(--ink-2); }
.detail { font-size: 14px; color: var(--ink-2); margin: 4px 0 6px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tagline { font-size: 14px; color: var(--ink-2); margin: 8px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 12px; background: #F2F2F0; color: var(--ink-2); padding: 3px 9px; border-radius: 6px; }
.actions { margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
.actions .btn { padding: 10px 8px; }
.icon-btn { width: 42px; padding: 0 !important; }

.card.basic .cover { height: 96px; }
.card.basic .who { margin-top: -26px; }
.card.basic .avatar { width: 56px; height: 56px; }
.soon { font-size: 13px; color: var(--muted); margin: 8px 0 14px; display: flex; align-items: center; gap: 6px; }
.soon::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #C9C9C9; }
.actions.single { grid-template-columns: 1fr; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; }
.skeleton { background: linear-gradient(90deg, #eee, #f6f6f6, #eee); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); height: 360px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── CTA band ── */
.cta { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 40px; }
.cta h3 { margin: 0 0 4px; }
.cta p { margin: 0; color: var(--muted); }
footer { background: #121212; color: rgba(255,255,255,.6); font-size: 13px; padding: 28px 0; }
footer .wrap { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
footer img { height: 34px; }

/* ── modal ── */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal .scrim { position: absolute; inset: 0; background: rgba(10,10,10,.6); animation: fade .2s; }
.modal .panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); max-height: calc(100% - 32px);
  overflow: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .22s ease-out; }
.modal .panel.sm { width: min(460px, calc(100% - 24px)); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
.close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.2); display: grid; place-items: center; z-index: 3; }
.close svg { width: 18px; height: 18px; }
.detail-cover { height: 180px; position: relative; background: linear-gradient(135deg, #FAFAFA, #ECECEC); display: grid; place-items: center; }
.detail-cover img.logo { max-height: 110px; max-width: 60%; object-fit: contain; }
.detail-body { padding: 0 24px 24px; }
.detail-body .who { margin-top: -40px; }
.detail-body .avatar { width: 92px; height: 92px; }
.detail-body h2 { margin: 14px 0 2px; font-size: 24px; letter-spacing: -.01em; }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin: 22px 0 8px; }
.offer-box { border: 1px dashed var(--red); background: var(--red-soft); border-radius: 12px; padding: 14px 16px; margin-top: 18px; }
.offer-box b { color: var(--red-dark); display: block; font-size: 16px; }
.offer-box small { color: var(--ink-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery a { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f0f0f0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 24px; display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; }

/* ── forms ── */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label .req { color: var(--red); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .textarea, .field select { width: 100%; border: 1px solid #D6D6D6; border-radius: 10px; padding: 11px 12px; background: #fff; font-size: 15px; }
.input:focus, .textarea:focus, .field select:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.12); }
.textarea { min-height: 96px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; }
.form-error { color: var(--red-dark); font-size: 13px; font-weight: 500; min-height: 1em; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500; opacity: 0; transition: .25s; z-index: 200; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--wa-dark); }
.toast.err { background: var(--red-dark); }
.demo-bar { background: #FFF4D6; color: #6B4E00; font-size: 13px; text-align: center; padding: 8px 16px; border-bottom: 1px solid #F1DFA6; }

@media (max-width: 640px) {
  .topbar .wrap { height: 58px; }
  .filters { position: static; }
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stats div { font-size: 11px; line-height: 1.3; }
  .brand img { height: 32px; }
  .brand img.brand-logo { height: 40px; }
  .brand .title { font-size: 13px; }
  .hero .wrap { padding-top: 30px; padding-bottom: 26px; }
  .search .btn { padding: 12px 14px; }
  .stats { gap: 20px; }
  .stats b { font-size: 20px; }
  .row2 { grid-template-columns: 1fr; }
  .detail-body { padding: 0 16px 20px; }
  .detail-actions { padding: 10px 16px; grid-template-columns: 1fr 1fr auto; }
  .detail-actions .share-btn { display: none; }
  .modal .panel { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; max-height: 92%; border-radius: 18px 18px 0 0; }
  @keyframes pop { from { transform: translate(-50%, 30px); opacity: 0; } }
  .hide-sm { display: none !important; }
}

/* shared catalog page (c.html) */
.cat-hero .wrap { padding-top: 32px; padding-bottom: 28px; }
.cat-hero h1 { margin-bottom: 8px; }
.cat-hero p.lead { margin-bottom: 8px; white-space: pre-line; }
.cat-count { color: rgba(255,255,255,.6); font-size: 14px; margin: 0; }
.gate { max-width: 440px; margin: 4px auto 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.gate h2 { margin: 0 0 4px; font-size: 21px; }
.gate-sub { margin: 0 0 18px; color: var(--muted); }
.gate-ref { background: var(--bg); border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--ink-2); }

/* member video: tag on the card cover, preview + player on the profile */
.video-tag { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; background: rgba(20,20,20,.82); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 10px 5px 8px; border-radius: 99px; }
.video-tag svg { width: 13px; height: 13px; }
.video-box { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, #2a2a2a, #121212); color: #fff; }
.video-box.vertical { aspect-ratio: 9 / 16; max-width: 320px; margin: 0 auto; }
.video-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.vb-brand { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 110px; font-weight: 700; font-size: 15px; letter-spacing: .04em; opacity: .75; }
.vb-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--red); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.vb-play svg { width: 28px; height: 28px; margin-left: 4px; }
.vb-label { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.65); font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.video-box:hover .vb-play { transform: scale(1.06); }
.vb-open { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* photo + video preview row on the card */
.media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 4px; }
.media .m { all: unset; box-sizing: border-box; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #EFEFED; border: 1px solid #ECECEA; cursor: pointer; }
.media .m:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.media .m img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.media .m:hover img { transform: scale(1.06); }
.media .m.broken { display: none; }
.media .m.vid { background: #1d1d1d; }
.media .m.vid img { filter: blur(2px) brightness(.55); transform: scale(1.12); }
.media .m-play { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.media .m-play svg { width: 14px; height: 14px; margin-left: 2px; }
.media .m-label { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.media .m.more::after { content: attr(data-more); position: absolute; inset: 0; background: rgba(0,0,0,.52); color: #fff; font-weight: 700; font-size: 17px; display: grid; place-items: center; }
.media .m.vid.more::after { display: none; }
.gallery a { cursor: zoom-in; }

/* full-screen photo / video viewer */
.media-modal { z-index: 110; background: #0b0b0b; }
.media-modal .mv { position: absolute; inset: 0; display: flex; flex-direction: column; color: #fff; animation: fade .2s; }
.mv-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); }
.mv-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.mv-who .avatar { width: 40px; height: 40px; border: 2px solid #fff; }
.mv-who .pin-mark { display: none; }
.mv-who b { display: block; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-who small { display: block; color: rgba(255,255,255,.65); font-size: 12.5px; }
.mv-who > div { min-width: 0; }
.media-modal .mv-close { position: static; flex: none; background: rgba(255,255,255,.12); color: #fff; }
.mv-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 12px; touch-action: pan-y; }
.mv-slide { width: 100%; height: 100%; display: grid; place-items: center; min-height: 0; }
.mv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.mv-slide .video-box { width: min(100%, 860px); max-height: 100%; }
.mv-slide .video-box.vertical { width: auto; height: 100%; max-height: 100%; max-width: 100%; aspect-ratio: 9 / 16; }
.mv-slide .video-box img.soft { filter: blur(6px) brightness(.55); transform: scale(1.08); }
.mv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.mv-nav:hover { background: rgba(255,255,255,.26); }
.mv-nav.prev { left: 14px; } .mv-nav.next { right: 14px; }
.mv-count { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.55); padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.media-modal.single .mv-nav, .media-modal.single .mv-count { display: none; }
.mv-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 4px; justify-content: safe center; scrollbar-width: none; }
.mv-strip::-webkit-scrollbar { display: none; }
.mv-strip button { position: relative; flex: none; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; padding: 0; border: 2px solid transparent; background: #222; opacity: .55; cursor: pointer; }
.mv-strip button[aria-current="true"] { border-color: #fff; opacity: 1; }
.mv-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv-strip .vid img { filter: brightness(.55); }
.mv-strip .vid span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.mv-strip .vid svg { width: 16px; height: 16px; }
.mv-cta { padding: 10px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); display: flex; justify-content: center; }
.mv-cta .btn { width: min(100%, 420px); }
@media (max-width: 640px) { .mv-nav { display: none; } .mv-stage { padding: 0; } .mv-img { border-radius: 0; } }
