/* Brand4 shell — violet + lime on purple-black. Original tokens; not third-party copies. */
:root {
  --b4-bg: #0c0814;
  --b4-surface: #161022;
  --b4-card: #1e1630;
  --b4-line: rgba(243, 238, 252, 0.1);
  --b4-text: #f3eefc;
  --b4-muted: #9a93b0;
  --b4-accent: #7c5cff;
  --b4-accent-deep: #5b3de6;
  --b4-lime: #c6f04d;
  --b4-radius: 12px;
  --b4-gap: 16px;
}

html[data-theme="light"] {
  --b4-bg: #f4f1fb;
  --b4-surface: #ffffff;
  --b4-card: #efeaf8;
  --b4-line: rgba(28, 16, 48, 0.12);
  --b4-text: #1c1430;
  --b4-muted: #6b6280;
}

html, body.brand4-shell {
  margin: 0;
  min-height: 100%;
  background: var(--b4-bg);
  color: var(--b4-text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.brand4-shell {
  --text: var(--b4-text);
  --muted: var(--b4-muted);
  --line: var(--b4-line);
  --amber: var(--b4-lime);
  --teal: var(--b4-lime);
  --panel2: var(--b4-surface);
}

.brand4-shell a { color: inherit; text-decoration: none; }

.b4-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.b4-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(12, 8, 20, 0.9);
  border-bottom: 1px solid var(--b4-line);
}
html[data-theme="light"] .b4-nav { background: rgba(244, 241, 251, 0.92); }

.b4-nav-inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.b4-brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--b4-text);
  flex-shrink: 0;
}
.b4-brand span { color: var(--b4-lime); }

.b4-hamburger {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--b4-line);
  color: var(--b4-text);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.b4-gnb {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.9rem;
  color: var(--b4-muted);
  flex: 1;
}
.b4-gnb > a:hover,
.b4-gnb > a.is-active { color: var(--b4-text); }
.b4-gnb > a.is-active { color: var(--b4-lime); }

.b4-gnb-more { position: relative; }
.b4-gnb-more-btn {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.b4-gnb-more.has-active .b4-gnb-more-btn,
.b4-gnb-more-btn.is-active { color: var(--b4-lime); }
.b4-gnb-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 10.5rem;
  background: var(--b4-card);
  border: 1px solid var(--b4-line);
  border-radius: 10px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  z-index: 50;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.b4-gnb-more-menu a {
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--b4-muted);
}
.b4-gnb-more-menu a:hover,
.b4-gnb-more-menu a.is-active {
  background: rgba(124, 92, 255, 0.16);
  color: var(--b4-text);
}

.b4-nav-actions { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; }
.b4-bal-chip, .b4-roll-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--b4-line);
  background: var(--b4-surface);
  font-size: 0.78rem;
  color: var(--b4-muted);
}
.b4-bal-chip b, .b4-roll-chip b { color: var(--b4-text); font-variant-numeric: tabular-nums; }
.b4-roll-chip.is-ready { border-color: rgba(198, 240, 77, 0.45); }
.b4-roll-track {
  display: inline-block;
  width: 48px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.b4-roll-fill {
  display: block;
  height: 100%;
  background: var(--b4-lime);
}

.b4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.b4-btn:hover { transform: translateY(-1px); }
.b4-btn-primary {
  background: linear-gradient(135deg, var(--b4-accent), var(--b4-accent-deep));
  color: #fff;
}
.b4-btn-ghost {
  background: transparent;
  border-color: var(--b4-line);
  color: var(--b4-text);
}
.b4-btn-ghost:hover { background: rgba(124, 92, 255, 0.12); }

@media (max-width: 960px) {
  .b4-hamburger { display: inline-flex; }
  .b4-gnb {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--b4-bg);
    border-bottom: 1px solid var(--b4-line);
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.65rem;
  }
  .b4-gnb.is-open { display: flex; }
  .b4-gnb-more-menu { position: static; box-shadow: none; }
  .b4-gnb-more-menu[hidden] { display: flex !important; }
  .b4-hide-m { display: none; }
}

