/* ==========================================================================
   Church of Rave: visual library
   ========================================================================== */

:root {
  --bg: #07050c;
  --bg-2: #0d0917;
  --panel: #120d1f;
  --panel-2: #1a1330;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --leading: rgba(242, 196, 109, 0.42);
  --leading-strong: rgba(242, 196, 109, 0.75);
  --text: #f1ecff;
  --muted: #a99fc4;
  --dim: #928ab0;
  --magenta: #ff2bd6;
  --cyan: #2ee6ff;
  --lime: #c8ff3c;
  --violet: #8a4dff;
  --gold: #f2c46d;
  --danger: #ff5a6e;

  --font-display: "Pirata One", "UnifrakturCook", Georgia, serif;
  --font-liturgy: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;

  --radius: 4px;
  --radius-sm: 3px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --glow-m: 0 0 12px rgba(255, 43, 214, 0.65), 0 0 42px rgba(255, 43, 214, 0.35);
  --lattice: repeating-linear-gradient(45deg, rgba(242, 196, 109, 0.05) 0 1px, transparent 1px 22px),
             repeating-linear-gradient(-45deg, rgba(242, 196, 109, 0.05) 0 1px, transparent 1px 22px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #fff; }
::selection { background: var(--magenta); color: #0a0410; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #000; padding: 8px 14px; border-radius: 3px; z-index: 200; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.08; font-weight: 400; }
.liturgy { font-family: var(--font-liturgy); text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.74rem; font-weight: 700; color: var(--gold); }
.eyebrow { font-family: var(--font-liturgy); text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.76rem; font-weight: 700; color: var(--gold); margin: 0 0 14px; }
.section-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.82em; padding: 1px 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); color: var(--text); word-break: break-word; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  font: 700 0.76rem/1 var(--font-liturgy);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--magenta); color: #0a0410; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 18px rgba(255, 43, 214, 0.4); }
.btn-primary:hover { color: #0a0410; background: #ff5ae0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 28px rgba(255, 43, 214, 0.7); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { color: #fff; border-color: var(--leading-strong); }
.btn-gold { background: var(--gold); color: #1b1206; }
.btn-gold:hover { background: #ffd585; color: #000; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.68rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.text-link { color: var(--text); border-bottom: 1px solid var(--leading-strong); padding: 3px 0; }
.text-link:hover { color: #fff; border-bottom-color: var(--gold); }
.icon-btn { width: 38px; height: 38px; border-radius: 3px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { color: #fff; border-color: var(--leading-strong); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 5, 12, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-size: 1.5rem; line-height: 1; flex: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.nav-search { flex: 1; max-width: 420px; position: relative; }
.nav-search input[type="search"] { width: 100%; min-height: 42px; padding: 8px 14px 8px 38px; font-size: 1rem; }
.nav-search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a:not(.btn) { display: block; padding: 8px 12px; border-radius: 3px; color: var(--muted); font-size: 1.02rem; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"]:not(.btn) { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-links .btn { margin-left: 10px; }
.pro-chip { font-family: var(--font-liturgy); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; color: var(--lime); border: 1px solid rgba(200, 255, 60, 0.45); padding: 3px 7px; border-radius: 2px; margin-left: 4px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 3px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s, background 0.2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.field { margin-bottom: 18px; }
input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: 500 1.05rem/1.4 var(--font-body);
  -webkit-appearance: none;
  appearance: none;
}
select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23a99fc4' stroke-width='2'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select option { background: #120d1f; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(255, 43, 214, 0.18); }
::placeholder { color: var(--dim); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.95rem; color: var(--muted); }
.checkbox input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--magenta); flex: none; }
.form-status { margin-top: 12px; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: var(--lime); }
.form-status.err { color: var(--danger); }
.form-note { font-size: 0.92rem; color: var(--dim); margin-top: 12px; }
.fineprint { font-size: 0.92rem; color: var(--dim); margin-top: 14px; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 28px; }
.section-head.center { display: block; text-align: center; }
.section-head p { margin: 0; color: var(--muted); }

/* ---------- library hero ---------- */
.lib-hero { padding: clamp(36px, 6vw, 72px) 0 24px; position: relative; isolation: isolate; }
.lib-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lattice); -webkit-mask: linear-gradient(180deg, #000, transparent 90%); mask: linear-gradient(180deg, #000, transparent 90%); }
.lib-hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.lib-hero h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 6.4vw, 5rem); line-height: 0.95; margin-bottom: 18px; }
.lib-hero .lede { margin: 0 0 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 1rem; }
.hero-facts strong { color: var(--text); font-weight: 600; }

/* ---------- live stage ---------- */
.stage-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--leading-strong); }
.stage-frame canvas { width: 100%; height: 100%; display: block; }
.stage-tag { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 2px; background: rgba(0, 0, 0, 0.7); border: 1px solid var(--leading); font-family: var(--font-liturgy); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
a.stage-tag:hover { color: #fff; border-color: var(--leading-strong); }

/* ---------- toolbar + filters ---------- */
.lib-toolbar { display: grid; gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.lib-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.filter-label { font-family: var(--font-liturgy); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin-right: 2px; }
.chip {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border-radius: 3px;
  min-height: 38px;
  padding: 6px 13px;
  font: 500 1rem/1.2 var(--font-body);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip:hover { color: #fff; border-color: var(--leading-strong); }
.chip[aria-pressed="true"], .chip.on { color: #fff; border-color: var(--magenta); background: rgba(255, 43, 214, 0.1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-sw { display: inline-flex; width: 28px; height: 10px; margin-right: 8px; border-radius: 1px; overflow: hidden; vertical-align: middle; }
.chip-sw i { flex: 1; }
.chip-pro { font-family: var(--font-liturgy); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em; color: #ff8ae9; margin-left: 4px; }
.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.toolbar-end select { min-height: 38px; width: auto; padding: 4px 34px 4px 12px; font-size: 1rem; }
.lib-count { color: var(--muted); font-size: 1rem; white-space: nowrap; }
.lib-empty { padding: 40px 0; color: var(--muted); text-align: center; }
.lib-empty button { margin-left: 8px; }

/* ---------- visual cards ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px 20px; }
.lib-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vcard { display: flex; flex-direction: column; min-width: 0; }
.vcard-media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line-strong); transition: border-color 0.2s; }
.vcard-media img, .vcard-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard:hover .vcard-media, .vcard-media:focus-visible { border-color: var(--leading-strong); }
.vcard-badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-family: var(--font-liturgy); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; }
.vcard-badge.free { color: #0c1100; background: var(--lime); }
.vcard-badge.pro { color: #0a0410; background: var(--magenta); }
.vcard-hint { position: absolute; right: 10px; bottom: 10px; z-index: 2; font-family: var(--font-liturgy); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; background: rgba(0, 0, 0, 0.7); color: var(--text); opacity: 0; transition: opacity 0.2s; }
.vcard:hover .vcard-hint, .vcard.live .vcard-hint { opacity: 1; }
.vcard-body { padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.vcard-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.vcard h3 { font-family: var(--font-display); font-size: 1.6rem; margin: 0; }
.vcard h3 a { color: var(--text); }
.vcard h3 a:hover { color: #fff; }
.vcard-swatch { display: inline-flex; width: 34px; height: 8px; border-radius: 1px; overflow: hidden; flex: none; }
.vcard-swatch i { flex: 1; }
.vcard p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.vcard-meta { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.92rem; color: var(--dim); }

/* ---------- sets ---------- */
.sets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.set-card { display: flex; flex-direction: column; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); transition: border-color 0.2s; }
.set-card:hover { color: var(--text); border-color: var(--leading-strong); }
.set-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; aspect-ratio: 16 / 7; border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.set-strip img { width: 100%; height: 100%; object-fit: cover; }
.set-card h3 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 4px; }
.set-card p { margin: 0 0 12px; color: var(--muted); font-size: 1rem; line-height: 1.45; flex: 1; }
.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.92rem; color: var(--dim); }
.set-foot .go { white-space: nowrap; font-family: var(--font-liturgy); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--magenta); }

/* ---------- uses ---------- */
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.use { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--bg-2); }
.use h3 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 12px; }
.use ol { margin: 0 0 18px; padding-left: 1.3em; color: var(--muted); }
.use li { margin-bottom: 6px; }
.use li strong { color: var(--text); font-weight: 600; }

/* ---------- pricing ---------- */
.compare { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.compare th, .compare td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--font-liturgy); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); border-bottom-color: var(--leading-strong); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 22%; }
.compare tbody th { font-weight: 500; color: var(--text); }
.yes { color: var(--lime); font-weight: 700; }
.no { color: var(--dim); }
.compare tfoot td { border-bottom: 0; padding-top: 22px; }
.price-big { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--text); }
.price-big small { display: block; font-family: var(--font-body); font-size: 0.95rem; color: var(--muted); margin-top: 6px; }
.pro-col { background: rgba(255, 43, 214, 0.05); }

