/* NISMCAA Music Academy: redesigned Books page (body.bk-active). Cream, navy and gold. */
body.bk-active{
  --bk-navy:#14275e;
  --bk-navy2:#1d3f9b;
  --bk-gold:#d9a93a;
  --bk-gold2:#f3cf6b;
  --bk-cream:#fbf7ee;
  --bk-line:#eee2c4;
  --bk-ink:#14275e;
  background:var(--bk-cream);
  color:var(--bk-ink);
  overflow-x:hidden;
}
body.bk-active .app,
body.bk-active .main-wrap,
body.bk-active #main,
body.bk-active .academy-layout{
  background:var(--bk-cream);
  max-width:100%;
  min-width:0;
}
body.bk-active #main{padding-top:0;max-width:1080px}
/* Header: real clear logo on cream, no box */
body.bk-active .academy-header{background:var(--bk-cream);border-bottom:0;padding:10px 16px 4px}
body.bk-active .academy-header .brand{background:none;border:0;box-shadow:none;padding:0;color:var(--bk-navy)}
body.bk-active .academy-header .brand>span:not(.brand-mark){display:none}
body.bk-active .brand-mark{background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;transform:none!important;padding:0!important;width:auto!important;height:auto!important}
body.bk-active .brand-mark img{height:auto!important;width:176px!important;max-width:48vw!important;border:0;box-shadow:none;border-radius:0;background:transparent}
body.bk-active #academy-menu-toggle>span{display:none!important}
body.bk-active #academy-menu-toggle{font-size:1.6rem;margin-left:auto;min-width:44px;min-height:44px;padding:0 6px;background:transparent;border:0;box-shadow:none;color:var(--bk-navy)}
body.bk-active .academy-header>.enroll-top{background:linear-gradient(180deg,var(--bk-gold2),var(--bk-gold));color:var(--bk-navy);border:0;border-radius:999px;padding:9px 16px;box-shadow:0 4px 10px -6px rgba(140,100,20,.7)}
body.bk-active .topbar{background:var(--bk-cream);border:0;box-shadow:none;padding:2px 16px;min-height:0}
body.bk-active .topbar #location{display:none}
body.bk-active .topbar .top-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;width:100%}
body.bk-active .topbar .top-actions>*{font-size:.8rem;padding:6px 10px;min-height:36px;border-radius:999px;background:#fff;border:1px solid var(--bk-line);width:auto;color:var(--bk-navy)}
body.bk-active .academy-header nav a.active,
body.bk-active .academy-header a.active[data-nav]{background:var(--bk-navy)!important;color:#fff!important;border-radius:999px}

/* Gold buttons — never green */
body.bk-active .bk-page a.primary,
body.bk-active .bk-page button.primary,
body.bk-active #dialog a.primary,
body.bk-active #dialog button.primary,
body.bk-active .bundle-card a.primary,
body.bk-active .book-actions a.primary{
  background:linear-gradient(180deg,var(--bk-gold2),var(--bk-gold));
  color:var(--bk-navy)!important;
  border:0;
  border-radius:999px;
  box-shadow:0 4px 10px -6px rgba(140,100,20,.7);
  font-weight:800;
  text-decoration:none;
  text-align:center;
}
body.bk-active .bk-page a.primary:hover,
body.bk-active #dialog a.primary:hover,
body.bk-active #dialog button.primary:hover,
body.bk-active .book-actions a.primary:hover{
  filter:brightness(1.04);
}

.bk-page{max-width:100%;min-width:0;color:var(--bk-navy)}

/* Hero */
.bk-hero{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,.95fr);
  align-items:center;
  gap:8px 12px;
  position:relative;
  margin:0 0 12px;
  min-width:0;
}
.bk-hero-copy{position:relative;z-index:1;min-width:0}
.bk-eyebrow{
  margin:0 0 4px;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--bk-navy);
}
.bk-hero h1{
  margin:0 0 8px;
  color:var(--bk-navy);
  font-weight:800;
  letter-spacing:-.04em;
  line-height:1.08;
  font-size:clamp(1.55rem,6.4vw,2.55rem);
}
.bk-sub{
  margin:0 0 12px;
  color:#3a4a72;
  font-size:.92rem;
  line-height:1.4;
  max-width:36ch;
}
.bk-pace{
  display:inline-block;
  background:linear-gradient(180deg,var(--bk-gold2),var(--bk-gold));
  color:var(--bk-navy);
  font-weight:800;
  font-size:.82rem;
  border-radius:999px;
  padding:8px 14px;
  box-shadow:0 4px 10px -6px rgba(140,100,20,.7);
}
.bk-hero-art{position:relative;z-index:1;min-width:0;align-self:end}
.bk-hero-art img{
  display:block;
  width:100%;
  height:auto;
  max-height:18vh;
  object-fit:contain;
  object-position:right center;
  background:transparent;
  border:0;
}

