/* Big Brains in Small Bodies — shared styles
   Paper-craft aesthetic. Mobile-first. No em dashes anywhere. */

:root {
  --nilla-green:  #3ECFA0;
  --nilla-red:    #F95C5C;
  --nilla-yellow: #F8E05A;
  --nilla-teal:   #4A9CBB;
  --nilla-pink:   #EB9A97;
  --nilla-purple: #801F8E;
  --nilla-gray:   #999999;

  --bg:        #EBEBEB;
  --surface:   #F8F8F6;
  --text:      #1A1A1A;
  --text-muted:#666666;
  --border:    #D3D1C7;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 6px 16px rgba(0,0,0,0.07), 0 12px 28px rgba(0,0,0,0.08);

  --radius:    10px;
  --radius-sm: 6px;

  --content-max: 1100px;
  --hero-max:    900px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

.bb-uppercase { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---------- WHITE / PAPER ZONES ---------- */
.bb-white-zone {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
}
.bb-paper-zone {
  background: var(--bg);
}
.bb-container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- TOP NAV ---------- */
.bb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.bb-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.bb-logo img { height: 30px; width: auto; }
.bb-logo .bb-logo-bb { height: 36px; }
.bb-mark { width: 36px; height: 36px; display: block; }
.bb-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}
.bb-nav a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  position: relative;
}
.bb-nav a.active { color: var(--text); }
.bb-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--nilla-teal);
}
.bb-back {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  white-space: nowrap;
}
.bb-back:hover { text-decoration: none; background: #fff; }
/* Music pause/play button — only shown inside the app's overlay iframe. */
.bb-music {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}
.bb-music:hover { background: #fff; }
.bb-music[hidden] { display: none; }
.bb-music .bb-music-pause { display: none; }
.bb-music .bb-music-play { display: block; }
.bb-music.playing .bb-music-pause { display: block; }
.bb-music.playing .bb-music-play { display: none; }

/* ---------- HERO ---------- */
.bb-hero {
  padding-top: clamp(24px, 5vw, 56px);
  padding-right: clamp(16px, 4vw, 32px);
  padding-bottom: clamp(28px, 5vw, 56px);
  padding-left: clamp(16px, 4vw, 32px);
}
.bb-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--nilla-teal);
  margin: 0 0 12px;
}
.bb-title {
  font-size: clamp(28px, 4.6vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 8px;
}
.bb-title-sub {
  display: block;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}
.bb-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  margin: 0 0 18px;
  font-weight: 400;
}
.bb-intro {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--text);
  line-height: 1.65;
}
.bb-intro p { margin: 0 0 14px; }