.b4-main {
  flex: 1;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
.b4-flash {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(198, 240, 77, 0.35);
  background: rgba(198, 240, 77, 0.1);
}

.b4-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 55% at 88% 12%, rgba(198, 240, 77, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(124, 92, 255, 0.28), transparent 55%),
    linear-gradient(160deg, #161022 0%, #0c0814 55%, #140d22 100%);
  border: 1px solid var(--b4-line);
  padding: 2.5rem 1.5rem 2.75rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .b4-hero { padding: 3.25rem 2.5rem 3.5rem; }
}
.b4-hero-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--b4-lime);
  margin-bottom: 0.75rem;
}
.b4-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}
.b4-hero p {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  color: var(--b4-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.b4-hero-ctas { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.b4-section { margin-bottom: 2.25rem; }
.b4-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.b4-section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}
.b4-section-tools { display: flex; align-items: center; gap: 0.65rem; }
.b4-view-all {
  font-size: 0.8rem;
  color: var(--b4-muted);
}
.b4-view-all:hover { color: var(--b4-lime); }
.b4-slide-arrows { display: flex; gap: 0.35rem; }
.b4-slide-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--b4-line);
  background: var(--b4-surface);
  color: var(--b4-text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.b4-slide-btn:hover {
  border-color: var(--b4-accent);
  color: var(--b4-lime);
}

.b4-sports-frame-wrap {
  position: relative;
  width: 100%;
  height: min(72vh, 720px);
  min-height: 420px;
  border-radius: var(--b4-radius);
  overflow: hidden;
  background: var(--b4-card);
  border: 1px solid var(--b4-line);
}
@media (max-width: 640px) {
  .b4-sports-frame-wrap {
    height: min(58vh, 520px);
    min-height: 360px;
  }
}
.b4-sports-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--b4-surface);
}
.b4-sports-loading,
.b4-sports-error,
.b4-sports-guest {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--b4-muted);
  background: var(--b4-card);
  z-index: 2;
}
.b4-sports-loading[hidden],
.b4-sports-error[hidden] { display: none !important; }
.b4-sports-loading::before {
  content: "";
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid rgba(124, 92, 255, 0.25);
  border-top-color: var(--b4-lime);
  animation: b4-spin 0.7s linear infinite;
}
@keyframes b4-spin { to { transform: rotate(360deg); } }
.b4-sports-guest strong { color: var(--b4-text); font-size: 1.05rem; }
.b4-sports-guest p { margin: 0; max-width: 22rem; font-size: 0.9rem; }

.b4-grid-viewport {
  overflow-x: auto;
  scrollbar-width: none;
}
.b4-grid-viewport::-webkit-scrollbar { display: none; }

.b4-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 8px) / 2);
  gap: 8px;
}
@media (min-width: 768px) {
  .b4-grid {
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
  }
}
@media (min-width: 1024px) {
  .b4-grid {
    grid-auto-columns: calc((100% - 80px) / 6);
  }
}

.b4-card {
  background: var(--b4-card);
  border: 1px solid var(--b4-line);
  border-radius: var(--b4-radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-align: left;
  width: 100%;
  padding: 0;
  color: inherit;
  scroll-snap-align: start;
}
.b4-card:hover {
  border-color: rgba(124, 92, 255, 0.5);
  transform: translateY(-2px);
}
.b4-card-media {
  aspect-ratio: 1 / 1;
  background: var(--b4-surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}
.b4-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.b4-card-body { padding: 0.65rem 0.75rem 0.85rem; }
.b4-card-body strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b4-card-body span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--b4-muted);
}

.is-empty {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.03) 6px,
      transparent 6px,
      transparent 12px
    ),
    var(--b4-surface);
}

.b4-empty-msg {
  color: var(--b4-muted);
  font-size: 0.9rem;
  grid-column: 1 / -1;
  margin: 0;
}

