/* blast! — layout */
.bl-topbar {
  position: relative;
  z-index: 50;
  padding: 12px 0;
}

.bl-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.bl-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bl-text);
  font-weight: 800;
  font-size: 10px;
  min-width: 0;
  flex: 1;
}

.bl-brand__logo {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bl-purple), #b794f6);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(138, 79, 255, 0.4);
}

.bl-brand__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bl-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bl-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--bl-bg-card);
  color: var(--bl-text);
  box-shadow: var(--bl-shadow);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.bl-icon-btn:active { transform: scale(0.94); }
.bl-icon-btn.is-active { color: var(--bl-pink); }

/* Hero */
.bl-hero {
  position: relative;
  border-radius: var(--bl-radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 200px;
  background: linear-gradient(145deg, #2a1050 0%, #1a0a2e 50%, #0f0618 100%);
  box-shadow: var(--bl-shadow);
}

.bl-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  min-height: 200px;
}

.bl-hero__title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.bl-hero__sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--bl-text-muted);
  line-height: 1.45;
}

.bl-hero__char {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(138, 79, 255, 0.35));
}

/* Quick jump */
.bl-quick-jump {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.bl-quick-jump::-webkit-scrollbar { display: none; }

.bl-quick-jump__item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 72px;
  text-decoration: none;
  color: var(--bl-text);
}

.bl-quick-jump__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: var(--bl-shadow);
}

/* Sections */
.bl-home { padding-bottom: 24px; }

.bl-section { margin-bottom: 28px; }

.bl-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bl-section__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.bl-section__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--bl-purple);
}

.bl-hscroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bl-hscroll::-webkit-scrollbar { display: none; }

/* Mood */
.bl-mood-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  max-width: 100%;
}

.bl-mood {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--bl-text);
  padding: 0;
}

.bl-mood__circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bl-bg-card);
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: var(--bl-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bl-mood:active .bl-mood__circle { transform: scale(0.94); }

.bl-mood__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bl-text-muted);
}

/* Daily challenge */
.bl-challenge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--bl-radius-lg);
  background: linear-gradient(135deg, #3b0764 0%, #581c87 50%, #2e1065 100%);
  box-shadow: var(--bl-shadow);
  margin-bottom: 28px;
}

.bl-challenge__trophy {
  font-size: 36px;
  flex-shrink: 0;
}

.bl-challenge__body { flex: 1; min-width: 0; }

.bl-challenge__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bl-text-muted);
}

.bl-challenge__timer {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* Discover catalog — category bands (cipher-style layout) */
.bl-discover-catalog {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bl-ad-slot--catalog {
  margin-block: 4px;
}

.bl-cat-band {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bl-cat-band__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.bl-cat-band__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bl-bg-elevated);
  font-size: 18px;
  box-shadow: var(--bl-shadow);
}

.bl-cat-band__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bl-cat-band__more {
  flex-shrink: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bl-text-muted);
  text-decoration: none;
}

.bl-cat-band__more:hover {
  color: var(--bl-purple);
}

/* Category band — 4 cards fit in one row */
.bl-cat-band__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 100%;
}

.bl-cat-band__grid .bl-card {
  width: auto;
  min-width: 0;
}

.bl-cat-band__grid .bl-card__thumb {
  border-radius: var(--bl-radius-sm);
  margin-bottom: 6px;
}

.bl-cat-band__grid .bl-card__rating {
  bottom: 4px;
  left: 4px;
  padding: 2px 5px;
  font-size: 9px;
}

.bl-cat-band__grid .bl-card__play {
  bottom: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  font-size: 8px;
}

.bl-cat-band__grid .bl-card__play svg {
  width: 10px;
  height: 10px;
}

.bl-cat-band__grid .bl-card__name {
  font-size: 10px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

/* Discover categories — slanted cards (category hub page) */
.bl-discover-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bl-discover-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 112px;
  padding: 18px 16px;
  border-radius: var(--bl-radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 100%, 0 100%);
  box-shadow: var(--bl-shadow);
}

.bl-discover-card__info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.bl-discover-card__info h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
}

