/* ==========================================================================
   THE STORE: buy controls, header cart, the one cart drawer, the score view
   (js/cart.js, js/shop-cart.js). Direction 1, "Quiet and clear".
   Loaded after redesign.css on every page. Colours come only from the role
   tokens in css/compiled/redesign.css (STORE COLOURS); shapes are 2px radii,
   no pills. Hover styles sit behind (hover: hover) so a phone never keeps one.
   ========================================================================== */

:root { --store-ease: cubic-bezier(.2, .8, .2, 1); }

.pdfcart-sr-only,
.shopcart-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* One focus ring for every store control: ink, 2px, 2px off, so it reads on
   paper and next to a filled button alike. */
.buy button:focus-visible,
.pdf-view:focus-visible,
.nav-cart:focus-visible,
.pdfcart-drawer :focus-visible,
.pdfcart-modal :focus-visible,
.sm-buybar button:focus-visible,
.shopcard button:focus-visible,
.shopcard select:focus-visible,
.pdf-card-score:focus-visible,
.dl-step2 :focus-visible,
.dl-more :focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
  box-shadow: none;
}

/* --- The buy control: "+ Add | $4.95", then "✓ In cart" and × ------------------
   132 x 44 in both states (88 + 44), so nothing beside it moves. */
.buy {
  display: inline-flex;
  vertical-align: middle;
  width: 132px;
  height: 44px;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}
.buy-add {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--add-text);
  background: var(--add-bg);
  border: 1.5px solid var(--add-border);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 160ms var(--store-ease), color 160ms var(--store-ease), border-color 160ms var(--store-ease);
}
.buy-ico { flex: 0 0 auto; display: block; }
.buy-pr {
  font-weight: 500;
  color: var(--ink);
  padding-left: 8px;
  border-left: 1px solid var(--hairline-strong);
  min-width: 3.4em;
  text-align: left;
}
.buy-pr:empty { visibility: hidden; }
@media (hover: hover) {
  .buy-add:hover { background: var(--add-hover-bg); }
}
.buy-add:active { background: var(--add-press-bg); }
.buy-x {
  flex: 0 0 44px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 100%;
  padding: 0;
  color: var(--incart-text);
  background: var(--incart-bg);
  border: 1.5px solid var(--incart-bg);
  border-left: 1px solid rgba(250, 247, 242, 0.5);
  border-radius: 0 2px 2px 0;
  cursor: pointer;
}
.buy.is-in .buy-x:not([hidden]) { display: inline-flex; }
.buy.is-in .buy-add {
  color: var(--incart-text);
  background: var(--incart-bg);
  border-color: var(--incart-bg);
  border-radius: 2px 0 0 2px;
}
@media (hover: hover) {
  .buy.is-in .buy-add:hover,
  .buy-x:hover { background: var(--incart-hover-bg); border-color: var(--incart-hover-bg); }
}
.buy.is-in .buy-add:active,
.buy-x:active { background: var(--incart-press-bg) !important; border-color: var(--incart-press-bg) !important; }
.buy.is-in .buy-chk path { stroke-dasharray: 20; animation: buy-draw 220ms var(--store-ease) 60ms both; }
@keyframes buy-draw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }

/* Phone buy bar: 48 tall. Drawer suggestions: compact, no price cell. */
.buy--lg { width: 140px; height: 48px; }
.buy--compact { width: 92px; }
.buy--compact.is-in { width: 128px; }
.buy--compact .buy-add { padding: 0 10px; gap: 6px; font-size: 14px; }

/* --- View: a quiet text button with a page glyph, 44px target ---------------- */
.pdf-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 4px;
  cursor: pointer;
}
@media (hover: hover) { .pdf-view:hover { text-decoration-color: var(--ink); } }
.view-ico { flex: 0 0 auto; display: block; }