/* Checkout note */
.bk-note{
  margin:8px 0 16px;
  padding:12px 16px;
  background:#fff;
  border:1.5px solid #e8c25a;
  border-radius:22px;
  color:var(--bk-navy);
  font-size:.9rem;
  line-height:1.45;
  box-shadow:0 4px 12px -10px rgba(20,39,94,.3);
}

/* Filter chips */
.bk-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 22px;
  max-width:100%;
}
.bk-chips .bk-chip,
body.bk-active .bk-chips button{
  border:1.5px solid var(--bk-navy2);
  background:#fff;
  color:var(--bk-navy);
  border-radius:999px;
  padding:8px 14px;
  min-height:40px;
  font-weight:700;
  font-size:.86rem;
  box-shadow:none;
  margin:0;
}
.bk-chips .bk-chip.selected,
.bk-chips .bk-chip[aria-pressed="true"],
body.bk-active .bk-chips button.selected{
  background:var(--bk-navy);
  color:#fff;
  border-color:var(--bk-navy);
}

/* Bundles */
body.bk-active .bundle-section{margin:0 0 28px}
body.bk-active .bundle-section .section-heading{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 12px;
  margin:0 0 14px;
}
body.bk-active .bundle-section h2{
  margin:0;
  color:var(--bk-navy);
  font-size:1.35rem;
  font-weight:800;
}
body.bk-active .bundle-section .pill,
body.bk-active .bk-price-pill{
  background:linear-gradient(180deg,var(--bk-gold2),var(--bk-gold));
  color:var(--bk-navy);
  border:0;
  border-radius:999px;
  font-weight:800;
  font-size:.78rem;
  padding:7px 12px;
  box-shadow:none;
}
body.bk-active .bundle-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
body.bk-active .bundle-card{
  background:#fff;
  border:1px solid var(--bk-line);
  border-radius:20px;
  padding:16px 16px 18px;
  display:flex;
  flex-direction:column;
  box-shadow:0 8px 22px -16px rgba(20,39,94,.4);
  min-width:0;
  overflow:hidden;
}
body.bk-active .bundle-card h3{
  margin:0 0 6px;
  color:var(--bk-navy);
  font-size:1.05rem;
  font-weight:800;
}
body.bk-active .bundle-card p{
  color:#546277;
  font-size:.9rem;
  margin:0 0 12px;
  flex:0;
}
body.bk-active .bundle-card a.primary{
  margin-top:auto;
  display:block;
  width:100%;
  padding:11px 14px;
}

