:root {
  --bg: #090e18;
  --elev: #141c2e;
  --elev-2: #1c2740;
  --line: rgba(247, 244, 238, 0.12);
  --text: #f7f4ee;
  --muted: rgba(247, 244, 238, 0.68);
  --faint: rgba(247, 244, 238, 0.42);
  --gold: #e4c27a;
  --gold-2: #f3e2b3;
  --blue: #7eb6d9;
  --scarlet: #c45c4a;
  --green: #8fd0aa;
  --sidebar: 248px;
  --player: 78px;
  --dock: 0px;
  --serif: "Cormorant Garamond", Palatino, "Palatino Linotype", serif;
  --display: "Uncial Antiqua", Cinzel, serif;
  --cinzel: Cinzel, "Times New Roman", serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 0% -10%, rgba(126, 182, 217, 0.16), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(228, 194, 122, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(var(--player) + var(--dock));
}
body.locked { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: rgba(228, 194, 122, 0.35); }

.shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: var(--player);
  width: var(--sidebar);
  padding: 18px 14px 12px;
  border-right: 1px solid var(--line);
  background: rgba(9, 14, 24, 0.96);
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-scroll { flex: 1; min-height: 0; overflow: auto; }
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px 18px;
}
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-mark svg { width: 36px; height: 36px; }
.brand-name {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.side-nav, .side-lists { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-lists a, .tabbar a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
}
.side-nav a svg, .side-lists a svg, .tabbar a svg { width: 20px; height: 20px; flex: none; }
.side-nav a.active, .side-lists a.active, .tabbar a.active,
.side-nav a:hover, .side-lists a:hover { background: rgba(243, 226, 179, 0.08); color: var(--text); }
.side-nav a.active, .side-lists a.active { color: var(--gold-2); }
.side-label {
  margin: 18px 10px 6px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.side-offer {
  width: calc(100% - 8px);
  margin: 16px 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(243, 226, 179, 0.16), rgba(228, 194, 122, 0.05));
  border: 1px solid rgba(228, 194, 122, 0.35);
  color: var(--gold-2);
}
.side-offer strong { font-family: var(--cinzel); }

.main { margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 28px;
  background: rgba(9, 14, 24, 0.78);
  backdrop-filter: blur(16px);
}
.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: rgba(247, 244, 238, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
}
.search svg { width: 18px; height: 18px; color: var(--faint); }
.search input {
  flex: 1;
  width: auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 11px 0;
  outline: none;
}
.top-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.top-actions button, .text-btn, .ghost, .gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}
.top-actions button svg { width: 18px; height: 18px; }
.price-pill, .gold {
  background: linear-gradient(180deg, #f3e2b3, #e4c27a);
  color: #1c1408;
  font-weight: 600;
}
.ghost, .top-actions button:not(.price-pill) {
  border: 1px solid rgba(243, 226, 179, 0.28);
}
#view { padding: 8px 28px 36px; }
.site-foot { padding: 28px 0 8px; color: var(--faint); font-size: 0.82rem; }

.kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
h1, h2, h3, .page-title { font-family: var(--cinzel); font-weight: 500; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; margin: 0 0 12px; }
h2 { font-size: 1.35rem; margin: 0; }
h3 { font-size: 0.98rem; margin: 10px 0 2px; font-family: var(--sans); font-weight: 560; letter-spacing: 0; }
.lede, .blurb, .about, .kjv {
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.45;
}
.lede { max-width: 38rem; margin: 0 0 18px; color: var(--muted); }
.quiet, .meta, .by, .t-sub, .ref { color: var(--muted); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.1rem, 6vw, 5.4rem);
  line-height: 0.92;
  max-width: 8ch;
}
.hero h1 span { display: block; }
.hero-art { width: min(100%, 380px); justify-self: end; }
.hero-art svg { width: 100%; height: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stats { margin: 14px 0 0; color: var(--faint); font-size: 0.85rem; letter-spacing: 0.04em; }
.wheel-spin { transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; }

.palette { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; padding: 0; margin: 8px 0 26px; }
.palette li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.82rem; }
.palette i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }

.shelf { margin: 8px 0 26px; }
.shelf-head, .split { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.page-head { display: block; }
.shelf-head a { color: var(--gold); font-size: 0.85rem; }
.shelf-row, .seal-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 2px 8px;
}
.shelf-row::-webkit-scrollbar, .sidebar::-webkit-scrollbar { height: 8px; width: 8px; }
.shelf-row::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb { background: rgba(228, 194, 122, 0.28); border-radius: 99px; }