/* --- The sheet music table ------------------------------------------------------ */
#productTable th.col-buy-view, #productTable th.col-buy-add,
#productTable td.col-buy-view, #productTable td.col-buy-add {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}
#productTable td.col-buy-add { padding-left: 4px; }
/* The pieces you chose read down the table as a column. */
#productTable tbody tr.is-in-cart > td,
.rp-sheetmusic-table tbody tr.is-in-cart > td { background: var(--row-incart-tint) !important; }
#productTable tbody tr.is-in-cart > td:first-child,
.rp-sheetmusic-table tbody tr.is-in-cart > td:first-child { box-shadow: inset 3px 0 0 var(--row-incart-rule); }
#productTable tbody tr > td { transition: background-color 200ms var(--store-ease); }

.pdf-btn-pair { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
/* Preview (94) + 4 + Add (132, the same in both states) + 24 cell padding:
   at 240 the pair overflowed its cell and the left edge of Preview was cut. */
.rp-sheetmusic-table .col-view { width: 254px !important; white-space: nowrap; }

/* Table rows with a mouse: the controls in proportion with the row. At 44px
   with 15px semibold text, Add and Preview were the loudest things in a row
   whose title is 14px and whose key, tempo and difficulty are small and
   grey. With a fine pointer (a mouse or trackpad) and room for the desktop
   table: 36px high, 14px text, the price at normal weight, a narrower Add,
   the same charcoal outline and the price behind its rule. Touch screens,
   phones and tablets keep 44px. The phone buy bar (.buy--lg), the drawer's
   suggestions (.buy--compact), the drawer's checkout and the book and CD
   cards are not table rows and are untouched. */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  #productTable .buy:not(.buy--lg):not(.buy--compact),
  .rp-sheetmusic-table .buy:not(.buy--lg):not(.buy--compact) { width: 124px; height: 36px; }
  #productTable .buy-add,
  .rp-sheetmusic-table .buy-add { padding: 0 10px; gap: 6px; font-size: 14px; font-weight: 500; }
  #productTable .buy-pr,
  .rp-sheetmusic-table .buy-pr { font-weight: 400; min-width: 3em; padding-left: 7px; }
  #productTable .buy-x,
  .rp-sheetmusic-table .buy-x { flex-basis: 36px; width: 36px; }
  #productTable .pdf-view,
  .rp-sheetmusic-table .pdf-view { height: 36px; padding: 0 8px; font-size: 14px; }
  /* Preview (87) + 4 + Add (124) + 24 cell padding */
  .rp-sheetmusic-table .col-view { width: 240px !important; }
  /* No more height than the 36px control and a little air. */
  html #productTable > tbody > tr > td { padding-top: 8px !important; padding-bottom: 8px !important; }
}

/* --- Listen page, a single PDF ---------------------------------------------- */
.pdf-card { display: flex; gap: 20px; align-items: flex-start; padding: 8px 0 16px; }
.pdf-card-score {
  flex: 0 0 auto;
  width: 160px;
  padding: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  background: var(--surface);
  cursor: zoom-in;
}
.pdf-card-score img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 1035; object-fit: cover; object-position: top; }
.pdf-card-info { min-width: 0; }
.pdf-card-title { font-size: 16px; font-weight: 500; margin: 0 0 4px; color: var(--ink); }
.pdf-card-price { font-size: 14px; color: var(--muted); margin: 0 0 14px; font-variant-numeric: tabular-nums; min-height: 1.4em; }

/* --- The header cart: "bag Cart | 3" --------------------------------------------
   A bordered control, rightmost. The count has its own cell, always there
   (0 when empty), so the header never changes width. */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  padding: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  color: var(--cart-frame);
  background: var(--surface);
  border: 1px solid var(--cart-frame);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 240ms var(--store-ease);
}
/* Hidden while the cart is empty (and no 24-hour window is open): the class
   comes from the boot script in nav.html before first paint, then from
   js/cart.js renderCounts. visibility, not display, so the button keeps its
   place: the header, the brand, the hamburger and the nav links never move
   when it comes and goes, and while hidden it is out of the tab order and
   the accessibility tree. */
