:root {
  color-scheme: dark;
  --base: #101017;
  --surface: #1c1c28;
  --line: #353544;
  --ink: #f8f6ff;
  --muted: #b6b4c7;
  --accent: #ba9bff;
  font: 100%/1.45 Inter, "Segoe UI", Arial, sans-serif;
  background: var(--base);
  color: var(--ink);
}
* { box-sizing: border-box }
body, h1, h2, p { margin: 0 }
main { width: 90%; max-width: 1480px; margin: 0 auto; padding: clamp(24px,4vw,60px) 0 52px }
.catalogue-controls, .heading, .details, .search { display: flex; align-items: center }
.catalogue-controls { justify-content: space-between; gap: 18px; margin-bottom: clamp(20px,2vw,30px) }
.heading { gap: 12px }
h1 { font: 750 clamp(2rem,3.6vw,3.6rem)/1.04 "Segoe UI", Arial, sans-serif; letter-spacing: -.06em }
.levels {
  width: 23px; height: 30px; flex-shrink: 0; margin-right: 2px; color: var(--accent);
  background: linear-gradient(currentColor 0 0) left center/5px 48%,
    linear-gradient(currentColor 0 0) center/5px 100%, linear-gradient(currentColor 0 0) right center/5px 68%;
  background-repeat: no-repeat;
}
.count { align-self: center; white-space: nowrap; color: #dbcaff; background: #2b243a; border: 1px solid #4c3b65;
  border-radius: 5px; padding: 3px 8px; font: 600 .8rem/1.3 Consolas, monospace }
