/* Spectra DMA — Software Library */
:root {
  --library-bg: #101118;
  --library-panel: #171822;
  --library-line: #353541;
  --library-text: #f3f1f7;
  --library-muted: #b3b1c2;
  --library-lilac: #c1adf0;
  --library-gutter: clamp(18px, 4.2vw, 72px);
  --library-width: 1440px;
}
body { background: var(--library-bg) !important; color: var(--library-text); }
.sg-shell { max-width: none; border: 0; }
.library-width {
  width: 100%;
  max-width: var(--library-width);
  margin-inline: auto;
  padding-inline: var(--library-gutter);
}
.sg-header.ah-header {
  min-height: 64px;
  padding: 9px max(var(--library-gutter), calc((100% - var(--library-width)) / 2 + var(--library-gutter)));
  background: #101118;
  border-bottom: 1px solid var(--library-line);
}
.ah-header .sg-brand, .sg-footer .sg-brand {
  font: 750 21px/1 var(--sg-body);
  letter-spacing: -.065em;
  text-transform: none;
}
.sg-brand .sg-mark { width: 31px; height: 31px; color: var(--library-lilac); }
.sg-desktop-nav { gap: 26px; }
.sg-desktop-nav a, .sg-account, .sg-cart, .sg-menu-toggle { font: 600 13px/1.3 var(--sg-body); }
.sg-desktop-nav a[aria-current] { color: var(--library-lilac); }
.sg-nav-actions { gap: 18px; }
.sg-cart { min-height: 39px; border-color: #555264; border-radius: 5px; }
.sg-cart span { color: var(--library-lilac); }
.sg-menu-toggle { min-height: 44px; }

.library-cover { background: #c4b7e2; color: #211e31; isolation: isolate; }
.library-cover-inner { position: relative; padding-block: 25px 23px; }
.library-cover-copy { position: relative; z-index: 1; width: fit-content; max-width: 66%; }
.library-cover h1 {
  margin: 0;
  font: 650 clamp(43px, 5.1vw, 76px)/.99 var(--sg-body);
  letter-spacing: -.073em;
  color: #1d1b29;
}
.library-cover h1 em {
  font: italic 400 1.11em/.85 'Instrument Serif', Georgia, serif;
  letter-spacing: -.04em;
}
.library-cover-copy > p { margin: 12px 0 7px; font: 500 15px/1.45 var(--sg-body); color: #373246; }
.library-cover-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.library-cover-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  font: 650 13px/1.25 var(--sg-body);
  color: #2d263d;
}
.library-cover-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.library-cover-links a:focus-visible { outline-color: #33254b; }
.library-cover-links svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.library-cover-art {
  position: absolute;
  z-index: 2;
  right: var(--library-gutter);
  bottom: -7px;
  height: calc(100% + 7px);
  max-width: 44%;
  width: auto;
  pointer-events: none;
  overflow: visible;
}
.library-catalog { padding-block: 23px 45px; scroll-margin-top: 10px; }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.library-filters { display: flex; align-items: stretch; gap: 4px; }
.library-filters button {
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #cac8d5;
  font: 600 15px/1.2 var(--sg-body);
  white-space: nowrap;
}
.library-filters button[aria-pressed="true"] { color: #eee7ff; border-color: #685a81; background: #312d40; }
.library-filters button:hover { background: #272632; }
.library-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 285px);
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #4b4957;
  border-radius: 5px;
  background: var(--library-panel);
  color: var(--library-muted);
}
.library-search:focus-within { outline: 2px solid var(--library-lilac); outline-offset: 2px; }
.library-search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.library-search input { width: 100%; min-width: 0; padding: 9px 0; background: transparent; color: var(--library-text); font: 400 15px/1.4 var(--sg-body); }
.library-search input:focus-visible { outline: 0; }
.library-search input::placeholder { color: var(--library-muted); }
.library-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 41px;
  gap: 16px;
  margin-top: 4px;
  font: 500 12px/1.3 var(--sg-body);
  color: var(--library-muted);
}
.library-results label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; cursor: pointer; }
.library-results input { accent-color: var(--library-lilac); width: 14px; height: 14px; }
.library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 27px 20px; }
.library-grid > * { min-width: 0; }
.library-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border-bottom: 1px solid var(--library-line);
}
.library-image { position: relative; flex: 0 0 auto; overflow: hidden; background: #262735; border-radius: 5px; }
.library-image img { width: 100%; height: auto; display: block; }
.library-image-placeholder { aspect-ratio: 1920/1303; }
.library-image > svg { position: absolute; inset: 25%; width: 50%; height: 50%; fill: #8e82ad; }
.library-tile-body { flex: 1; display: flex; flex-direction: column; padding-block: 13px 12px; }
.library-tile h3 { margin: 0; color: var(--library-text); font: 650 clamp(17px, 1.45vw, 22px)/1.22 var(--sg-body); letter-spacing: -.035em; overflow-wrap: anywhere; }
.library-tile-info { margin-top: 5px; color: var(--library-muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.library-tile-info:empty { display: none; }
.library-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; font-size: 12px; color: var(--library-lilac); }
.library-tile-bottom { display: flex; align-items: end; justify-content: space-between; gap: 4px 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.library-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.library-price small { color: var(--library-muted); font: 450 12px/1.25 var(--sg-body); }
.library-price strong { color: #f3effb; font: 650 clamp(21px, 1.7vw, 27px)/1.2 var(--sg-body); letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.library-tile-link { display: inline-flex; align-items: center; gap: 7px; color: var(--library-lilac); font: 600 13px/1.5 var(--sg-body); }
.library-tile-link::after { position: absolute; inset: 0; content: ''; border-radius: 5px; }
.library-tile-link span { font-size: 16px; line-height: 1.2; }
.library-tile:focus-within { outline: 2px solid var(--library-lilac); outline-offset: 4px; border-radius: 5px; }
.library-tile-link:focus-visible { outline: none; }
.library-tile:hover h3, .library-tile:focus-within h3 { color: #d9c9ff; }
.library-tile:hover .library-tile-link, .library-tile:focus-within .library-tile-link { text-decoration: underline; text-underline-offset: 3px; }
.library-empty { padding: 45px 20px; border-block: 1px solid var(--library-line); text-align: center; }
.library-empty h2, .library-dialog h2 { font: 600 25px/1.2 var(--sg-body); letter-spacing: -.04em; }
.library-empty p { margin: 9px 0 15px; color: var(--library-muted); }
.library-empty button, .library-empty a, .library-return { display: inline-flex; align-items: center; min-height: 44px; color: var(--library-lilac); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.library-dialog { padding: 0; width: min(94vw, 1080px); max-height: 86dvh; background: var(--library-bg); color: var(--library-text); border: 1px solid var(--library-line); border-radius: 6px; }
.library-dialog::backdrop { background: #07080ed9; }
.library-dialog-inner { padding: clamp(16px, 3vw, 30px); }
.library-dialog-top { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 18px; }
.library-dialog-top button { min-height: 44px; color: var(--library-lilac); }
.library-help { border-block: 1px solid var(--library-line); background: #1a1924; }
.library-help-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 26px; }
.library-help h2 { font: 600 25px/1.2 var(--sg-body); letter-spacing: -.045em; }
.library-help p { margin-top: 4px; color: var(--library-muted); font-size: 14px; }
.library-help-links, .library-purchase-help { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 22px; }
.library-help-links > *, .library-purchase-help > * { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font: 600 14px/1.35 var(--sg-body); color: var(--library-lilac); }
.library-help-links > :hover, .library-purchase-help > :hover { text-decoration: underline; text-underline-offset: 3px; }
.sg-footer { padding-inline: max(var(--library-gutter), calc((100% - var(--library-width)) / 2 + var(--library-gutter))); background: #101118; }
.sg-footer-top { padding-block: 18px; }
.sg-footer-top > a:last-child, .sg-footer-bottom { font-family: var(--sg-body); font-size: 12px; line-height: 1.6; }
.sg-footer-bottom a { padding-block: 5px; }

.sg-page-product .cv-product-visual h1 { font-family: var(--sg-body); line-height: 1.12; letter-spacing: -.045em; }
.cv-product-visual .aspect-product-page-image { --product-page-image-aspect-ratio: 3/2; max-height: none; }
.cv-product-visual .splide__slide img { max-height: none; }
.cv-product-visual .aspect-product-page-image img { object-fit: contain !important; }
.cv-product-visual .library-single-image > .aspect-product-page-image { aspect-ratio: auto; max-height: none; }
.library-detail-image { display: block; width: 100%; height: auto; }
.library-gallery-toggle { display: none; }
.library-product-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin-top: 6px; color: var(--library-muted); font: 500 12px/1.5 var(--sg-body); }
.library-product-tags a { color: var(--library-lilac); text-decoration: underline; }
.cv-product-purchase { min-width: 0; }
.cv-purchase-heading { background: #24212e; }
.cv-purchase-heading a { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.cv-product-purchase .cv-variants { display: grid; grid-template-columns: 1fr; gap: 6px; }
.cv-product-purchase .cv-variant { position: relative; flex-direction: row; align-items: center; gap: 10px; min-height: 45px; padding: 9px 12px; border-radius: 4px; background: #171820; }
.cv-product-purchase .cv-variant::before { display: block; content: ''; width: 14px; height: 14px; flex: 0 0 auto; border: 1px solid #777180; border-radius: 50%; }
.cv-product-purchase .cv-variant[aria-pressed="true"] { background: #30283f; }
.cv-product-purchase .cv-variant[aria-pressed="true"]::before { border-color: var(--library-lilac); background: var(--library-lilac); box-shadow: inset 0 0 0 3px #30283f; }
.cv-product-purchase .cv-variant p.text-xs { font-size: 11px; }
.cv-product-purchase .cv-variant > img { width: 32px; height: 32px; }
.library-quantity { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 12px; }
.library-quantity > label { margin: 0; font-size: 14px; }
.library-quantity > .flex { border: 1px solid var(--library-line); border-radius: 4px; }
.library-quantity > :nth-child(n+3) { grid-column: 1 / -1; }
.library-quantity input[type="number"] { width: 48px; padding-inline: 2px; text-align: center; appearance: textfield; }
.library-quantity input::-webkit-inner-spin-button, .library-quantity input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.library-quantity button { width: 42px; }
.library-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.library-total > div { display: grid; gap: 2px; min-width: 0; }
.library-total strong { font: 600 15px/1.3 var(--sg-body); }
.library-total span { color: var(--library-muted); font: 450 13px/1.35 var(--sg-body); overflow-wrap: anywhere; }
.library-total-amount { text-align: right; }
.library-total-amount strong { font-size: 27px; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.library-review { height: 100%; }
.library-review p { line-height: 1.65; white-space: pre-line; }
.library-feedback-source { display: block; margin-bottom: 5px; color: var(--library-muted); font: 500 12px/1.4 var(--sg-body); }
.cv-product-purchase .cv-purchase-actions button { border-radius: 4px; }
.library-purchase-help { padding: 5px 15px; border: 1px solid var(--library-line); border-top: 0; }
.library-purchase-help > * { font-size: 13px; }
.library-cart-empty { display: grid; justify-items: center; gap: 10px; padding: 45px 18px; }
.library-cart-empty h2 { font: 600 24px/1.3 var(--sg-body); }
.library-cart-empty .library-return { padding: 10px 17px; border-radius: 4px; background: var(--library-lilac); color: #19151f; text-decoration: none; }
.library-cart-summary h2 { font: 600 19px/1.3 var(--sg-body); }
.library-cart-summary .library-return { font-size: 13px; }
.library-unit-note { font: 500 12px/1.35 var(--sg-body); color: var(--library-muted); }

@media (max-width: 1080px) {
  .library-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px 17px; }
}
@media (max-width: 760px) {
  .library-cover-art { right: 3%; max-width: 41%; }
  .library-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .library-filters { gap: 0; }
  .library-filters button { padding-inline: 10px; }
  .library-tools { gap: 12px; }
  .library-search { width: 240px; }
  .library-help-inner { align-items: start; flex-direction: column; gap: 8px; }
  .sg-page-product .cv-product-visual h1 { font-size: 27px !important; }
  .cv-product-visual .library-single-image { display: grid; grid-template-columns: minmax(0,1fr) 32%; align-items: center; border: 1px solid var(--library-line); background: var(--library-panel); }
  .library-single-image > div:first-child, .library-single-image > .aspect-product-page-image { border: 0; }
  .library-single-image > .aspect-product-page-image { margin: 7px 7px 7px 0; }
  .cv-product-visual .library-single-image .aspect-product-page-image { --product-page-image-aspect-ratio: 3/2; }
  .library-gallery-ready .library-multi-image { display: grid; grid-template-columns: minmax(0,1fr) 30%; align-items: center; border: 1px solid var(--library-line); background: var(--library-panel); }
  .library-gallery-ready .library-multi-image > div:first-child { border: 0; background: transparent; }
  .library-gallery-ready .library-gallery-toggle { display: grid; justify-items: center; gap: 4px; padding: 7px 7px 7px 0; color: var(--library-lilac); font: 600 12px/1.3 var(--sg-body); }
  .library-gallery-toggle img { width: 100%; height: auto; border-radius: 3px; }
  .library-gallery-ready .library-multi-image #product-gallery { grid-column: 1/-1; width: 100%; min-width: 0; }
  .library-gallery-ready:not(.gallery-expanded) .library-multi-image #product-gallery { display: none; }
}
@media (max-width: 620px) {
  .sg-header.ah-header { min-height: 57px; }
  .sg-nav-actions { gap: 13px; }
  .library-cover-inner { padding-block: 19px 12px; }
  .library-cover-copy { max-width: none; }
  .library-cover h1 { width: fit-content; font-size: clamp(37px, 8.8vw, 48px); }
  .library-cover-copy > p { margin: 9px 0 2px; max-width: 70%; font-size: 13px; line-height: 1.4; }
  .library-cover-links { gap: 0 17px; }
  .library-cover-links a { min-height: 36px; font-size: 12px; gap: 5px; }
  .library-cover-art { top: 4px; right: 0; bottom: auto; height: 95px; max-width: 32%; }
  .library-catalog { padding-block: 14px 32px; }
  .library-tools { flex-direction: column-reverse; align-items: stretch; gap: 7px; }
  .library-search { width: 100%; }
  .library-search input { font-size: 16px; }
  .library-filters { gap: 2px; justify-content: space-between; }
  .library-filters button { min-height: 44px; padding: 7px 10px; font-size: clamp(13px, 3.65vw, 15px); }
  .library-results { min-height: 36px; margin: 0; }
  .library-grid { gap: 20px 13px; }
  .library-tile-body { padding-block: 10px; }
  .library-tile h3 { font-size: clamp(16px, 4vw, 20px); }
  .library-tile-info { font-size: 12px; }
  .library-tile-bottom { align-items: start; flex-direction: column; gap: 7px; padding-top: 10px; }
  .library-tile-link { font-size: 13px; }
  .library-help h2 { font-size: 23px; }
  .library-purchase-help { gap: 1px 16px; }
}
@media (max-width: 359px) {
  :root { --library-gutter: 14px; }
  .library-filters button { padding-inline: 6px; }
  .library-cover-art { max-width: 28%; }
}