/* Fanned covers — vertically centered, no bottom clipping, no empty gap above */
.bk-fan{
  position:relative;
  height:118px;
  margin:2px 6px 12px;
  overflow:hidden;
}
.bk-fan img,
.bk-fan .bk-fan-guide{
  position:absolute;
  left:50%;
  top:50%;
  width:64px;
  height:auto;
  max-height:96px;
  object-fit:contain;
  object-position:center center;
  border-radius:4px;
  border:1px solid var(--bk-line);
  box-shadow:0 6px 14px rgba(20,39,94,.25);
  transform-origin:center center;
  transform:translate(-50%,-50%) rotate(calc((var(--i) - (var(--n) - 1)/2) * 7deg)) translateX(calc((var(--i) - (var(--n) - 1)/2) * 20px));
  background:#fff;
}
.bk-fan-all{height:126px;margin-left:2px;margin-right:2px;padding-bottom:8px;box-sizing:content-box}
.bk-fan-all img{
  width:38px;
  max-height:78px;
  border-radius:3px;
  transform:translate(-50%,-50%) rotate(calc((var(--i) - (var(--n) - 1)/2) * 4.2deg)) translateX(calc((var(--i) - (var(--n) - 1)/2) * 13px));
}
.bk-fan-pair{height:118px}
.bk-fan-pair img,
.bk-fan-pair .bk-fan-guide{
  width:72px;
  max-height:96px;
  position:absolute;
  left:50%;
  top:50%;
}
.bk-fan-guide{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  background:#fffaf0;
  border:1px solid var(--bk-line);
  color:var(--bk-navy);
  text-align:center;
  padding:8px 4px;
  box-sizing:border-box;
}
.bk-fan-guide .bk-clef{font-size:1.6rem;color:var(--bk-gold);line-height:1}
.bk-fan-guide strong{font-size:.62rem;line-height:1.2;font-weight:800}