.search { gap: 12px; background: #1a1a24; border: 1px solid #474656; border-radius: 8px; padding: 10px 15px; min-height: 44px }
.search:focus-within, :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.search input { color: inherit; background: transparent; border: 0; outline: none; min-width: 0; width: clamp(10rem,14vw,15rem); font: inherit }
.search input::placeholder { color: var(--muted) }
.glass { position: relative; width: 15px; height: 15px; border: 1.6px solid var(--muted); border-radius: 50%; flex: none }
.glass::after { content:""; position:absolute; bottom:-3px; right:-4px; width:6px; border-top:1.6px solid var(--muted); transform:rotate(45deg) }
.voices { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 26px 18px }
.voice { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 3px 9px #0002; overflow: hidden }
.voice:focus-within { border-color: var(--accent) }
.cover { position: relative; isolation: isolate; aspect-ratio: 1; overflow: hidden; background: #242432 }
.cover > img, .sleeve { display: block; width: 100%; height: 100%; object-fit: cover }
.voice:has(.listen:not([hidden])) { cursor:pointer }
.listen { position:absolute; inset:0; z-index:1; display:grid; place-items:center; width:100%; height:100%;
  border:0; padding:0; background:rgb(12 10 22 / 24%); color:white; opacity:0; transition:opacity .16s ease }
.voice:hover .listen, .listen:focus-visible, .listen.playing { opacity:1 }
.listen:focus-visible { outline-offset:-4px }
.listen i { display:grid; place-items:center; width:clamp(42px,4vw,60px); aspect-ratio:1; border-radius:50%;
  border:1px solid #e2d4ffb8; background:#231b34e6; box-shadow:0 3px 14px #0d091d44 }
.listen i::before { content:""; margin-left:3px; border-style:solid; border-width:8px 0 8px 13px; border-color:transparent transparent transparent currentColor }
.listen.playing i::before { border:0; margin:0; width:13px; height:13px; border-radius:2px; background:currentColor }
.sample-error { font-size:.875rem; padding:0 12px 12px; color:#ffcfdf }
@media(hover:none){ .listen:not(.playing) { opacity:1; background:transparent; place-items:end; padding:8px } .listen:not(.playing) i { width:34px } }
@media(prefers-reduced-motion:reduce){ .listen { transition:none } }
.sleeve {
  overflow: hidden; position: relative; isolation:isolate; color: var(--light);
  background-color: var(--ground);
  background-image: radial-gradient(ellipse at 50% 56%,transparent 10%,#12132030 100%),
    radial-gradient(circle at 1px 1px,color-mix(in srgb,var(--light) 22%,transparent) 1px,transparent 1.5px);
  background-size: auto, 10px 10px;
}
.tone-0 { --ground:#253b37; --light:#9fecc7; --mid:#68c7a1; --shade:#328371; --deep:#204f4b }
.tone-1 { --ground:#403048; --light:#ffcfdf; --mid:#ed9cb8; --shade:#b76193; --deep:#714969 }
.tone-2 { --ground:#493a30; --light:#ffe4a4; --mid:#edb96d; --shade:#b7794f; --deep:#745043 }
.tone-3 { --ground:#283a50; --light:#bcf4ff; --mid:#73cbe1; --shade:#4789b2; --deep:#365573 }
.tone-4 { --ground:#3b3150; --light:#e5d9ff; --mid:#b99af1; --shade:#9069c8; --deep:#5c497f }
.sleeve::before { content:""; position:absolute; inset: 10% 11% 7%; border-radius: 50%;
  background: radial-gradient(ellipse,color-mix(in srgb,var(--mid) 19%,transparent),transparent 69%); z-index:-1 }
.sleeve span { position:absolute; inset:0; display:grid; place-items:center; font:750 clamp(2.5rem,7vw,6rem)/1 "Segoe UI",sans-serif }
.sleeve canvas + span { inset:10px auto auto 12px; font:700 .78rem/1 Consolas,monospace; letter-spacing:.05em }
.sleeve canvas { position:absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated }
.details { flex: 1; padding: 14px 15px; justify-content: space-between; gap: 9px; border-top: 1px solid #ffffff0c }
.details h2 { font: 680 clamp(1.06rem,1.5vw,1.45rem)/1.2 "Segoe UI", Arial, sans-serif; letter-spacing: -.035em; overflow-wrap:anywhere }
.availability { display:inline-flex; align-items:center; gap:7px; margin-top:5px; color:var(--muted); font-size:.875rem }
.availability::before { content:""; width:7px; height:7px; border-radius:2px; background:#87dcaf }
.availability.off::before { background:transparent; border:1px solid var(--muted); box-sizing:border-box }
button { color:inherit; font:inherit; cursor:pointer }
.copy { display:grid; place-items:center; flex:none; width:40px; height:40px; background:#262632;
  color:#cdcadb; border:1px solid #434353; border-radius:8px }
.copy:hover, .copy.copied { background:#3c2f50; color:#e7d8ff; border-color:#a184ca }
.copy span { position:relative; border:1.6px solid; width:11px; height:13px; margin:3px 0 0 3px; border-radius:2px }
.copy span::before { content:""; position:absolute; inset:-4px 2px 2px -4px; border-top:1.6px solid; border-left:1.6px solid; border-radius:2px 0 0 }
.copy.copied span { width:13px; height:7px; border-width:0 0 2px 2px; transform:rotate(-45deg); margin:-3px 0 0 }
.copy.copied span::before { display:none }
.empty { padding:28px 0; color:var(--muted) }
.empty button { border:0; border-bottom:1px solid; color:var(--accent); background:transparent; padding:4px 0; margin-top:6px }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }
[hidden] { display:none !important }
@media(max-width:900px){ .voices { grid-template-columns:repeat(3,minmax(0,1fr)) } }
@media(max-width:650px){
  main { width:90.5%; padding-top:24px }
  .catalogue-controls { flex-wrap:wrap; gap:15px }
  .heading { gap:9px }
  .levels { width:18px; height:24px }
  .search, .search input { width:100% }
  .voices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px }
  .voice { border-radius:9px }
  .details { padding:10px; gap:4px }
  .copy { width:32px; height:36px }
  .availability { font-size:.8rem; gap:5px }
  .sleeve canvas + span { left:9px; top:8px }
}