html:not(.cart-shown) .nav-cart { visibility: hidden; }
.nav-cart-lab { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; }
.nav-cart-icon { display: block; flex: 0 0 auto; width: 18px; height: 18px; }
.nav-cart-num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0 6px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  border-left: 1px solid var(--cart-frame);
  transition: background-color 240ms var(--store-ease), color 240ms var(--store-ease);
}
.nav-cart-num > span { display: block; }
.nav-cart.has-items .nav-cart-num {
  color: var(--cartcount-text);
  background: var(--cartcount-bg);
  border-left-color: var(--cartcount-bg);
}
.nav-cart.is-landing .nav-cart-num { background: var(--cartcount-land-bg); transition: none; }
@media (hover: hover) {
  .nav-cart:hover { background: var(--add-hover-bg); }
}
.nav-cart-num .roll-out { position: absolute; animation: cart-roll-out 220ms var(--store-ease) forwards; }
.nav-cart-num .roll-in { animation: cart-roll-in 220ms var(--store-ease); }
@keyframes cart-roll-out { to { transform: translateY(-110%); opacity: 0; } }
@keyframes cart-roll-in { from { transform: translateY(110%); opacity: 0; } }

/* One header cart at every width: beside the hamburger while the navbar is
   collapsed, in the nav row once it opens out. The navbar collapses up to
   991px (css/compiled/bootstrap-overrides.css), not Bootstrap's 767px: tied
   to 768px, the cart sat inside the closed menu from 768 to 991px. */
@media (min-width: 992px) {
  .nav-cart-phone { display: none !important; }
  .navbar .nav.navbar-nav > li.nav-cart-item { margin-left: 18px; }
  .navbar .nav.navbar-nav > li.nav-cart-item > .nav-cart { margin: 3px 0; }
}
@media (max-width: 991px) {
  .nav-cart-item { display: none !important; }
  .navbar .navbar-header .nav-cart-phone {
    float: right;
    margin: 3px 8px 3px 0;
  }
  .nav-cart-phone .nav-cart-lab { padding: 0 10px; }
  .nav-cart-phone .nav-cart-num { min-width: 34px; }
}

/* Over the home photo, before the bar turns solid: the light ink. */
body.pull_top .home-nav:not(.sticky) .nav-cart {
  color: var(--dark-ink);
  background: transparent;
  border-color: rgba(245, 241, 234, 0.7);
}
body.pull_top .home-nav:not(.sticky) .nav-cart-num { color: var(--dark-ink); border-left-color: rgba(245, 241, 234, 0.7); }
body.pull_top .home-nav:not(.sticky) .nav-cart.has-items .nav-cart-num { border-left-color: var(--cartcount-bg); }
body.pull_top .home-nav:not(.sticky) .nav-cart:focus-visible { outline-color: var(--dark-ink) !important; }
body.pull_top:has(.hero--light) .home-nav:not(.sticky) .nav-cart { color: var(--cart-frame); background: var(--surface); border-color: var(--cart-frame); }
body.pull_top:has(.hero--light) .home-nav:not(.sticky) .nav-cart-num { color: var(--muted); border-left-color: var(--cart-frame); }
body.pull_top:has(.hero--light) .home-nav:not(.sticky) .nav-cart.has-items .nav-cart-num { color: var(--cartcount-text); }
@media (max-width: 991px) {
  body.pull_top .home-nav:not(.sticky):has(.navbar-collapse.in) .nav-cart-phone { color: var(--cart-frame); background: var(--surface); border-color: var(--cart-frame); }
}

/* The note under the header cart after an add (desktop and tablet). Fixed,
   so it never moves the page. */
.pdfcart-note {
  position: fixed;
  z-index: 1041;
  max-width: 340px;
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.10);
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
}
.pdfcart-note.is-shown { visibility: visible; opacity: 1; animation: cart-note-in 160ms var(--store-ease); }
.pdfcart-note strong { font-weight: 600; }
.pdfcart-note-go { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@keyframes cart-note-in { from { opacity: 0; } }
@media (max-width: 767px) { .pdfcart-note { display: none !important; } }

/* The add flight: one fixed element, transform and opacity only. */
.pdfcart-flyer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1045;
  pointer-events: none;
  background: #fff center top / cover no-repeat;
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.18);
  transform-origin: 0 0;
  will-change: transform, opacity;
}