.bb-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 4vw, 36px);
  align-items: stretch;
}
@media (min-width: 820px) {
  .bb-hero-grid { grid-template-columns: 1.2fr 1fr; }
}
.bb-hero-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  align-self: start;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.bb-hero-art img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- RESOURCE CARDS ---------- */
.bb-section-title {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  margin: 0 0 18px;
}
.bb-resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 28px;
}
@media (min-width: 820px) {
  .bb-resource-grid { grid-template-columns: 1fr 1fr; }
}
.bb-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.bb-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
@media (min-width: 480px) {
  .bb-card.has-media {
    grid-template-columns: 96px 1fr;
    grid-template-areas: "media body";
  }
  .bb-card.has-media .bb-card-body  { grid-area: body; }
  .bb-card.has-media .bb-card-media { grid-area: media; }
}
.bb-card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bb-card-pill {
  align-self: flex-start;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
/* Soft muted pill tints (not full brand saturation) */
.bb-card-pill.video    { background: #DCEEF4; color: #2E6F84; }
.bb-card-pill.article  { background: #DCF4E8; color: #1F7A56; }
.bb-card-pill.book     { background: #FBE3E3; color: #B05656; }
.bb-card-pill.research { background: #FAF1CF; color: #7A6726; }
.bb-card-pill.nilla    { background: #FBDADA; color: #B33A3A; }
.bb-card-title {
  font-weight: 700;
  font-size: clamp(16px, 1.7vw, 19px);
  margin: 0;
  line-height: 1.3;
}
.bb-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}
.bb-card-link {
  font-size: 12px;
  color: var(--nilla-teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 4px;
}
.bb-card-media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ddd;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bb-card-media img { width: 100%; height: 100%; object-fit: cover; }
.bb-card-media.video::after {
  content: "▶";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  font-size: 14px;
  color: var(--nilla-teal);
  padding-left: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.bb-card-media.book {
  background: #FBEAF0;
  font-size: 40px;
  color: var(--nilla-pink);
}
.bb-card-media.research {
  background: #FAEEDA;
  flex-direction: column;
  padding: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7a6a3c;
  text-transform: uppercase;
  word-break: break-word;
}
.bb-card-media.nilla {
  background: #fff;
  color: var(--nilla-red);
  font-size: 36px;
}
.bb-card-media.nilla img { object-fit: cover; }
.bb-card-media.image { background: #000; }
.bb-card-media.image img { object-fit: cover; }

/* ---------- BOOKS SECTION ---------- */
.bb-books-section { padding-top: 8px; padding-bottom: 28px; }
.bb-section-heading {
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  margin: 0 0 4px;
  color: var(--text);
}
.bb-section-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.bb-book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 820px) {
  .bb-book-grid { grid-template-columns: 1fr 1fr; }
}
.bb-book-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: start;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.bb-book-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.bb-book-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #efe9e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bb-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.bb-book-cover.noimg {
  background: #FBEAF0;
  font-size: 34px;
  color: var(--nilla-pink);
}
.bb-book-cover.noimg img { display: none; }
.bb-buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.bb-buy-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--nilla-teal);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bb-buy-link:hover { background: #eef6f8; border-color: var(--nilla-teal); }

/* ---------- NOTES FROM NILLA NOTE PAGE ---------- */
.bb-note-page {
  padding-top: clamp(16px, 3vw, 28px);
  text-align: center;
}
.bb-note-back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nilla-teal);
  margin-bottom: 16px;
}
.bb-note-back:hover { text-decoration: underline; }
.bb-note-hero-art {
  max-width: 360px;
  margin: 0 auto 20px;
}
.bb-note-hero-art img {
  display: block;
  width: 100%;
  height: auto;
}
.bb-note-page-title { margin: 0 auto; }
.bb-note-page-byline {
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-muted);
}
.bb-note-page-byline:empty { display: none; }
.bb-note-page-body {
  max-width: 680px;
  padding-top: clamp(20px, 4vw, 32px);
  padding-bottom: 8px;
}
.bb-note-ref-link { color: var(--nilla-teal); font-weight: 600; text-decoration: underline; }
.bb-note-ref-link:hover { text-decoration: none; }

/* ---------- TAG FILTER ---------- */
.bb-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.bb-tag-btn {
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bb-tag-btn:hover { color: var(--text); border-color: var(--nilla-teal); }
.bb-tag-btn.active {
  background: var(--nilla-teal);
  border-color: var(--nilla-teal);
  color: #fff;
}

/* ---------- CARD BYLINE ---------- */
.bb-card-byline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: -2px;
}

/* Note triggers reuse card-title / card-link look as buttons */
.bb-card-title .bb-note-trigger,
.bb-card-title .bb-note-link {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.bb-card-title .bb-note-trigger:hover,
.bb-card-title .bb-note-link:hover { text-decoration: underline; }
button.bb-card-link {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
button.bb-card-link:hover { text-decoration: underline; }

/* ---------- MULTI SUBLINKS ---------- */
.bb-sublinks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.bb-sublinks[hidden] { display: none; }
.bb-sublink {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bb-sublink:hover { text-decoration: none; border-color: var(--nilla-teal); box-shadow: var(--shadow-sm); }
.bb-sublink-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--nilla-teal);
  margin-bottom: 3px;
}
.bb-sublink-sub {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.bb-sublink-desc {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- NOTE ARTICLE MODAL ---------- */
.bb-note-overlay {
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.bb-note-overlay.open { display: flex; }
.bb-note-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.bb-note-close {
  position: absolute;
  top: 10px; right: 12px;
  z-index: 2;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bb-note-close:hover { background: rgba(0,0,0,0.12); }
.bb-note-scroll {
  overflow-y: auto;
  padding: clamp(24px, 4vw, 40px);
  -webkit-overflow-scrolling: touch;
}
.bb-note-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--nilla-red);
  margin-bottom: 10px;
}
.bb-note-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 6px;
}
.bb-note-byline {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 18px;
}
.bb-note-byline:empty { display: none; }
.bb-note-body p {
  margin: 0 0 15px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.bb-note-h {
  margin: 26px 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}
.bb-note-quote {
  margin: 18px 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--nilla-teal);
  font-style: italic;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}
.bb-note-quote cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
}
.bb-note-list { margin: 0; padding-left: 20px; }
.bb-note-list li { margin: 5px 0; font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.bb-note-item { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.bb-note-item strong { color: var(--text); }
.bb-note-sign {
  margin: 20px 0 0;
  font-style: italic;
  font-weight: 600;
  color: var(--text);
}

/* ---------- GLOSSARY ---------- */
.bb-glossary {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin: 24px 0 36px;
}
.bb-glossary-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bb-glossary-toggle .chev { transition: transform 0.2s ease; font-size: 14px; }
.bb-glossary.open .bb-glossary-toggle .chev { transform: rotate(180deg); }
.bb-glossary-content {
  display: none;
  margin-top: 16px;
  grid-template-columns: 1fr;
  gap: 14px;
}
.bb-glossary.open .bb-glossary-content { display: grid; }
@media (min-width: 720px) {
  .bb-glossary.open .bb-glossary-content { grid-template-columns: 1fr 1fr; }
}
.bb-domain {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
}
.bb-domain-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.bb-domain-name { font-weight: 700; margin-right: 6px; }
.bb-domain-desc { color: var(--text-muted); }

/* dots by category */
.dot-language        { background: var(--nilla-yellow); }
.dot-cognitive       { background: var(--nilla-teal); }
.dot-social-emotional{ background: var(--nilla-pink); }
.dot-motor-movement  { background: var(--nilla-green); }
.dot-musical         { background: var(--nilla-gray); }
.dot-imagination-play{ background: var(--nilla-purple); }

/* ---------- SKILL DOMAIN FILTER (Nursery Rhymes) ---------- */
.bb-domain-filter { margin: clamp(20px, 4vw, 32px) 0 4px; }
.bb-domain-filter-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 12px;
}
.bb-domain-tags { margin-bottom: 14px; }
.bb-domain-tag { display: inline-flex; align-items: center; gap: 8px; }
.bb-domain-tag .bb-domain-dot { width: 10px; height: 10px; margin-top: 0; }
.bb-domain-def {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}
.bb-domain-def[hidden] { display: none; }
.bb-domain-def p { margin: 0; }

/* ---------- NURSERY RHYMES PAGE ---------- */
.bb-nr-intro {
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(13px, 1.35vw, 14.5px);
  line-height: 1.5;
  margin: 0;
}
.bb-songs-count {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 22px 0 12px;
}
.bb-hero-text-only { max-width: var(--content-max); }
.bb-song-chev {
  font-size: 28px;
  color: var(--text-muted);
  align-self: center;
  padding-right: 6px;
}
.bb-song-card { grid-template-columns: 88px 1fr auto; }

.bb-song-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 20px 0 40px;
}
@media (min-width: 720px) {
  .bb-song-grid { grid-template-columns: 1fr 1fr; }
}
.bb-song-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  min-height: 110px;
}
.bb-song-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.bb-song-icon {
  width: 88px; height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.bb-song-icon img { width: 100%; height: 100%; object-fit: cover; }
.bb-song-num {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 4px;
}
.bb-song-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.2;
  color: var(--text);
}
.bb-song-oneliner {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}
.bb-song-card.locked { opacity: 0.65; }
.bb-song-card.locked::after {
  content: "🔒";
  position: absolute;
  top: 10px; right: 12px;
  font-size: 16px;
  opacity: 0.7;
}

/* ---------- SONG PAGE ---------- */
.bb-song-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  padding: clamp(24px, 4vw, 40px) 0 clamp(20px, 3vw, 28px);
}
@media (max-width: 520px) {
  .bb-song-header { grid-template-columns: 96px 1fr; }
}
.bb-song-header .bb-song-icon-lg {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.bb-song-header .bb-song-icon-lg img { width: 100%; height: 100%; object-fit: cover; }
.bb-song-header h1 {
  font-size: clamp(24px, 3.4vw, 36px);
  margin: 6px 0 6px;
  line-height: 1.15;
  font-weight: 700;
}
.bb-song-header .crumb {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}
.bb-song-header .crumb .num { color: var(--nilla-teal); margin-left: 8px; }
.bb-song-header .lead {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.5;
}

/* Tabs */
.bb-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.bb-tab {
  background: transparent;
  border: 0;
  padding: 12px 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
  min-height: 44px;
}
.bb-tab { position: relative; }
.bb-tab[aria-selected="true"] { color: var(--text); background: transparent; }
.bb-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 14%; right: 14%; bottom: 4px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}
.bb-tab[aria-selected="true"][data-tab="skills"] { color: var(--nilla-teal); }
.bb-tab[aria-selected="true"][data-tab="lyrics"] { color: var(--nilla-green); }
.bb-tab[aria-selected="true"][data-tab="moves"]  { color: var(--nilla-pink); }
.bb-tab[aria-selected="true"]:not([data-tab]) { color: var(--text); }

.bb-tab-panel { display: none; }
.bb-tab-panel.active { display: block; }

/* Skills layout */
.bb-skills-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 980px) {
  .bb-skills-layout { grid-template-columns: 1fr 260px; }
}
.bb-skill-banner {
  background: var(--surface);
  border-left: 4px solid var(--nilla-teal);
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.bb-skill-about {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.bb-skill-about h2 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.bb-skill-about p { margin: 0; line-height: 1.6; color: var(--text); }

.bb-skill-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.bb-skill-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bb-skill-card .bb-skill-body {
  margin: 8px 0;
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--text);
  font-size: 15px;
}
.bb-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.bub-language        { background: var(--nilla-yellow); color: #1A1A1A; }
.bub-cognitive       { background: var(--nilla-teal); color: #fff; }
.bub-social-emotional{ background: var(--nilla-pink); color: #fff; }
.bub-motor-movement  { background: var(--nilla-green); color: #fff; }
.bub-musical         { background: var(--nilla-gray); color: #fff; }
.bub-imagination-play{ background: var(--nilla-purple); color: #fff; }

.bb-footnotes {
  margin-top: 22px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.bb-footnotes h4 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bb-footnotes ol { margin: 0; padding-left: 22px; }
.bb-footnotes li { margin: 4px 0; }
.bb-footnotes a { color: var(--nilla-teal); word-break: break-all; }
.bb-ef-note {
  margin-top: 10px;
  font-style: italic;
  font-size: 12px;
  color: var(--text-muted);
}

/* Right sidebar (desktop) */
.bb-domains-side {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  position: sticky;
  top: 70px;
  align-self: start;
}
.bb-domains-side h4 {
  margin: 0 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.bb-domains-side .bb-domain { font-size: 13px; margin-bottom: 10px; }
@media (max-width: 979px) {
  .bb-domains-side { display: none; }
}

/* Mobile/tablet glossary accordion sits below skill cards. */
.bb-glossary-mobile { display: none; margin-top: 24px; }
@media (max-width: 979px) {
  .bb-glossary-mobile { display: block; }
  .bb-glossary-mobile .bb-glossary { margin: 0; }
}

/* Lyrics */
.bb-lyrics {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.bb-lyrics-note {
  background: #fff8e6;
  border-left: 3px solid var(--nilla-yellow);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-style: italic;
  font-size: 14px;
  color: var(--text);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.bb-lyric-fr, .bb-lyric-it, .bb-lyric-he {
  color: var(--text);
  font-weight: 600;
}
.bb-lyric-en {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

/* Moves */
.bb-moves {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
}
/* Moves summary: a clean cue list (bar marker + move text) generated from
   the in-app songMoves data, replacing the old raw author-file dump. */
.bb-moves-note {
  background: #fff8e6;
  border-left: 3px solid var(--nilla-yellow);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-style: italic;
  font-size: 14px;
  color: var(--text);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.bb-moves-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.bb-move-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.bb-move-row + .bb-move-row {
  border-top: 1px solid var(--hairline, #eee);
}
.bb-move-bar {
  flex: 0 0 72px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.bb-move-text { flex: 1 1 auto; }
.bb-coming-soon {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
}
.bb-coming-soon strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 6px;
}

/* ---------- OVERLAY / MODAL ---------- */
.bb-overlay {
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.bb-overlay.open { display: flex; }
.bb-overlay-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  max-width: 460px;
  width: 100%;
}
.bb-overlay-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.bb-overlay-card p { margin: 0 0 14px; font-size: 14px; color: var(--text); line-height: 1.55; }
.bb-overlay-close {
  background: var(--nilla-teal);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- PREV / NEXT NAVIGATOR ---------- */
.bb-prevnext {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.bb-prevnext-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.bb-prevnext-side:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.bb-prevnext-side.next { justify-content: flex-end; text-align: right; }
.bb-prevnext-side .chev {
  font-size: 26px;
  line-height: 1;
  color: var(--nilla-teal);
  flex-shrink: 0;
}
.bb-prevnext-side .meta { display: flex; flex-direction: column; min-width: 0; }
.bb-prevnext-side .meta.align-right { align-items: flex-end; }
.bb-prevnext-side .lbl {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.bb-prevnext-side .ttl {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- SONG FOOTER STRIP ---------- */
.bb-song-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 0 24px;
  margin-top: 30px;
}
.bb-song-footer-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 700;
  text-align: left;
  padding-left: 4px;
}
.bb-song-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px;
  justify-content: center;
}
@media (max-width: 900px) {
  .bb-song-strip { justify-content: flex-start; }
}
.bb-song-strip a {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bb-song-strip a:hover { transform: translateY(-2px); }
.bb-song-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* On song pages: active = teal-tinted square + colored icon, inactive = grayed. */
.bb-song-strip.has-active a img { filter: grayscale(1); opacity: 0.55; }
.bb-song-strip.has-active a.active {
  background: rgba(74, 156, 187, 0.18);
  border-color: var(--nilla-teal);
}
.bb-song-strip.has-active a.active img { filter: none; opacity: 1; }

/* ---------- PAGE FOOTER (final) ---------- */
.bb-footer-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 26px 0 80px;
}

/* ---------- BOTTOM NAV (mobile) ---------- */
.bb-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.bb-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  min-height: 48px;
}
.bb-bottom-nav a.active { color: var(--nilla-teal); }
.bb-bn-ico { display: inline-flex; }
@media (max-width: 700px) {
  .bb-bottom-nav { display: flex; }
  body { padding-bottom: 60px; }
}

/* Back-to-App: full text on desktop, short "← APP" on mobile, always visible in top bar */
.bb-back-short { display: none; }
@media (max-width: 700px) {
  .bb-back { padding: 6px 10px; font-size: 11px; }
  .bb-back-full { display: none; }
  .bb-back-short { display: inline; }
}

/* ---------- UTILITIES ---------- */
.bb-hidden { display: none !important; }
