/* SLMG kit: the rules every direction shares.
   Enqueued ONLY on pages that declare a direction (post meta _slmg_direction), so nothing here reaches the rest of the site.
   It also loads in the Divi Visual Builder for such a page, so the builder shows the design; no kit script runs there.
   The design tokens are in kit/tokens.css (loaded before this file), shared with the site chrome. */

/* The three rules below reach outside the page body (focus ring, Divi's page container, motion), so they are kept
   out of the Divi Visual Builder: both builder windows carry the class et-fb, and the builder's own interface lives there. */

/* Visible focus, everywhere on a direction's page. */
body.slmg-dir:not(.et-fb) :focus-visible { outline: 2px solid #fff !important; outline-offset: 2px !important; }

/* Divi makes #page-container a scroll container, which silently disables position: sticky inside a page. */
body.slmg-dir:not(.et-fb) #page-container { overflow-x: clip !important; overflow-y: visible !important; }

/* Reduced motion: Divi honours prefers-reduced-motion nowhere, so the kit does it for every direction.
   Nothing slides, lifts, fades in or scrolls smoothly; Divi's entrance animations are shown in their end state.
   (In-page links are made to jump by kit/chrome.js, their one owner: Divi's smooth scroll is script, not CSS.) */
@media (prefers-reduced-motion: reduce) {
  body.slmg-dir:not(.et-fb) *, body.slmg-dir:not(.et-fb) *::before, body.slmg-dir:not(.et-fb) *::after {
    transition: none !important; animation: none !important; scroll-behavior: auto !important;
  }
  body.slmg-dir .et_animated, body.slmg-dir .et-waypoint, body.slmg-dir .et_pb_animation_top, body.slmg-dir .et_pb_animation_bottom,
  body.slmg-dir .et_pb_animation_left, body.slmg-dir .et_pb_animation_right { opacity: 1 !important; transform: none !important; }
  html:has(body.slmg-dir:not(.et-fb)) { scroll-behavior: auto !important; }
}

/* ---------- what the kit's own script and shortcodes print (a pack may restyle any of it) ---------- */

/* A cover that is waiting to load (kit/images.php, kit/kit.js): it keeps its square; without script the <noscript> copy shows. */
body.slmg-dir img.slmg-defer { background: var(--slmg-black); }
/* Only a cover the kit has finished (its real address held in data-slmg-src, a <noscript> copy beside it) is hidden without
   script; a cover marked but never finished keeps its real address and shows (no black squares, whatever the page). */
html:not(.slmg-js) body.slmg-dir img.slmg-defer[data-slmg-src] { display: none !important; }
/* An empty Divi loop still draws its looped element once, with data-slmg-product="0" and empty parts: never shown on the
   site (in the builder it stays, so the card can still be edited). */
body.slmg-dir:not(.et-fb) [data-slmg-loop][data-slmg-product="0"] { display: none !important; }

/* The audio player did not load: play buttons are visibly out of use, and a line at the bottom says why when one is pressed. */
body.slmg-dir [data-slmg-play].is-dead { opacity: .45; border-style: dashed !important; cursor: not-allowed; }
body.slmg-dir .slmg-toast { position: fixed; z-index: 100000; left: 50%; bottom: calc(var(--slmg-pap-h, 56px) + 16px); transform: translateX(-50%); display: none;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid var(--slmg-orange); border-radius: var(--slmg-r);
  background: var(--slmg-raised); color: var(--slmg-ink); font: 500 15px/1.4 var(--slmg-display, sans-serif); box-shadow: 0 12px 30px -10px #000; }
body.slmg-dir .slmg-toast.is-on { display: block; }

/* A release part that has no release (kit/shortcodes.php): shown to logged-in editors only, never to visitors. */
body.slmg-dir .slmg-editor-note { display: block; margin: 4px 0; padding: 8px 10px; border: 1px dashed var(--slmg-line-strong); border-radius: var(--slmg-r);
  background: var(--slmg-surface); color: var(--slmg-dim); font: 400 13px/1.4 var(--slmg-display, sans-serif); letter-spacing: 0; text-transform: none; }

/* The buy block inside the Divi builder (a plain stand-in for the store's form). */
body.slmg-dir .slmg-buy__standin { margin-top: var(--slmg-s2); padding: 8px 10px; border: 1px dashed var(--slmg-line-strong); border-radius: var(--slmg-r); color: var(--slmg-dim); font: 400 13px/1.4 var(--slmg-display, sans-serif); }

/* "6 already in your cart" under an edition's card when the visitor's cart holds every copy left (kit/kit.js section 2b;
   words inCartOne and inCartN in slmg_kit_words()). The whole row under the card, close to it, in the card count's own
   mono capitals and orange (the pack may restyle it). */
body.slmg-dir .slmg-fmts > .slmg-fmt__incart { flex: 1 1 100%; margin: calc(-1 * var(--slmg-s1, 4px)) 0 0; padding: 0 0 0 2px; color: var(--slmg-orange, #ff9500);
  font: 500 12px/1.4 var(--slmg-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; letter-spacing: .1em; text-transform: uppercase; }

/* The shelf rolled up (kit/kit.js marks the sleeves past the first row): they are out of sight, out of the tab order and
   out of the screen reader's reading until the shelf is rolled out. Only with script, so without it every sleeve shows. */
html.slmg-js body.slmg-dir [data-slmg-loop].is-over { display: none !important; }

/* ---------- the release sheet (kit/sheet.js): where it sits and how it moves. The pack gives it its look. ----------
   Desktop: from the right, from under the sticky header bar (--slmg-sheet-top, measured) down to the player bar
   (--slmg-pap-h, measured), about half the window. Phone (900 px and narrower): from the bottom, above the player, modal.
   It sits under the header's own menus and under the player (whose playlist drawer opens over it). Reduced motion: the
   block above already makes it appear at once. */
body.slmg-dir .slmg-sheet { position: fixed; z-index: 9980; top: var(--slmg-sheet-top, 0px); right: 0; bottom: var(--slmg-pap-h, 56px);
  width: min(700px, max(560px, calc(48vw / var(--vp-zoom, 1)))); max-width: 100vw; display: flex; flex-direction: column; outline: none;
  transform: translateX(104%); transition: transform .34s var(--slmg-ease, ease-out); }
body.slmg-dir .slmg-sheet.is-on { transform: none; }
body.slmg-dir .slmg-sheet[hidden], body.slmg-dir .slmg-sheet-scrim[hidden], body.slmg-dir .slmg-buybar[hidden] { display: none !important; }
body.slmg-dir .slmg-sheet__top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
body.slmg-dir .slmg-sheet__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.slmg-dir .slmg-sheet-scrim { position: fixed; inset: 0; z-index: 9994; background: rgba(0, 0, 0, .62); }
/* the page behind a modal layer is held still by the layer manager (kit/layer.js sets overflow inline on html and body) */
html.slmg-sheet-open body.slmg-dir .et_pb_scroll_top { display: none !important; }   /* Divi's back-to-top arrow would sit on the sheet */
@media (max-width: 900px) {
  body.slmg-dir .slmg-sheet { z-index: 9995; top: 40px; left: 0; width: auto; transform: translateY(calc(100% + var(--slmg-pap-h, 56px) + 40px)); }
}
/* covers on the shelf and the wall open their release when the sheet is there to open it */
html.slmg-sheet-ready body.slmg-dir [data-slmg-loop]:not([data-slmg-loop="stage"]):not([data-slmg-sheet="off"]) .slmg-cover, html.slmg-sheet-ready body.slmg-dir [data-slmg-card] .slmg-cover { cursor: pointer; }

/* ---------- the phone buy bar (kit/kit.js): pinned just above the player bar; the pack draws it ---------- */
body.slmg-dir .slmg-buybar { position: fixed; z-index: 9970; left: 0; right: 0; bottom: var(--slmg-pap-h, 56px); display: flex; align-items: center; }
/* while it shows, nothing focused or jumped to lands under it, and the toast sits above it */
html.slmg-buybar-on:has(body.slmg-dir:not(.et-fb)) { scroll-padding-bottom: calc(var(--slmg-pap-h, 56px) + var(--slmg-buybar-h, 0px) + 40px) !important; }
html.slmg-buybar-on body.slmg-dir .slmg-toast { bottom: calc(var(--slmg-pap-h, 56px) + var(--slmg-buybar-h, 0px) + 16px); }

/* ---------- WITHOUT SCRIPT (owner: the kit builder; kit/shortcodes.php) ----------
   The store's form for a product with formats cannot add anything without its own script (WooCommerce needs the chosen
   variation's id, which only that script fills in), so without script it is not shown: the <noscript> forms beside it
   (one small form per format, .slmg-plain) are what the store accepts. Play buttons only work through the player's
   script, so without script they are not shown either (the track list and the release link stay). Never in the builder. */
html:not(.slmg-js) body.slmg-dir:not(.et-fb) .slmg-buy form.variations_form,
html:not(.slmg-js) body.slmg-dir:not(.et-fb) [data-slmg-play] { display: none !important; }
body.slmg-dir .slmg-plain__form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin: 0 0 12px; padding: 12px 0 0; border-top: 1px solid var(--slmg-line, rgba(255, 255, 255, .14)); }
body.slmg-dir .slmg-plain__what { flex: 1 1 100%; margin: 0; }
body.slmg-dir .slmg-plain__what > * { margin-right: 8px; }
body.slmg-dir .slmg-plain__field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
body.slmg-dir .slmg-plain__field input, body.slmg-dir .slmg-plain__field select { min-height: 44px; }
body.slmg-dir .slmg-plain__add { min-height: 44px; }

/* ---------- A LONG BLURB: two lines, the rest behind "Read more" (kit.js 2d; the operator's answer #67, 2026-11-21) ----------
   The product page's stage and the release sheet. The button sits ON the blurb's last line, at its end, over a short fade
   into the ground behind it, so it adds no height (nothing moves when it arrives); its box is 44 px tall for a finger.
   Open, the whole blurb shows and "Show less" follows it. In the sheet the blurb keeps two lines in every window. */
body.slmg-dir .slmg-blurb-box { position: relative; }
body.slmg-dir .slmg-sheet .slmg-blurb { -webkit-line-clamp: 2; line-clamp: 2; }
body.slmg-dir .slmg-blurb-box.is-open .slmg-blurb { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; max-height: none; }
body.slmg-dir .slmg-blurb-more { position: absolute; right: 0; bottom: -10px; display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 0 0 40px; border: 0; border-radius: 0;
  background: linear-gradient(90deg, transparent, var(--slmg-blurb-ground, var(--slmg-ground, #0a0a0a)) 32px); color: var(--slmg-orange, #ff9500);
  font: 500 12px/1.2 var(--slmg-mono, monospace); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; box-shadow: none; }
body.slmg-dir .slmg-blurb-more:hover { text-decoration: underline; text-underline-offset: 3px; }
body.slmg-dir .slmg-blurb-more[hidden] { display: none; }
body.slmg-dir .slmg-blurb-box.is-open .slmg-blurb-more { position: static; margin-top: 2px; padding: 0; background: none; }
body.slmg-dir .slmg-sheet .slmg-blurb-more { --slmg-blurb-ground: var(--slmg-surface, #131313); }

/* ---------- COVERS ARE SQUARE (the operator's answer #70, 2026-11-21: "Let's crop the non-square ones, but make the small
   covers enlarged. It'll just be a reminder to me to fix those in the future.") ----------
   Every cover in a card, on the shelf, on a stage and in the release sheet fills its square box: a picture that is not
   square is cropped to the square from its middle (object-fit: cover; it was shown whole on black bars), and a small
   picture is drawn up to the box (width and height 100 %, as before). Any direction's pack; the pack sizes the box. */
body.slmg-dir .slmg-cover img { object-fit: cover; }

/* ---------- "WANT THE NEXT PLATE BEFORE IT IS GONE?" (the operator's answer #48; [slmg_next_plate] in
   kit/modules/product/module.php): the Main Stage look of the small sign-up band, here so it follows the shortcode to any
   page of the pack (product pages and the home page). Its form is Divi's own Email Optin; its fields, labels and button are
   drawn by stage.css's next-drop band rules (the class slmg-drop__form), with one field (email) beside the button. ---------- */
body.slmg-dir-stage .slmg-plate__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--slmg-s5) var(--slmg-s7); align-items: end;
  padding: var(--slmg-s6) var(--slmg-gut); border-top: 1px solid var(--slmg-line); border-bottom: 1px solid var(--slmg-line); background: var(--slmg-ground); color: var(--slmg-ink); }
body.slmg-dir-stage .slmg-plate__words .slmg-kick { margin: 0; padding-bottom: 8px; color: var(--slmg-orange); }
body.slmg-dir-stage .slmg-plate__h { margin: 0; padding: 0; font: 800 clamp(28px, calc(2.6vw / var(--vp-zoom, 1)), 46px)/.95 var(--slmg-display); font-stretch: 62%; text-transform: uppercase; letter-spacing: -.005em; color: var(--slmg-ink); }
body.slmg-dir-stage .slmg-plate__line { margin: var(--slmg-s3) 0 0; padding: 0; max-width: 52ch; color: var(--slmg-dim); font-size: 16px; line-height: 1.5; }
body.slmg-dir-stage .slmg-plate .slmg-drop__form.et_pb_signup { display: block; margin: 0; padding: 0; background: transparent !important; color: var(--slmg-ink); }
body.slmg-dir-stage .slmg-plate .slmg-drop__form .et_pb_newsletter_fields { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
body.slmg-dir-stage .slmg-plate .slmg-drop__form .et_pb_newsletter_button_wrap { grid-column: auto; }
@media (max-width: 900px) {
  body.slmg-dir-stage .slmg-plate__in { grid-template-columns: minmax(0, 1fr); padding: var(--slmg-s5) var(--slmg-gut); }
  body.slmg-dir-stage .slmg-plate .slmg-drop__form .et_pb_newsletter_fields { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- a release's own pictures (integration, 2026-11-21, the operator's report on the lost product gallery) ----------
   slmg_product_gallery_html() prints the cover and the product's gallery as small pictures under the cover (product page)
   or under the sheet's hero; kit/gallery.js opens them large in one layer of the layer manager. Without script each small
   picture is a link to the full picture. */
.slmg-gal { margin-top: var(--slmg-s3, 12px); }
.slmg-sheet-stage__gal { margin: var(--slmg-s3, 12px) 0 0; }
.slmg-gal .slmg-gal__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }   /* two classes: Divi's .et_pb_text ul (padding-bottom 1em) outranks one */
.slmg-gal__li { margin: 0; padding: 0; list-style: none; }
.slmg-gal__li::before { content: none; }
.slmg-gal__item { display: block; width: 72px; height: 72px; overflow: hidden; border: 1px solid var(--slmg-line-strong, #333); border-radius: var(--slmg-r, 2px); background: var(--slmg-black, #000); transition: border-color .16s; }
.slmg-gal__item:hover { border-color: var(--slmg-ink, #fff); }
.slmg-gal__item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slmg-gal__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slmg-galv__scrim { position: fixed; inset: 0; z-index: 99990; background: rgba(0, 0, 0, .92); }
.slmg-galv { position: fixed; inset: 0; z-index: 99991; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 64px 76px 84px; outline: none; }
.slmg-galv[hidden], .slmg-galv__scrim[hidden] { display: none; }
.slmg-galv__fig { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; margin: 0; }
.slmg-galv__img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; }
.slmg-galv__cap { max-width: 60ch; font: 500 12px/1.4 var(--slmg-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--slmg-dim, #bbb); text-align: center; }
.slmg-galv__count { color: var(--slmg-ink, #fff); }
.slmg-galv__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--slmg-line-strong, #333); border-radius: 50%; background: var(--slmg-ground, #0a0a0a); color: var(--slmg-ink, #fff); font: 400 30px/1 var(--slmg-display, sans-serif); cursor: pointer; }
.slmg-galv__btn:hover { border-color: var(--slmg-ink, #fff); }
.slmg-galv__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slmg-galv__close { top: 12px; right: 12px; }
.slmg-galv__prev, .slmg-galv__next { top: 50%; transform: translateY(-50%); }
.slmg-galv__prev { left: 14px; }
.slmg-galv__next { right: 14px; }
.slmg-galv.is-single .slmg-galv__prev, .slmg-galv.is-single .slmg-galv__next { display: none; }
@media (max-width: 900px) {
  .slmg-galv { padding: 68px 8px 140px; }
  .slmg-galv__prev, .slmg-galv__next { top: auto; bottom: 76px; transform: none; }
  .slmg-galv__prev { left: calc(50% - 64px); }
  .slmg-galv__next { right: calc(50% - 64px); }
}
/* on a phone or tablet (one column, up to 900 px as in stage.css) the small pictures sit UNDER the cover in one line, as on
   desktop (the operator, Pt.5, 2026-11-22: "place those thumbs below the large cover art in a line like it is on desktop"):
   44 px each (the phone's touch-target size), the line as wide as the cover, sliding sideways when there are more than fit.
   On a short phone (under 600 px wide) a cover with a gallery gives up the line's height (52 px) so the release's title
   and Play stay above the player bar (the operator's #1 and #77): 240 px at 390 x 664, full width from about 840 px tall.
   (Pt.4's version laid the line over the top of the cover; its position: relative on the art also revived stage.css's
   desktop sticky top and slid the cover 78 px over the title, fixed in Pt.5: no positioning here at all now.) */
@media (max-width: 900px) {
  .slmg-dir-stage .slmg-product .slmg-stage__gal .slmg-gal { margin-top: 8px; }
  .slmg-dir-stage .slmg-product .slmg-stage__gal .slmg-gal__list { flex-wrap: nowrap; gap: 6px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .slmg-dir-stage .slmg-product .slmg-stage__gal .slmg-gal__list::-webkit-scrollbar { display: none; }
  .slmg-dir-stage .slmg-product .slmg-stage__gal .slmg-gal__li { flex: none; }
  .slmg-dir-stage .slmg-product .slmg-stage__gal .slmg-gal__item { width: 44px; height: 44px; }
}
@media (max-width: 599px) {
  .slmg-dir-stage .slmg-product .slmg-stage__art:has(.slmg-gal) { width: min(100%, max(240px, calc(100svh - 438px))); }
}