/* Book cards — 1 column on phone, full uncropped covers */
body.bk-active .books-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
body.bk-active .book-card{
  background:#fff;
  border:1px solid var(--bk-line);
  border-radius:16px;
  box-shadow:0 8px 20px -16px rgba(20,39,94,.4);
  overflow:hidden;
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start;
  gap:14px;
  padding:12px 14px;
  min-width:0;
}
body.bk-active .book-card.bk-wide{
  grid-column:1/-1;
}
body.bk-active #main .book-cover,
body.bk-active #main .guide-cover,
body.bk-active .book-cover,
body.bk-active .guide-cover{
  width:92px;
  max-width:96px!important;
  flex:none;
  height:auto!important;
  min-height:0;
  align-self:flex-start;
  object-fit:contain;
  object-position:center top;
  background:#fff;
  padding:0;
  border:1px solid var(--bk-line);
  border-radius:8px;
  box-shadow:0 4px 10px -4px rgba(20,39,94,.28);
  display:block;
}
body.bk-active .book-card:nth-child(3n+2) .book-cover,
body.bk-active .book-card:nth-child(3n) .book-cover{background:#fff}
body.bk-active #main .guide-cover,
body.bk-active .guide-cover{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  width:92px;
  height:126px!important;
  max-width:96px!important;
  aspect-ratio:unset;
  box-sizing:border-box;
  background:#fffaf0;
  color:var(--bk-navy);
  padding:6px 5px 5px;
  text-align:center;
  overflow:hidden;
}
body.bk-active .guide-cover .bk-clef{
  flex:none;
  font-size:1.45rem;
  color:var(--bk-gold);
  line-height:1;
  margin:0 0 2px;
  padding-bottom:2px;
}
body.bk-active .guide-cover span{color:var(--bk-gold);font-size:.62rem;letter-spacing:.06em;font-weight:800;flex:none;line-height:1.1}
body.bk-active .guide-cover strong{
  font-size:.58rem;
  line-height:1.2;
  color:var(--bk-navy);
  overflow:hidden;
  min-height:0;
  flex:1 1 auto;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:unset;
  line-clamp:unset;
  overflow-wrap:anywhere;
  word-break:break-word;
  max-width:100%;
}
body.bk-active .guide-cover small{display:none}
body.bk-active .book-info{
  padding:0 2px 0 0;
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:2px;
}
body.bk-active .book-info .bk-kicker,
body.bk-active .book-info .pill{
  background:none;
  border:0;
  color:var(--bk-navy);
  padding:0;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.01em;
  margin:0;
}
body.bk-active .book-info h2{
  margin:0;
  font-size:.92rem;
  line-height:1.25;
  color:var(--bk-navy);
  font-weight:800;
}
body.bk-active .book-info .muted,
body.bk-active .book-info .bk-meta{
  color:#546277;
  font-size:.72rem;
  margin:0;
  line-height:1.35;
}
body.bk-active .book-author{margin:0;font-size:.72rem;color:#3a4a72}
body.bk-active .book-actions{
  margin-top:6px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}
body.bk-active .book-actions a{
  border:0;
  background:none;
  box-shadow:none;
  padding:0;
  min-height:0;
  font-size:.8rem;
  border-radius:0;
}
body.bk-active .book-actions a.bk-sample{
  color:var(--bk-navy);
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:2px;
}
body.bk-active .book-actions a.primary{
  display:inline-block;
  width:auto;
  max-width:100%;
  padding:9px 16px;
  min-height:36px;
  border-radius:999px;
  font-size:.86rem;
  white-space:nowrap;
}
body.bk-active .audio-sample{
  width:100%;
  margin:6px 0;
  font-size:.8rem;
}
body.bk-active .audio-sample audio{width:100%;max-width:100%}
body.bk-active .bk-legal{
  margin:22px 0 8px;
  font-size:.75rem;
  color:#546277;
}
body.bk-active .bk-page > p[role="status"]{color:var(--bk-navy)}

@media(min-width:721px){
  body.bk-active .books-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  body.bk-active .book-card{padding:14px 16px;gap:16px}
  body.bk-active #main .book-cover,
  body.bk-active .book-cover{
    width:114px;
    max-width:120px!important;
    flex:none;
  }
  body.bk-active #main .guide-cover,
  body.bk-active .guide-cover{
    width:114px;
    max-width:120px!important;
    height:152px!important;
    flex:none;
    padding:8px 6px 6px;
  }
  body.bk-active .guide-cover .bk-clef{font-size:1.7rem}
  body.bk-active .guide-cover strong{font-size:.62rem;-webkit-line-clamp:6}
  body.bk-active .book-info h2{font-size:1.05rem}
  body.bk-active .book-info .muted,
  body.bk-active .book-info .bk-meta,
  body.bk-active .book-author{font-size:.85rem}
  body.bk-active .book-actions a.primary{font-size:.88rem;padding:9px 16px}
}
@media(min-width:760px){
  .bk-hero{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:16px;margin-bottom:18px}
  .bk-hero h1{font-size:clamp(2.2rem,4vw,3rem)}
  .bk-hero-art img{max-height:22vh}
  .bk-sub{font-size:1.02rem}
  body.bk-active .bundle-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .bk-fan{height:128px}
  .bk-fan img{width:70px;max-height:104px}
  .bk-fan-all{height:136px;padding-bottom:8px}
  .bk-fan-all img{width:42px;max-height:86px;transform:translate(-50%,-50%) rotate(calc((var(--i) - (var(--n) - 1)/2) * 4.2deg)) translateX(calc((var(--i) - (var(--n) - 1)/2) * 14px))}
}
@media(min-width:1100px){
  .bk-hero-art img{max-height:240px}
}

@media(max-width:720px){
  body.bk-active #main{padding-left:14px;padding-right:14px}
  body.bk-active .books-grid{grid-template-columns:1fr;gap:12px}
  body.bk-active .book-card,
  body.bk-active .book-card.bk-wide{grid-column:1/-1}
  .bk-hero h1{font-size:1.5rem}
  .bk-sub{font-size:.82rem}
  .bk-note{font-size:.8rem;padding:10px 12px;border-radius:18px}
  .bk-chips .bk-chip,body.bk-active .bk-chips button{font-size:.78rem;padding:7px 10px;min-height:36px}
}

body.bk-active .highlighted-bundles{
  padding:0;
  border:0;
  background:transparent;
  margin:0 0 28px;
  border-radius:0;
}