/* ---------- detail page ---------- */
.crumbs { font-size: 0.98rem; color: var(--dim); margin: 26px 0 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: #fff; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.detail-controls { display: grid; gap: 12px; margin-top: 16px; }
.picker-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.picker-row .chips { margin: 0; }
.bpm-ctl { display: flex; align-items: center; gap: 14px; }
.bpm-ctl input[type="range"] { flex: 1; accent-color: var(--magenta); }
.bpm-ctl output { font-family: var(--font-liturgy); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em; min-width: 76px; }
.detail-side { position: sticky; top: 92px; }
.detail-side h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; margin: 8px 0 12px; }
.detail-side .lede { font-size: 1.1rem; margin: 0 0 22px; }
.detail-actions { display: grid; gap: 10px; margin-bottom: 8px; }
.detail-note { font-size: 0.95rem; color: var(--muted); margin: 6px 0 0; }
.specs { margin: 26px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; border-top: 1px solid var(--line); padding-top: 20px; }
.specs dt { font-family: var(--font-liturgy); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.specs dd { margin: 0; color: var(--muted); }
.badge { display: inline-block; font-family: var(--font-liturgy); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; }
.badge.free { color: #0c1100; background: var(--lime); }
.badge.pro { color: #0a0410; background: var(--magenta); }
.related { margin-top: clamp(48px, 7vw, 80px); }
.related h2 { font-family: var(--font-display); font-size: 2.2rem; margin-bottom: 20px; }

/* ---------- guides / prose ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 10px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 4.4rem); line-height: 0.95; margin-bottom: 14px; }
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: 92px; list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--leading); }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--muted); font-size: 1rem; }
.toc a:hover { color: #fff; }
.guide-section { padding: 10px 0 36px; }
.guide-section > h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 10px; }
.guide-section > p { color: var(--muted); max-width: 70ch; }
.qa-list { max-width: 820px; }
.qa { padding: 20px 0; border-top: 1px solid var(--leading); }
.qa:last-child { border-bottom: 1px solid var(--leading); }
.qa h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.18rem; margin: 0 0 6px; }
.qa p, .qa li { color: var(--muted); }
.qa p { margin: 0 0 8px; }
.qa p:last-child { margin-bottom: 0; }
.qa ol, .qa ul { margin: 6px 0 0; padding-left: 1.3em; }
.qa em { color: var(--text); font-style: normal; }
.note { border-left: 3px solid var(--danger); background: #1a0a12; padding: 12px 16px; color: var(--muted); max-width: 820px; margin: 16px 0; }
.note strong { color: #ffd0d6; }
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font-display); font-size: 2rem; margin-top: 1.5em; }
.prose p, .prose li { color: var(--muted); }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost h1 { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 6rem); line-height: 0.95; }
.lost .btn-row { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 36px; margin-top: 40px; background: var(--bg-2); }
.footer-simple { display: grid; gap: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: #fff; }
.footer-note { margin: 0; color: var(--dim); font-size: 0.92rem; }

/* ---------- modal + toast ---------- */
dialog.modal { width: min(500px, calc(100vw - 32px)); border: 0; padding: 0; border-radius: var(--radius); background: transparent; color: var(--text); }
dialog.modal::backdrop { background: rgba(4, 2, 8, 0.75); backdrop-filter: blur(6px); }
.modal-inner { position: relative; padding: 36px 28px 28px; border-radius: inherit; text-align: center; background: var(--panel); border: 1px solid var(--leading-strong); }
.modal-inner h3 { font-family: var(--font-display); font-size: 2.1rem; }
.modal-inner p { color: var(--muted); }
.modal-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 3px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; background: #1a1330; border: 1px solid var(--line-strong); color: var(--text); padding: 12px 20px; border-radius: 3px; font-size: 1rem; font-weight: 600; z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.25s, translate 0.25s; }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .sets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nav { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-search { display: none; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px var(--gutter) 22px;
    background: rgba(7, 5, 12, 0.98);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a:not(.btn) { padding: 13px 10px; font-size: 1.08rem; }
  .nav-links .btn { margin: 10px 0 0; }
  .lib-hero-grid, .detail-grid, .guide-layout { grid-template-columns: 1fr; }
  .detail-side, .toc { position: static; }
  .toc { display: none; }
  .uses { grid-template-columns: 1fr; }
  .lib-grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 961px) { .nav-search-mobile { display: none; } }
@media (max-width: 640px) {
  body { font-size: 18px; }
  .sets, .lib-grid.small { grid-template-columns: 1fr; }
  .toolbar-end { margin-left: 0; width: 100%; justify-content: space-between; }
  .picker-row { grid-template-columns: 1fr; gap: 6px; }
  .compare { font-size: 0.95rem; }
  .compare th, .compare td { padding: 10px 8px; }
  .btn { white-space: normal; text-align: center; line-height: 1.35; padding-block: 10px; }
}

/* ---------- made by SpaceCatz Studios ---------- */
.studio-strip { padding: 34px 0; border-top: 1px solid var(--line-strong, rgba(255, 255, 255, 0.12)); }
.studio { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.studio-text { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.studio-label { font-family: var(--font-liturgy, serif); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold, #f2c46d); }
.studio-name { font-size: 1.2rem; }
.studio-mail { color: var(--muted, #b9b0cc); overflow-wrap: anywhere; }
.studio-mail:hover { color: #fff; }
.studio-kofi { flex: none; }
.studio-privacy { flex-basis: 100%; color: var(--dim, #8a8199); font-size: 0.8rem; }
.studio-privacy:hover { color: var(--muted, #b9b0cc); }
@media (max-width: 700px) { .sets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sets { grid-template-columns: 1fr; } }