.b4-footer {
  border-top: 1px solid var(--b4-line);
  padding: 2rem 1.25rem 2.25rem;
  color: var(--b4-muted);
  font-size: 0.8rem;
}
.b4-footer-inner { max-width: 1420px; margin: 0 auto; }
.b4-partners { margin-bottom: 2rem; }
.b4-partners-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}
.b4-partners-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(198, 240, 77, 0.16);
  color: var(--b4-lime);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.b4-partners-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--b4-text);
}
.b4-partners-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 768px) {
  .b4-partners-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
}
@media (min-width: 1024px) {
  .b4-partners-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.b4-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 8px 10px;
  background: var(--b4-card);
  border: 1px solid var(--b4-line);
  border-radius: 10px;
}
.b4-partner img {
  max-height: 32px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.b4-legal-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .b4-legal-cols { grid-template-columns: 1fr 1fr 1fr; }
}
.b4-legal h3 {
  margin: 0 0 0.55rem;
  color: var(--b4-text);
  font-size: 0.85rem;
}
.b4-legal-cols a,
.b4-legal-cols p {
  display: block;
  margin: 0 0 0.35rem;
  line-height: 1.5;
}
.b4-legal-cols a:hover { color: var(--b4-lime); }

.b4-legal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--b4-line);
  border-bottom: 1px solid var(--b4-line);
}
.login-lang { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.login-lang button {
  background: var(--b4-surface);
  border: 1px solid var(--b4-line);
  border-radius: 6px;
  padding: 0.2rem 0.3rem;
  cursor: pointer;
}
.login-lang button.is-active { border-color: var(--b4-lime); }
.login-lang img { display: block; }

.b4-theme-toggle {
  border: 1px solid var(--b4-line);
  background: var(--b4-surface);
  color: var(--b4-text);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.b4-age-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  color: #0c0814;
  background: var(--b4-lime);
}

.b4-social { display: flex; gap: 0.4rem; }
.b4-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--b4-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--b4-muted);
}

.b4-copy { margin: 1rem 0 0; }

/* Meridian page compatibility inside brand4 chrome */
.brand4-shell .wrap { width: 100%; }
.brand4-shell .page-head { margin-bottom: 1.1rem; }
.brand4-shell .page-head h1 { margin: 0 0 0.35rem; font-size: 1.5rem; }
.brand4-shell .page-head p { margin: 0; color: var(--b4-muted); font-size: 0.9rem; }
.brand4-shell .panel,
.brand4-shell .auth-card,
.brand4-shell .signup-card {
  background: var(--b4-card);
  border: 1px solid var(--b4-line);
  border-radius: 12px;
  padding: 1.2rem;
}
.brand4-shell .grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 900px) {
  .brand4-shell .grid-2 { grid-template-columns: 1fr 1fr; }
}
.brand4-shell .form-row { margin-bottom: 12px; }
.brand4-shell .form-row label { display: block; font-size: 12px; color: var(--b4-muted); margin-bottom: 6px; }
.brand4-shell input,
.brand4-shell select,
.brand4-shell textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--b4-surface);
  border: 1px solid var(--b4-line);
  color: var(--b4-text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.brand4-shell .btn,
.brand4-shell .btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.brand4-shell .btn-primary,
.brand4-shell .btn-signup,
.brand4-shell .btn-teal {
  background: linear-gradient(135deg, var(--b4-accent), var(--b4-accent-deep));
  color: #fff;
}
.brand4-shell .btn-ghost {
  background: transparent;
  border: 1px solid var(--b4-line);
  color: var(--b4-text);
}
.brand4-shell .msg { padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 12px; }
.brand4-shell .msg.err { border: 1px solid rgba(255, 90, 90, 0.35); background: rgba(255, 90, 90, 0.08); }
.brand4-shell .msg.ok { border: 1px solid rgba(198, 240, 77, 0.35); background: rgba(198, 240, 77, 0.1); }
.brand4-shell .table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.brand4-shell .table th,
.brand4-shell .table td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--b4-line); text-align: left; }
.brand4-shell .amount-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.brand4-shell .amount-quick-btn {
  border: 1px solid var(--b4-line);
  background: var(--b4-surface);
  color: var(--b4-text);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 0.78rem;
}
.brand4-shell .roll-panel { padding: 0.85rem; border: 1px solid var(--b4-line); border-radius: 10px; }
.brand4-shell .roll-panel-track { height: 6px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.brand4-shell .roll-panel-fill { display: block; height: 100%; background: var(--b4-lime); }
.brand4-shell .hint { color: var(--b4-muted); font-size: 12px; margin: 6px 0 0; }
.brand4-shell .phone-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.brand4-shell .pw-wrap { position: relative; }
.brand4-shell .pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; color: var(--b4-muted);
}