.bl-discover-card__count {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.bl-discover-card__emoji {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.bl-discover-card__arrow {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 4px;
  border-radius: 50%;
  background: #fff;
  color: #374151;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Category hub heading */
.bl-cat-hub__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}

.bl-cat-hub__planet {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.bl-cat-hub__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

/* Category page */
.bl-cat-hub { padding-bottom: 24px; }

/* Detail */
.bl-detail-wrap {
  max-width: 480px;
  margin-inline: auto;
  background: var(--bl-bg);
}

.bl-detail-page {
  padding-bottom: 24px;
  background: var(--bl-bg);
}

.bl-detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 340px;
  overflow: hidden;
  background: #000;
}

.bl-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bl-detail-ad {
  position: relative;
  z-index: 3;
  padding: 12px 0;
  background: var(--bl-bg);
}

.bl-detail-wrap:has(.bl-detail-ad > *) .bl-detail-sheet,
.bl-detail-wrap:has(.bl-detail-ad:not(:empty)) .bl-detail-sheet {
  margin-top: 0;
}

.bl-detail-sheet {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding: 20px 16px 8px;
  border-radius: 28px 28px 0 0;
  background: var(--bl-sheet);
  color: var(--bl-sheet-ink);
}

.bl-detail-head { padding: 0 0 12px; }

.bl-detail-head__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bl-detail-title {
  margin: 0;
  flex: 1;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bl-sheet-ink);
  line-height: 1.2;
}

.bl-detail-title-fav {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bl-sheet-tag);
  color: var(--bl-sheet-muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.bl-detail-title-fav.is-active {
  color: var(--bl-pink);
  background: rgba(255, 45, 122, 0.12);
}

.bl-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--bl-sheet-muted);
}

.bl-detail-meta__rating {
  color: #f59e0b;
}

.bl-detail-meta strong {
  color: var(--bl-sheet-ink);
  font-weight: 800;
}

.bl-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 16px;
}

.bl-detail-actions {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  padding: 4px 0 20px;
}

.bl-detail-body {
  padding: 0;
  color: var(--bl-sheet-muted);
}

.bl-detail-wave {
  width: 100%;
  line-height: 0;
  margin-top: -1px;
  background: var(--bl-sheet);
}

.bl-detail-wave svg {
  width: 100%;
  height: 48px;
  display: block;
}

/* Keep playing */
.bl-keep-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Play */
body[data-page="play"] {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.bl-play-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #000;
}

.bl-play-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bl-bg-card);
  color: #fff;
}

.bl-play-bar__title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bl-play-frame-wrap { flex: 1; min-height: 0; }

.bl-play-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Footer */
.bl-foot {
  padding: 32px 0 24px;
  margin-top: 24px;
  border-top: 1px solid var(--bl-border);
  text-align: center;
}

.bl-foot__brand { font-weight: 800; margin: 0 0 12px; }

.bl-foot__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  margin-bottom: 12px;
}
.bl-foot__nav a { color: var(--bl-text-muted); font-size: 13px; }

.bl-foot__bottom {
  font-size: 12px;
  color: var(--bl-text-muted);
  margin: 0;
}

/* Prose / legal */
.bl-prose { padding: 24px 0 32px; }
.bl-prose h1 { font-size: 1.75rem; margin: 0 0 16px; }
.bl-prose h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.bl-prose h3 { font-size: 1rem; margin: 16px 0 6px; color: var(--bl-text); }
.bl-prose p, .bl-prose li {
  color: var(--bl-text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.bl-prose a { color: var(--bl-purple); }

/* Overlays */
.bl-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bl-bg);
  padding: 16px;
  overflow-y: auto;
}

.bl-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.bl-search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--bl-bg-elevated);
  border-radius: var(--bl-radius-sm);
  background: var(--bl-bg-card);
  color: var(--bl-text);
}

.bl-search-empty {
  text-align: center;
  color: var(--bl-text-muted);
  padding: 32px;
}

.bl-fav-backdrop,
.bl-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.bl-fav-backdrop.is-visible,
.bl-drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.bl-fav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 360px);
  height: 100%;
  background: var(--bl-bg-card);
  z-index: 160;
  transform: translateX(100%);
  transition: transform 0.25s;
  overflow-y: auto;
  padding: 20px;
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
.bl-fav-panel.is-open { transform: translateX(0); }

.bl-fav-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.bl-fav-panel__head h2 { margin: 0; font-size: 1.2rem; }

.bl-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: var(--bl-bg-card);
  z-index: 160;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}
.bl-drawer.is-open { transform: translateX(0); }

.bl-drawer__head {
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bl-border);
}

.bl-drawer__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bl-text-muted);
  margin: 0 0 8px;
}

.bl-drawer__section { margin-bottom: 22px; }

.bl-drawer__link {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: var(--bl-text);
  cursor: pointer;
  border-bottom: 1px solid var(--bl-border);
}
.bl-drawer__link.is-active { color: var(--bl-purple); font-weight: 700; }

.bl-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bl-sentinel {
  text-align: center;
  padding: 16px;
  color: var(--bl-text-muted);
  font-size: 13px;
}

.bl-breadcrumb {
  font-size: 13px;
  color: var(--bl-text-muted);
  margin-bottom: 12px;
}
.bl-breadcrumb a { color: var(--bl-purple); }

.bl-category-head { margin-bottom: 16px; }
.bl-category-head h1 { margin: 0 0 4px; font-size: 1.5rem; }
.bl-category-count { margin: 0; color: var(--bl-text-muted); font-size: 14px; }