/* --- The drawer ---------------------------------------------------------------
   440px; the whole screen on a phone. The body scrolls; the foot (Total and
   the one button) is pinned and short. */
body.pdfcart-open { overflow: hidden; }

.pdfcart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(28, 25, 23, 0.32);
  animation: cart-fade 200ms var(--store-ease);
}
.pdfcart-backdrop[hidden] { display: none; }
@keyframes cart-fade { from { opacity: 0; } }

.pdfcart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1060;
  width: 440px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--hairline-strong);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  animation: cart-slide 280ms var(--store-ease);
}
.pdfcart-drawer[hidden] { display: none; }
@keyframes cart-slide { from { transform: translateX(100%); } }

.pdfcart-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid var(--hairline-strong);
}
.pdfcart-drawer .pdfcart-title {
  font-family: var(--sans) !important;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
.pdfcart-headcount { margin-right: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.pdfcart-icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
@media (hover: hover) { .pdfcart-icon-btn:hover { background: var(--icon-hover-bg); } }

.pdfcart-notice {
  margin: 0;
  padding: 12px 20px;
  font-size: 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hairline);
}
.pdfcart-notice[hidden] { display: none; }

.pdfcart-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; }

.pdfcart-sec { margin: 0; }
/* The heading says only what the group is; the kind ("PDF", "Mailed to you")
   sits beside it, outside the heading, so it is not read as part of it. */
