:root {
  --void: #07060c;
  --ink: #f7ffd4;
  --mute: #d8f07a;
  --gold: #ffe44a;
  --gold-dim: #c8ff3d;
  --violet: #c084ff;
  --frame: rgba(196, 154, 255, 0.55);
  --paper: #ffffff;
  --paper-ink: #000000;
  --danger: #c45a4a;
  --glass: rgba(10, 9, 16, 0.72);
  --rule: rgba(255, 228, 74, 0.45);
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Palatino, "Palatino Linotype", serif;
  --lyric: "Source Serif 4", "Iowan Old Style", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

button,
a {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(120, 70, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 110% 20%, rgba(255, 228, 74, 0.16), transparent 50%),
    radial-gradient(1px 1px at 12% 22%, #fff, transparent),
    radial-gradient(1px 1px at 78% 14%, #fff, transparent),
    radial-gradient(1px 1px at 44% 68%, #d7b15a, transparent),
    radial-gradient(1px 1px at 91% 81%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 61% 31%, #c4b0ff, transparent);
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

.chrome {
  position: sticky;
  top: 4.2rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(to bottom, rgba(7, 6, 12, 0.92), rgba(7, 6, 12, 0.55) 70%, transparent);
  backdrop-filter: blur(10px);
}

.chrome[hidden] {
  display: none;
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand .mark {
  font-size: 10px;
  letter-spacing: 0.38em;
  color: var(--gold);
  text-transform: uppercase;
}

.brand .now {
  font-family: var(--serif);
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chrome-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ghost {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

a.ghost {
  text-decoration: none;
  display: inline-block;
}

.ghost:hover,
.ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  outline: none;
}

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 8px 0 96px;
}

.page.page-cover {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.cover {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.cover-frame {
  width: min(520px, 88vw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cover-frame img {
  display: block;
  width: min(100%, 68vmin);
  height: auto;
  margin-inline: auto;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(196, 154, 255, 0.45),
    0 30px 80px rgba(0, 0, 0, 0.55);
}

.cover-meta {
  text-align: center;
  margin-top: 22px;
}

.cover-meta .kicker {
  letter-spacing: 0.42em;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
}

.cover-meta h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(42px, 8vw, 72px);
  margin: 8px 0 0;
  letter-spacing: 0.06em;
}

.cover-meta p {
  color: var(--mute);
  margin: 8px 0 0;
}

.cover-cta {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gold {
  appearance: none;
  border: 0;
  background: var(--gold);
  color: #000000;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.gold:hover {
  filter: brightness(1.08);
}

.matter,
.volume-plate,
.colophon {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 0 8px 40px;
}

.kicker {
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 11px;
}

h2.display {
  font-family: var(--serif);
  font-size: clamp(36px, 7vw, 62px);
  font-weight: 600;
  margin: 10px 0 18px;
  line-height: 0.95;
}

.matter p,
.colophon p,
.volume-plate p {
  color: var(--mute);
  line-height: 1.7;
  font-size: 16px;
}

.warn {
  border: 1px solid rgba(196, 90, 74, 0.45);
  background: rgba(80, 20, 18, 0.28);
  padding: 18px 18px 8px;
  border-radius: 12px;
}

.warn h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0c2bb;
}

.warn ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: #ead8d4;
}

.contents h2 {
  margin-bottom: 8px;
}

.vol-block {
  margin: 28px 0 8px;
}

.vol-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.vol-head h3 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0;
}

.vol-head span {
  color: var(--mute);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--frame);
}

.card .cap {
  margin-top: 8px;
}

.card .num {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.card .ttl {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.1;
}

.spread {
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  gap: 28px;
  align-items: start;
  padding-top: 12px;
}

.plate {
  position: sticky;
  top: 72px;
}

.plate img {
  width: 100%;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px var(--frame),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.lyrics {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 10px;
  padding: clamp(22px, 4vw, 42px);
  min-height: 70vh;
}

.lyrics header .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #000000;
}

.lyrics h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  margin: 10px 0 12px;
  font-weight: 600;
  line-height: 0.95;
}

.lyrics .sum {
  font-family: var(--sans);
  font-size: 14px;
  color: #000000;
  margin: 0 0 28px;
  line-height: 1.45;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-row {
  appearance: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  width: 100%;
}

.list-row:hover {
  border-color: var(--rule);
}

.list-row .n {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.list-row strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.list-row em {
  display: block;
  font-style: normal;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 2px 0 6px;
}

.list-row span span {
  display: block;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.45;
}

.essay h3 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 28px 0 10px;
}

.essay .pull {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.25;
}

.back-cover {
  min-height: calc(100dvh - 40px);
  display: grid;
  grid-template-columns: minmax(240px, 38%) 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 8px 80px;
}

.back-art img {
  width: 100%;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px var(--frame),
    0 24px 70px rgba(0, 0, 0, 0.5);
}

.blurb h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  margin: 8px 0 18px;
}

.blurb p {
  color: var(--mute);
  line-height: 1.7;
}

.blurb .lede {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
}

.blurb .close {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 20px;
}

.back-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

@media (max-width: 840px) {
  .back-cover {
    grid-template-columns: 1fr;
  }

  .back-art {
    width: min(360px, 100%);
    margin: 0 auto;
  }
}

.stanza {
  margin: 0 0 22px;
}

.stanza p {
  margin: 0;
  font-family: var(--lyric);
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.45;
}

.explicit {
  display: inline-block;
  margin-left: 8px;
  border: 1px solid currentColor;
  padding: 1px 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  vertical-align: middle;
}

.pager {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--glass);
  border: 1px solid var(--rule);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.pager[hidden] {
  display: none;
}

.pager button {
  min-width: 44px;
}

.hidden-label {
  color: var(--violet);
}

.volume-plate .count {
  font-family: var(--serif);
  font-size: 88px;
  line-height: 0.8;
  color: var(--gold);
  margin: 8px 0 0;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 3, 8, 0.72);
  display: grid;
  justify-items: end;
}

.drawer[hidden] {
  display: none;
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  overflow: auto;
  background: #100e18;
  border-left: 1px solid var(--rule);
  padding: 18px 18px 80px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.toc-list button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  text-align: left;
  padding: 8px 4px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
}

.toc-list img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.toc-list .ttl {
  font-family: var(--serif);
  font-size: 18px;
}

.toc-list .yr {
  color: var(--mute);
  font-size: 12px;
}

@media (max-width: 840px) {
  .spread {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .plate {
    position: static;
    width: min(420px, 100%);
    margin: 0 auto;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chrome .now {
    max-width: 42vw;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .lyrics {
    padding: 20px 16px 28px;
  }
}

@media print {
  .stars,
  .site-nav,
  .chrome,
  .pager,
  .drawer,
  .cover-cta,
  .ghost,
  .gold {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .page,
  .cover,
  .spread,
  .matter {
    width: auto;
    max-width: none;
  }

  .print-only {
    display: block;
  }

  .plate {
    position: static;
    break-after: avoid;
  }

  .lyrics {
    background: white;
    color: black;
    box-shadow: none;
    break-inside: avoid;
  }
}