.brand4-shell .game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 768px) {
  .brand4-shell .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .brand4-shell .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.brand4-shell .game-card {
  position: relative;
  background: var(--b4-card);
  border: 1px solid var(--b4-line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.brand4-shell .game-card .thumb,
.brand4-shell .game-card .thumb-wrap {
  aspect-ratio: 1 / 1;
  background: var(--b4-surface);
}
.brand4-shell .game-card img.thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand4-shell .game-card .meta { padding: 0.65rem 0.75rem 0.85rem; }
.brand4-shell .game-card h3 { margin: 0; font-size: 0.85rem; }
.brand4-shell .game-card .meta span { color: var(--b4-muted); font-size: 0.75rem; }
.brand4-shell .fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  border: 0; background: rgba(0,0,0,0.45); color: #fff; border-radius: 999px; width: 28px; height: 28px; cursor: pointer;
}
.brand4-shell .catalog-providers-track { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 1rem; }
.brand4-shell .provider-filter {
  border: 1px solid var(--b4-line);
  background: var(--b4-surface);
  color: var(--b4-text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.8rem;
}
.brand4-shell .provider-filter.is-active { border-color: var(--b4-lime); color: var(--b4-lime); }
.brand4-shell .catalog-search-input {
  max-width: 420px;
}
.brand4-shell .provider-section-head { grid-column: 1 / -1; color: var(--b4-muted); font-size: 0.8rem; margin-top: 0.5rem; }
.brand4-shell .status-alert-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 80;
}
.brand4-shell .status-alert-panel {
  background: var(--b4-card); border: 1px solid var(--b4-line); border-radius: 12px; padding: 1.25rem; max-width: 28rem;
}
.brand4-shell .banner {
  display: flex; gap: 0.85rem; align-items: center;
  padding: 1rem 1.1rem; border-radius: 12px; margin-bottom: 1rem;
  background: var(--b4-card); border: 1px solid var(--b4-line);
}

.game-play-overlay[hidden] { display: none !important; }
.game-play-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.game-play-panel {
  width: min(1100px, 100%);
  height: min(80vh, 720px);
  background: var(--b4-card);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.game-play-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--b4-line);
}
.game-play-actions { display: flex; gap: 0.4rem; }
.game-play-panel iframe { flex: 1; width: 100%; border: 0; background: #000; }

.b4-catalog { width: 100%; }
.b4-cat-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
  scrollbar-width: none;
}
.b4-cat-tabs::-webkit-scrollbar { display: none; }
.b4-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--b4-line);
  background: var(--b4-surface);
  color: var(--b4-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}
.b4-cat-tab.is-active {
  background: var(--b4-accent);
  border-color: var(--b4-accent);
  color: #fff;
}
.b4-cat-icon { display: inline-flex; }
.b4-cat-count {
  min-width: 1.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.b4-cat-tab.is-active .b4-cat-count {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.b4-catalog-search { margin-bottom: 1.1rem; }
.b4-catalog-search-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--b4-surface);
  border: 1px solid var(--b4-line);
  color: var(--b4-text);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
}
.b4-catalog-search-input::placeholder { color: var(--b4-muted); }

.b4-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 768px) {
  .b4-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
  .b4-catalog-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.b4-catalog-status {
  text-align: center;
  color: var(--b4-muted);
  font-size: 0.85rem;
  padding: 1rem 0;
}
.b4-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