.pdfcart-drawer .pdfcart-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 18px 0 2px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
}
.pdfcart-drawer .pdfcart-sec-h {
  margin: 0;
  font-family: var(--sans) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.pdfcart-sec-h:focus { outline: none; }
.pdfcart-sec-kind { font-weight: 400; color: var(--muted); }

.pdfcart-lines, .shopcart-lines { list-style: none; margin: 0; padding: 0; }
.pdfcart-line,
.shopcart-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 44px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.pdfcart-thumb {
  display: block;
  width: 48px;
  height: 62px;
  object-fit: cover;
  object-position: top;
  background: #fff;
  border: 1px solid var(--hairline-strong);
}
.pdfcart-line-text, .pdfcart-pick-text, .shopcart-line-text { min-width: 0; display: flex; flex-direction: column; }
.pdfcart-line-title, .shopcart-line-title { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.pdfcart-line-meta, .shopcart-line-meta { font-size: 13px; color: var(--muted); line-height: 1.4; }
.pdfcart-line-meta.is-warn, .shopcart-line-warn { color: var(--ink); font-weight: 500; }
.pdfcart-line-price, .shopcart-line-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--discount-text);
}
.pdfcart-line-price s, .shopcart-line-price s { display: block; font-size: 13px; color: var(--struck-text); }
/* The songbook and CD saving under the CD line, Shopify's own amount. */
.shopcart-line-save { color: var(--ink); }
/* The other half of a songbook and CD pair, after the buyer's own lines. */
.shopcart-pairs { margin: 4px 0 0; }
.shopcart-pair {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.shopcart-pair-text { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.shopcart-pair-add { height: 44px; padding: 0 12px; gap: 6px; font-size: 14px; }
@media (max-width: 767px) {
  .shopcart-pair { grid-template-columns: 40px minmax(0, 1fr) auto; }
}
.pdfcart-line.is-rejected .pdfcart-line-title { text-decoration: line-through; text-decoration-color: var(--muted); }
.pdfcart-line.is-gone,
.shopcart-line.is-gone {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  color: var(--muted);
}
.pdfcart-textbtn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* Books and CDs lines: a square cover and a quantity stepper. */
.shopcart-thumb { width: 48px; height: 48px; background: var(--surface); }
.shopcart-thumb img { display: block; width: 48px; height: 48px; object-fit: contain; }
.shopcart-section[aria-busy="true"] .shopcart-lines { opacity: 0.6; }
.shopcart-qty {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 6px;
  border: 1px solid var(--control-line);
  border-radius: 2px;
}
.shopcart-step {
  width: 44px;
  height: 36px;
  padding: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.shopcart-step[disabled] { color: var(--hairline-strong); cursor: default; }
@media (hover: hover) { .shopcart-step:not([disabled]):hover { background: var(--icon-hover-bg); } }
.shopcart-qty-n { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.shopcart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
@media (hover: hover) { .shopcart-remove:hover { background: var(--icon-hover-bg); } }
.shopcart-empty { margin: 0; padding: 12px 0; font-size: 15px; color: var(--muted); }
.shopcart-empty[hidden], .shopcart-error[hidden] { display: none; }
.shopcart-error,
.pdfcart-error {
  margin: 10px 0;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  border-left: 3px solid var(--ink);
}
.pdfcart-error[hidden] { display: none; }

/* The suggestions: the tier sentence leads, then the picks. */
.pdfcart-band { margin: 18px 0 6px; padding: 14px 0 4px; border-top: 1px solid var(--ink); }
.pdfcart-drawer .pdfcart-band-h {
  margin: 0 0 4px;
  font-family: var(--sans) !important;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  scroll-margin-top: 12px;
}
.pdfcart-band-h strong { display: block; margin-bottom: 2px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.pdfcart-band-h:focus { outline: none; }
.pdfcart-band-h:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
/* The tier meter: how far along the discounts the cart is. Ink on a hairline
   track, no teal (that stays on the way to pay). transform only, so moving it
   never lays anything out. */
.pdfcart-meter { margin: 12px 0 6px; }
.pdfcart-meter-track { position: relative; height: 4px; background: var(--hairline); border-radius: 2px; }
.pdfcart-meter-fill {
  position: absolute; inset: 0;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: left center;
  transition: transform 280ms var(--store-ease);
}
.pdfcart-meter-tick { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; background: var(--control-line); }
.pdfcart-meter-tick.is-reached { background: var(--ink); }
.pdfcart-meter-labels { position: relative; height: 18px; margin-top: 6px; font-size: 12px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pdfcart-meter-label { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.pdfcart-meter-label.is-end { transform: translateX(-100%); }
.pdfcart-meter-label.is-reached { color: var(--ink); font-weight: 600; }
/* Narrow (a 320px phone): the labels would run into each other, so every
   other one drops to a second line. */
@media (max-width: 359px) {
  .pdfcart-meter-labels { height: 36px; }
  .pdfcart-meter-label:nth-child(even) { top: 18px; }
}
.pdfcart-band-label { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.pdfcart-pick {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.pdfcart-pick-thumb {
  position: relative;
  width: 40px;
  height: 52px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--hairline-strong);
  cursor: zoom-in;
}
.pdfcart-pick-thumb::after { content: ""; position: absolute; inset: -4px -2px; }
.pdfcart-pick-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; }
.pdfcart-play { border: 1px solid var(--control-line); border-radius: 50%; }
.pdfcart-play[aria-pressed="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.pdfcart-play-gap { width: 44px; }

.pdfcart-album {
  margin: 14px 0 6px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
}
.pdfcart-drawer .pdfcart-album-h { margin: 0 0 10px; font-family: var(--sans) !important; font-size: 15px; font-weight: 600; color: var(--ink); }
.pdfcart-album-pages { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.pdfcart-album-img { width: 36px; height: 47px; object-fit: cover; object-position: top; border: 1px solid var(--hairline-strong); background: #fff; }
.pdfcart-album-more { padding-left: 4px; font-size: 13px; color: var(--muted); }
.pdfcart-album-line { margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.pdfcart-album-names { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.pdfcart-album.is-full .pdfcart-album-line { display: flex; gap: 8px; align-items: center; margin: 0; }
.pdfcart-album.is-full .buy-ico { color: var(--ink-action); }

/* Plain bordered buttons (the empty cart's links, the album offer). */
.pdfcart-btn,
a.pdfcart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary-text);
  background: var(--surface);
  border: 1.5px solid var(--secondary-border);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) { .pdfcart-btn:hover, a.pdfcart-btn:hover { color: var(--secondary-text); background: var(--add-hover-bg); text-decoration: none; } }
.pdfcart-album-add { margin-top: 6px; }

.pdfcart-empty { padding: 40px 0 8px; }
.pdfcart-empty-line { margin: 0 0 16px; font-size: 18px; }
.pdfcart-empty-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* Totals: only "Total" unless there is a discount or a book. */
.pdfcart-sum { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.pdfcart-sum td { padding: 3px 0; }
.pdfcart-sum td:last-child { text-align: right; }
.pdfcart-sum-row td:last-child { color: var(--discount-text); }
.pdfcart-sum-total td { padding-top: 8px; font-size: 18px; font-weight: 600; }
.pdfcart-sum-body { display: none; margin-top: 16px; }

.pdfcart-foot {
  flex: 0 0 auto;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--hairline-strong);
}
.pdfcart-foot[hidden] { display: none; }
/* On a very short screen (a phone held sideways, 400% zoom) the footer may
   not take the whole drawer: it scrolls itself, so the button stays reachable. */
@media (max-height: 420px) { .pdfcart-foot { max-height: 55vh; overflow-y: auto; } }
.pdfcart-note-line { margin: 4px 0 12px; font-size: 14px; color: var(--muted); }
.pdfcart-jump {
  display: block;
  min-height: 32px;
  margin: -4px 0 4px;
  padding: 0;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-color: var(--control-line);
  text-underline-offset: 3px;
  cursor: pointer;
}
.pdfcart-jump[hidden] { display: none; }

/* The one decisive button. */
.pdfcart-checkout,
.dl-step2-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--checkout-text);
  background: var(--checkout-bg);
  border: 1.5px solid var(--checkout-bg);
  border-radius: 2px;
  cursor: pointer;
}
.pdfcart-checkout-amt { font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .pdfcart-checkout:hover, .dl-step2-pay:hover { background: var(--checkout-hover-bg); border-color: var(--checkout-hover-bg); }
}
.pdfcart-checkout:active, .dl-step2-pay:active { background: var(--checkout-press-bg); border-color: var(--checkout-press-bg); }
.pdfcart-checkout[aria-disabled="true"], .dl-step2-pay[aria-disabled="true"] { opacity: 0.7; cursor: progress; }

/* A mixed cart: the two payments side by side, then the step-1 button. */
/* In the scrolling body, after the lines and before the suggestions. */
.pdfcart-split-box { margin-top: 16px; }
.pdfcart-split-box .pdfcart-note-line { margin-bottom: 0; }
.pdfcart-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 4px 0 8px; padding: 0; }
.pdfcart-split-part {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  font-size: 14px;
  color: var(--ink);
}
.pdfcart-split-part.is-now { border-color: var(--ink); }
.pdfcart-split-k { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pdfcart-split-amt { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pdfcart-split-when { font-size: 13px; color: var(--muted); }
.pdfcart-step-n {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.pdfcart-split-part.is-now .pdfcart-step-n { color: var(--bg); background: var(--ink); }
.pdfcart-checkout-main { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.pdfcart-checkout-step { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; opacity: 0.9; }
.pdfcart-window-line { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

@media (max-width: 767px) {
  .pdfcart-drawer { width: 100%; border-left: 0; }
  .pdfcart-head { padding: 6px 8px 6px 16px; }
  .pdfcart-body { padding: 0 16px 16px; }
  .pdfcart-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .pdfcart-sum-foot .pdfcart-sum-row { display: none; }
  .pdfcart-sum-foot .pdfcart-sum-total td { padding-top: 0; font-size: 17px; }
  .pdfcart-sum-body { display: table; }
  .pdfcart-note-line { margin: 0 0 8px; font-size: 13px; }
  .pdfcart-split-part { padding: 8px 10px; }
  .pdfcart-split-amt { font-size: 17px; }
  /* 44px targets on phones. */
  .pdfcart-drawer .shopcart-step { height: 44px; }
  .pdfcart-line, .shopcart-line { grid-template-columns: 40px minmax(0, 1fr) auto 44px; padding: 8px 0; }
  .pdfcart-thumb { width: 40px; height: 52px; }
  .shopcart-thumb, .shopcart-thumb img { width: 40px; height: 40px; }
}

/* --- Checkout: the second step on the same surface --------------------------------
   Check out turns the cart into the payment step: the panel widens on a
   tablet or desktop (440 -> 600, Stripe's form needs the room), the cart
   slides out to the left, payment slides in from the right, and the head
   gains Back. On a phone it is the same full-height sheet. Stripe's own form
   (an iframe from js.stripe.com) sits on white, its default page colour, so
   the join is invisible; the paper, charcoal and teal round it are ours. */
.pdfcart-pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.pdfcart-pane[hidden] { display: none; }
.pdfcart-drawer { transition: width 280ms var(--store-ease); }
@media (min-width: 768px) { .pdfcart-drawer.is-pay { width: 600px; } }
.pdfcart-drawer.is-pay .pdfcart-pane-pay { animation: pay-in 280ms var(--store-ease); }
.pdfcart-drawer.is-back .pdfcart-pane-cart { animation: cart-back 280ms var(--store-ease); }
@keyframes pay-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes cart-back { from { opacity: 0; transform: translateX(-24px); } }
.pdfcart-back { margin-left: -8px; }
.pdfcart-back[hidden] { display: none; }
.pdfcart-title:focus { outline: none; }
.pdfcart-headcount[hidden] { display: none; }
.pdfcart-drawer.is-pay .pdfcart-title { margin-right: auto; }

.pdfcart-pane-pay { background: var(--surface); }
.pdfcart-pay-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.pdfcart-pay-mount { min-height: 0; }
.pdfcart-pay-status { padding: 20px; }
.pdfcart-pay-status[hidden] { display: none; }
.pdfcart-pay-line { margin: 0 0 18px; font-size: 15px; color: var(--muted); }
/* A quiet stand-in for the form while Stripe loads: grey bars, no spinner. */
.pdfcart-pay-skel { display: grid; gap: 14px; }
.pdfcart-skel {
  display: block;
  height: 40px;
  background: var(--surface-2);
  border-radius: 2px;
  animation: skel-breathe 1.4s ease-in-out infinite alternate;
}
.pdfcart-skel.w60 { width: 60%; height: 22px; }
.pdfcart-skel.w40 { width: 40%; height: 22px; margin-top: 8px; }
.pdfcart-skel.w100 { width: 100%; }
@keyframes skel-breathe { from { opacity: 1; } to { opacity: 0.55; } }

.pdfcart-pay-error { margin: 20px; padding: 16px; background: var(--bg); border: 1px solid var(--hairline-strong); border-radius: 2px; }
.pdfcart-pay-error[hidden] { display: none; }
.pdfcart-pay-error-h { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.pdfcart-pay-error-msg { margin: 0 0 14px; font-size: 14px; color: var(--ink); }
.pdfcart-pay-error-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pdfcart-pay-hosted { min-height: 44px; }

.pdfcart-pay-note {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border-top: 1px solid var(--hairline);
}
.pdfcart-lock { flex: 0 0 auto; }
@media (max-width: 767px) {
  .pdfcart-pay-status { padding: 16px; }
  .pdfcart-pay-error { margin: 16px; }
  .pdfcart-pay-note { padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* --- The score view ----------------------------------------------------------- */
.pdfcart-modal {
  position: fixed;
  inset: 0;
  z-index: 1070;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  pointer-events: none;
}
.pdfcart-modal[hidden] { display: none; }
.pdfcart-modal-panel {
  pointer-events: auto;
  width: min(760px, 100%);
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.18);
  font-family: var(--sans);
}
.pdfcart-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline-strong);
}
.pdfcart-modal-titles { min-width: 0; margin-right: auto; }
.pdfcart-modal .pdfcart-modal-title {
  margin: 0;
  font-family: var(--sans) !important;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pdfcart-modal-meta { margin: 0; font-size: 13px; color: var(--muted); }
.pdfcart-modal-score { background: #fff; }
.pdfcart-modal-img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 1035; background: #fff; }
@media (max-width: 640px) {
  .pdfcart-modal { padding: 0; }
  .pdfcart-modal-panel { border: 0; min-height: 100%; }
  .pdfcart-modal-head { flex-wrap: wrap; padding: 8px 8px 8px 16px; }
  .pdfcart-modal-head .buy { order: 3; width: 100%; }
  .pdfcart-modal-head .buy-add { justify-content: center; }
}

/* --- Phone: the sheet music buy bar ----------------------------------------------
   A strip with the tier sentence (Undo just after an add), then the piece,
   View and Add. The strip keeps one height in every state, so the score
   above never moves. */
@media (max-width: 768px) {
  .sm-buybar {
    display: block !important;
    padding: 0 16px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    text-align: left !important;
    background: var(--bg) !important;
    border-top: 1px solid var(--ink) !important;
  }
  .sm-buybar-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 58px;
    margin: 0 -16px 8px;
    padding: 0 16px;
    overflow: hidden;
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.35;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline);
  }
  .sm-buybar-strip.is-just { background: var(--just-tint); }
  .sm-strip-text {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    font: inherit;
    text-align: left;
    color: inherit;
    background: none;
    border: 0;
  }
  .sm-strip-words { display: block; min-width: 0; }
  button.sm-strip-text { cursor: pointer; }
  .sm-strip-text strong { font-weight: 600; }
  .sm-strip-go { text-decoration: underline; text-decoration-color: var(--control-line); text-underline-offset: 3px; white-space: nowrap; }
  .sm-strip-undo {
    flex: 0 0 auto;
    min-width: 44px;
    height: 44px;
    padding: 0 4px;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .sm-buybar-acts { display: flex; align-items: center; gap: 6px; }
  .sm-buybar-who { flex: 1 1 auto; min-width: 0; }
  .sm-buybar-title {
    display: block;
    overflow: hidden;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink);
  }
  .sm-buybar-sub { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1.3em; }
  .sm-buybar .pdf-view { padding: 0 6px; }
  /* "Preview" is two letters longer than the old "View": the page glyph goes
     here so the piece title keeps the width it had. The word says it. */
  .sm-buybar .view-ico { display: none; }
}
@media (max-width: 360px) {
  .sm-buybar .buy--lg { width: 124px; }
  .sm-buybar .buy-add { padding: 0 8px; gap: 6px; }
  .sm-buybar .pdf-view { padding: 0 4px; }
}

/* --- Sheet music page: the seasonal link (js/sheetmusic.js) ---------------- */
.sm-season { margin: 12px 0 0; font-family: var(--sans); font-size: 14px; }
.sm-season-link {
  padding: 0;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline-strong);
  cursor: pointer;
}
.sm-season-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.sm-season-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* --- Reduced motion: no flight, no roll, no slide; every state change instant. */
@media (prefers-reduced-motion: reduce) {
  .buy-add, .buy-x, .nav-cart, .nav-cart-num, .pdfcart-drawer, .pdfcart-backdrop,
  .pdfcart-pane, .pdfcart-skel, .pdfcart-meter-fill,
  .pdfcart-note, .pdfcart-note.is-shown, .buy.is-in .buy-chk path,
  .nav-cart-num .roll-out, .nav-cart-num .roll-in, #productTable tbody tr > td {
    animation: none !important;
    transition: none !important;
  }
  .pdfcart-flyer { display: none !important; }
}

/* Text roles (mix d: ink). */
.pdfcart-band-h, .pdfcart-band-h strong { color: var(--tier-text); }
.pdfcart-sum-total td { color: var(--total-text); }

/* A short screen (a phone held sideways, or 200% zoom): js/sheetmusic.js
   shortens the score so the buy bar stays on screen, which leaves too little
   height for the play button at the score's foot. It moves up to the top row,
   beside the page counter, clear of Search and Share. */
@media (max-width: 767px) and (max-height: 519px) {
  .sm-carousel-audio-wrap { top: 3px !important; bottom: auto !important; right: auto !important; left: 104px !important; }
  .sm-carousel .sm-carousel-play { width: 44px !important; height: 44px !important; }
}