.card { position: relative; width: 168px; flex: 0 0 auto; scroll-snap-align: start; }
.cover-wrap { position: relative; }
.cover { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #101828; }
.cover svg, .seal-orb svg, .solo svg, .duo svg { width: 100%; height: 100%; }
.cover-word {
  position: absolute;
  left: 8px;
  bottom: 7px;
  font-family: var(--cinzel);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(247, 244, 238, 0.86);
}
.card p, .video-card p { margin: 0; color: var(--muted); font-size: 0.78rem; }
.card-play, .play-badge, .play-main {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #f3e2b3, #e4c27a);
  color: #1c1408;
}
.card-play, .play-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 38px;
  height: 38px;
  opacity: 0;
  transform: translateY(4px);
  transition: 0.18s ease;
}
.card:hover .card-play, .card-play:focus-visible, .video-card:hover .play-badge { opacity: 1; transform: none; }
.card-play svg, .play-badge svg { width: 16px; height: 16px; margin-left: 2px; }

.seal-link, .angel-card, .video-card { color: inherit; }
.seal-link { width: 112px; flex: 0 0 auto; text-align: center; scroll-snap-align: start; font-size: 0.78rem; }
.seal-orb { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; margin-bottom: 8px; }

.niche-grid, .angel-grid, .scene-grid, .mix-grid {
  display: grid;
  gap: 14px;
}
.niche-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.angel-grid, .scene-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.niche-banner, .panel, .tongue-card, .offer-card, .angel-card, .video-card, .mix-card {
  background: rgba(20, 28, 46, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.niche-banner {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  min-height: 108px;
}
.niche-banner .seal-orb { width: 84px; height: 84px; margin: 0; }
.niche-banner h3 { margin: 0 0 4px; }
.niche-banner p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.ribbon {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.icon-btn, .row-actions { display: flex; align-items: center; }
.row-actions button, .transport button, .full-transport button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
}
.icon-btn svg, .row-actions button svg, .transport button svg, .full-transport button svg { width: 20px; height: 20px; }
.transport button.is-on, .row-actions button.is-on, .actions button.is-on { color: var(--gold-2); }
.play-main { width: 46px; height: 46px; }
.play-main svg { width: 22px; height: 22px; margin-left: 2px; }
.play-main.is-paused svg, .is-on.play-main svg { margin-left: 0; }

.page-head { margin: 8px 0 18px; }
.album-hero, .angel-hero {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}
.album-hero .cover { border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.actions, .hero-actions, .chips, .tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { margin: 14px 0; }
.actions button, .chips button, .tabs button, .list-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.actions button svg { width: 16px; height: 16px; }
.chips button.is-on, .tabs button.is-on, .list-btn.is-on { border-color: var(--gold); color: var(--gold-2); }

.tracks { display: flex; flex-direction: column; }
.track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  border-radius: 10px;
}
.track:hover, .track.is-current { background: rgba(247, 244, 238, 0.05); }
.track.is-current { background: rgba(228, 194, 122, 0.08); }
.track-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  text-align: left;
  padding: 8px;
}
.t-title, .now-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-sub, .now-sub { display: block; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hz, .dur { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.idx { display: grid; place-items: center; color: var(--faint); font-variant-numeric: tabular-nums; }
.eq { display: none; gap: 2px; height: 12px; align-items: flex-end; }
.eq i { width: 2px; background: var(--gold); display: block; height: 40%; animation: eq 0.85s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: 0.15s; }
.eq i:nth-child(3) { animation-delay: 0.28s; }
.track.is-playing .num { display: none; }
.track.is-playing .eq { display: flex; }

.passage, .tongue-card, .enoch, .offer-card, .panel { padding: 16px; }
.passage { margin-top: 8px; }
.orig {
  font-family: "Noto Serif Hebrew", "Noto Serif", serif;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.55;
  margin: 8px 0;
}
.orig.greek { font-family: "Noto Serif", "Noto Serif Hebrew", serif; }
.translit { font-family: var(--serif); font-style: italic; color: var(--gold-2); margin-top: 0; }
.kjv { margin: 8px 0; }
.tongues, .duo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.duo { grid-template-columns: repeat(2, minmax(180px, 280px)); }
.duo figure, .solo { margin: 0; }
.duo figcaption, .video-card p { color: var(--muted); }
.solo { max-width: 320px; }
.enoch { margin-top: 16px; border-style: dashed; border-color: rgba(228, 194, 122, 0.45); }
.enoch .line { font-family: var(--cinzel); font-size: 1.3rem; margin-bottom: 4px; }
.heaven {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 8px 0 18px;
}

.crumbs { color: var(--faint); font-size: 0.85rem; }
.crumbs a { color: var(--gold); }

.video-thumb { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; background: #101828; }
.video-card { display: block; }
.video-card h3 { margin: 10px 0 4px; }
.video-frame { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; margin: 12px 0; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.rename {
  font-family: var(--cinzel);
  font-size: 2rem;
  width: min(100%, 640px);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0;
}
.rename:focus { outline: none; border-bottom-color: var(--gold); }

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--dock);
  z-index: 45;
  height: var(--player);
  background: rgba(10, 16, 28, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.player { overflow: hidden; }
.player-row {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.now {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
}
.now-art { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex: none; background: #182033; }
.now-art svg { width: 100%; height: 100%; }
.now-meta { min-width: 0; }
.transport, .player-tools, .full-transport, .vol { display: flex; align-items: center; gap: 4px; }
.player-tools { justify-content: flex-end; }
#mini-viz { width: 112px; height: 36px; flex: none; justify-self: end; }
.vol input, .seek input, #full-seek {
  accent-color: var(--gold);
}
.vol input { width: 88px; }
.seek {
  position: absolute;
  left: 8px;
  right: 8px;
  top: -6px;
  height: 14px;
  display: flex;
  align-items: center;
}
.player { position: fixed; }
.seek input, #full-seek {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 99px;
  background: rgba(247, 244, 238, 0.16);
  outline: none;
}
.seek input::-webkit-slider-thumb, #full-seek::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-2);
}

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  width: 100%;
  max-width: 100vw;
  height: var(--dock);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12, 18, 32, 0.96);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.tabbar a {
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  min-height: 0;
  padding: 4px 2px;
  overflow: hidden;
}
.tabbar a span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.full {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: auto;
  background:
    radial-gradient(700px 420px at 50% 0%, rgba(228, 194, 122, 0.16), transparent 60%),
    var(--bg);
  padding: 18px 18px calc(var(--player) + var(--dock) + 24px);
}
.full.scene-waters { background: radial-gradient(700px 420px at 50% 0%, rgba(126, 182, 217, 0.2), #090e18 70%); }
.full.scene-garden { background: radial-gradient(700px 420px at 50% 0%, rgba(143, 208, 170, 0.16), #090e18 70%); }
.full.scene-wilderness { background: radial-gradient(700px 420px at 50% 0%, rgba(196, 92, 74, 0.18), #090e18 70%); }
.full-grid { display: grid; grid-template-columns: minmax(240px, 460px) minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1100px; margin: 0 auto; }
.full-art { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: rgba(0,0,0,.2); }
.full-art canvas { width: 100%; height: 100%; display: block; }
.full-transport { display: none; margin: 12px 0; }
.backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(5, 8, 14, 0.62); }
.sheet {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--player) + var(--dock) + 12px);
  transform: translateX(-50%);
  width: min(460px, calc(100% - 20px));
  max-height: min(72vh, 680px);
  overflow: auto;
  background: #161f33;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.sheet h3 { margin-top: 0; }
.sheet textarea, .sheet input[type="text"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9, 14, 24, 0.45);
  padding: 12px;
  margin: 8px 0;
}
.sheet textarea { min-height: 90px; resize: vertical; }
.comment { padding: 10px 0; border-top: 1px solid var(--line); }
.comment p { margin: 4px 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player) + var(--dock) + 18px);
  transform: translateX(-50%) translateY(12px);
  background: #f7f4ee;
  color: #1c1408;
  padding: 10px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 70;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.offer-card .price {
  font-family: var(--cinzel);
  font-size: 4rem;
  margin: 0;
  line-height: 1;
}
.offer-card ul { padding-left: 18px; }
.offer-card li { margin: 8px 0; font-family: var(--serif); font-size: 1.2rem; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes eq { from { height: 25%; } to { height: 100%; } }

@media (hover: none) {
  .card-play, .play-badge { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  :root { --dock: calc(62px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
  .topbar, #view { padding-left: 16px; padding-right: 16px; }
  .hero, .album-hero, .angel-hero, .full-grid, .heaven, .tongues { grid-template-columns: 1fr; }
  .album-hero, .angel-hero { align-items: start; }
  .album-hero .cover, .angel-hero .cover { width: min(100%, 200px); }
  .hero-art { max-width: 260px; margin: 0 auto; }
  .hero h1 { max-width: none; }
  .player-row { grid-template-columns: minmax(0, 1fr) auto; }
  .player-tools, .transport .opt { display: none; }
  .full-transport { display: flex; }
  #mini-viz { display: none; }
  .hz { display: none; }
  .niche-banner { grid-template-columns: 72px minmax(0, 1fr); }
  .niche-banner .icon-btn { display: none; }
}
@media (max-width: 640px) {
  .dur, .hide-sm { display: none; }
  .track { grid-template-columns: minmax(0, 1fr) auto; }
  .duo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-spin, .eq i { animation: none; }
  html { scroll-behavior: auto; }
}
