:root {
  --bg: #0b1721;
  --bg-deep: #050b11;
  --panel: rgba(16, 29, 41, 0.76);
  --panel-strong: rgba(13, 24, 35, 0.92);
  --paper: #f5efdf;
  --paper-strong: #fff9eb;
  --ink: #f4edd8;
  --ink-muted: #ccbfa5;
  --line: rgba(245, 239, 223, 0.12);
  --brass: #c59754;
  --sea: #7fa9ba;
  --silver: rgba(201, 212, 223, 0.32);
  --silver-soft: rgba(201, 212, 223, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(1220px, calc(100vw - 32px));
  --display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(197, 151, 84, 0.16), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(108, 139, 156, 0.14), transparent 24%),
    linear-gradient(180deg, #162836 0%, var(--bg) 42%, var(--bg-deep) 100%);
  font-family: "Manrope", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, black, transparent 92%);
  pointer-events: none;
}

.celestial-atlas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 15, 22, 0.16), rgba(7, 15, 22, 0.38) 32%, rgba(5, 11, 17, 0.78) 62%, rgba(5, 11, 17, 0.96)),
    radial-gradient(circle at 28% 24%, rgba(197, 151, 84, 0.08), transparent 28%),
    radial-gradient(circle at 78% 58%, rgba(127, 169, 186, 0.07), transparent 30%);
  background-position:
    0 0,
    28% 24%,
    78% 58%;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size:
    100% 100%,
    46rem 46rem,
    54rem 54rem;
}

body[data-page="home"] .celestial-atlas,
body[data-page="tune"] .celestial-atlas {
  position: fixed;
}

.celestial-atlas::before {
  position: absolute;
  left: 0;
  right: 0;
  content: "";
  background-image: url("./assets/celestial-globe-atlas.png");
  background-repeat: no-repeat;
  pointer-events: none;
  top: -4rem;
  height: min(78rem, 82vh + 20rem);
  opacity: 0.32;
  background-position: center top;
  background-size: cover;
  filter: saturate(0.92) contrast(1.01);
  mask-image: linear-gradient(180deg, black 0%, black 44%, rgba(0, 0, 0, 0.68) 62%, transparent 100%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  padding-bottom: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(6, 13, 19, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(197, 151, 84, 0.95), rgba(127, 169, 186, 0.55));
  color: #08111a;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.95rem;
}

.brand-copy small,
.site-nav a,
.eyebrow,
.hero-plaque span,
.card-index,
.record-kicker,
.variant-node span,
.record-heading .record-subtitle,
.meta-list dt {
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-copy small,
.site-nav a {
  color: var(--ink-muted);
  font-size: 0.76rem;
}

.site-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.site-nav a::before {
  position: absolute;
  inset: -10px;
  content: "";
  border-radius: inherit;
  background: radial-gradient(circle, rgba(197, 151, 84, 0.34) 0%, rgba(197, 151, 84, 0) 72%);
  opacity: 0;
  filter: blur(14px);
  pointer-events: none;
  transition: opacity 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--paper-strong);
  border-color: rgba(201, 212, 223, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(11, 25, 36, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.site-nav a:focus-visible {
  outline: 2px solid rgba(245, 239, 223, 0.55);
  outline-offset: 3px;
}

.site-nav a[aria-current="page"] {
  color: var(--paper-strong);
  border-color: rgba(197, 151, 84, 0.42);
  background:
    linear-gradient(135deg, rgba(197, 151, 84, 0.24), rgba(127, 169, 186, 0.06) 72%),
    rgba(15, 28, 40, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 235, 0.12),
    0 0 0 1px rgba(197, 151, 84, 0.08),
    0 16px 32px rgba(0, 0, 0, 0.26);
}

.site-nav a[aria-current="page"]::before {
  opacity: 1;
}

.site-nav a[aria-current="page"]:hover,
.site-nav a[aria-current="page"]:focus-visible {
  border-color: rgba(197, 151, 84, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 235, 0.14),
    0 0 0 1px rgba(197, 151, 84, 0.14),
    0 16px 34px rgba(0, 0, 0, 0.3);
}

.hero,
.browse,
.featured-section,
.record-layout,
.relationships,
.architecture,
.book-spotlight,
.book-hub {
  margin-top: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-visual,
.browse-card,
.record-main,
.record-sidebar,
.variant-node,
.architecture-card,
.source-book-card,
.source-book-visual {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-copy {
  padding: 40px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 34%),
    var(--panel);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--sea);
  font-size: 0.74rem;
}

h1,
h2,
h3,
.record-main h3,
.record-sidebar strong,
.variant-node strong {
  margin: 0;
  font-family: var(--display);
  line-height: 0.94;
  letter-spacing: 0.01em;
  font-weight: 600;
}

h1 {
  max-width: 11.5ch;
  font-size: clamp(3.8rem, 7vw, 6.4rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.8rem, 2.3vw, 2.5rem);
  font-weight: 600;
}

.hero-text,
.browse-card p,
.record-subtitle,
.playback-meta span,
.side-note p,
.variant-node p,
.architecture-card li,
.hero-note,
.book-item p,
.source-book-copy p {
  color: var(--ink-muted);
  line-height: 1.7;
  font-size: 1rem;
}

.hero-actions,
.architecture-footer,
.search-row,
.download-row,
.playback-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, #e9c489, #c58742);
  color: #0a1118;
}

.button-secondary {
  border-color: rgba(245, 239, 223, 0.24);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.search-panel {
  margin-top: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 235, 0.06);
  border: 1px solid rgba(245, 239, 223, 0.09);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--paper);
}

.search-row input {
  flex: 1;
  min-width: 240px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(245, 239, 223, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
}

.search-row input::placeholder {
  color: #9f9a8d;
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.search-filters span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 239, 223, 0.08);
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.search-filters a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 239, 223, 0.08);
  color: var(--ink-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.search-filters a:hover,
.search-filters a:focus-visible {
  color: var(--paper);
  border-color: rgba(245, 239, 223, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.hero-note {
  margin: 18px 0 0;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  min-height: 760px;
  --hero-shift: 0px;
  --hero-plaque-shift: 0px;
  background:
    linear-gradient(180deg, rgba(5, 11, 17, 0.02), rgba(5, 11, 17, 0.14)),
    rgba(9, 18, 27, 0.82);
}

.hero-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 20% 18%, rgba(233, 196, 137, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(4, 10, 16, 0.08), rgba(4, 10, 16, 0.42));
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  display: block;
  transform: scale(1.065) translate3d(0, var(--hero-shift), 0);
  transform-origin: center center;
  transition: transform 180ms ease-out;
  will-change: transform;
}

.hero-plaque {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: min(340px, calc(100% - 40px));
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 239, 223, 0.18);
  background: rgba(6, 13, 19, 0.74);
  backdrop-filter: blur(12px);
  transform: translate3d(0, var(--hero-plaque-shift), 0);
  transition: transform 180ms ease-out;
  will-change: transform;
}

.hero-plaque strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
  font-family: var(--display);
  font-weight: 600;
}

.hero-plaque p {
  margin-bottom: 0;
  color: var(--ink-muted);
  line-height: 1.7;
}

.hero-plaque a,
.browse-links a,
.book-item {
  color: var(--paper);
}

.section-grid,
.record-layout,
.relationships,
.architecture,
.book-hub {
  display: grid;
  gap: 24px;
}

.section-intro {
  max-width: 780px;
}

.section-intro.narrow {
  max-width: 660px;
}

.source-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.source-book-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
  grid-template-areas:
    "visual copy"
    "meta meta";
  gap: 18px 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
  align-items: stretch;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.source-book-card:hover,
.source-book-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(245, 239, 223, 0.2);
}

.source-book-card-live {
  background:
    radial-gradient(circle at 14% 18%, rgba(197, 151, 84, 0.15), transparent 26%),
    linear-gradient(135deg, rgba(127, 169, 186, 0.08), transparent 44%),
    rgba(12, 22, 32, 0.9);
}

.source-book-card-upnext {
  background:
    radial-gradient(circle at 16% 18%, rgba(173, 122, 140, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(127, 169, 186, 0.08), transparent 46%),
    rgba(12, 22, 32, 0.9);
}

.source-book-visual {
  grid-area: visual;
  display: grid;
  align-items: center;
  padding: 18px;
  border-radius: calc(var(--radius-lg) + 2px);
  background:
    radial-gradient(circle at 26% 16%, rgba(233, 196, 137, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(5, 11, 17, 0.16)),
    rgba(7, 14, 21, 0.9);
}

.source-book-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34);
}

.book-card-meta {
  grid-area: meta;
  display: grid;
  gap: 12px;
  align-self: stretch;
  margin: 0;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgba(201, 169, 117, 0.24);
  background:
    linear-gradient(180deg, rgba(231, 218, 189, 0.1), rgba(113, 87, 49, 0.06)),
    rgba(20, 28, 36, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 244, 220, 0.08);
}

.book-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  row-gap: 4px;
}

.book-card-meta dt,
.book-card-meta dd {
  margin: 0;
  font-family: var(--display);
  font-size: 0.98rem;
  line-height: 1.2;
}

.book-card-meta dt {
  order: 1;
  flex: 0 0 auto;
  color: rgba(241, 230, 205, 0.92);
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}

.book-card-meta-row::before {
  content: "";
  order: 2;
  flex: 1 1 2rem;
  height: 1px;
  margin-top: 0.18em;
  background-image: radial-gradient(circle, rgba(216, 191, 143, 0.72) 0.7px, transparent 0.9px);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  background-position: left center;
}

.book-card-meta dd {
  order: 3;
  flex: 0 0 auto;
  color: var(--paper);
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.book-card-meta-row.is-wrapped dd {
  flex-basis: 100%;
  margin-left: 0;
  text-align: left;
  white-space: normal;
}

.source-book-copy {
  grid-area: copy;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 20px;
  align-content: start;
}

.source-book-heading {
  display: grid;
  gap: 0;
}

.book-actions {
  margin-top: 2px;
}

.book-open {
  min-width: 9rem;
  justify-content: center;
}

.book-links {
  margin-top: 0;
}

.browse-grid,
.architecture-grid,
.featured-grid,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.browse-card,
.architecture-card,
.featured-card,
.catalog-card,
.record-main,
.record-sidebar {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.browse-card,
.record-main,
.record-sidebar,
.architecture-card,
.featured-card,
.catalog-card,
.variant-node,
.variant-map {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 36%);
}

.accent-ember {
  background:
    linear-gradient(180deg, rgba(197, 151, 84, 0.12), transparent 60%),
    var(--panel-strong);
}

.accent-sea {
  background:
    linear-gradient(180deg, rgba(127, 169, 186, 0.14), transparent 60%),
    var(--panel-strong);
}

.accent-fog {
  background:
    linear-gradient(180deg, rgba(245, 239, 223, 0.08), transparent 60%),
    var(--panel-strong);
}

.browse-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 18px;
}

.browse-links a {
  text-decoration: none;
  font-weight: 700;
}

.browse-links a:hover,
.browse-links a:focus-visible,
.hero-plaque a:hover,
.hero-plaque a:focus-visible,
.book-item:hover,
.book-item:focus-visible {
  color: var(--brass);
}

.record-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.record-main,
.record-sidebar {
  background: rgba(12, 22, 32, 0.9);
}

.record-heading {
  display: grid;
  gap: 12px;
}

.record-kicker {
  color: var(--sea);
  font-size: 0.74rem;
}

.notation-panel {
  margin-top: 24px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--paper);
  color: #18222d;
}

.staff-preview {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 10px 0 24px;
}

.clef {
  position: absolute;
  left: 8px;
  top: -18px;
  font-size: 2rem;
}

.staff-line {
  display: block;
  height: 1px;
  background: rgba(24, 34, 45, 0.4);
}

.play-button {
  min-width: 72px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #e9c489, #c58742);
  color: #0a1118;
  font-weight: 800;
  cursor: pointer;
}

.playback-meta {
  display: grid;
  gap: 4px;
}

.code-block {
  margin-top: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(245, 239, 223, 0.09);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
}

.code-header button {
  border: 0;
  background: transparent;
  color: var(--brass);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.18);
  color: var(--paper);
  font: 0.9rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.download-row {
  margin-top: 18px;
}

.download-row a {
  color: var(--brass);
  text-decoration: none;
  font-weight: 700;
}

.meta-list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.meta-list div {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(245, 239, 223, 0.08);
}

.meta-list dt {
  color: var(--sea);
  font-size: 0.72rem;
}

.meta-list dd {
  margin: 0;
  color: var(--paper);
  font-size: 1rem;
}

.side-note {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 249, 235, 0.05);
  border: 1px solid rgba(245, 239, 223, 0.08);
}

.variant-map {
  padding: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(10, 19, 28, 0.72);
  position: relative;
  overflow: hidden;
}

.variant-map::before {
  position: absolute;
  inset: -18% auto auto 56%;
  width: 420px;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  opacity: 0.17;
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(201, 212, 223, 0.05) 24px 25px, transparent 25px 48px),
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(201, 212, 223, 0.045) 30px 31px, transparent 31px 60px),
    linear-gradient(32deg, transparent 0 54.4%, rgba(201, 212, 223, 0.06) 54.55%, transparent 54.7%),
    linear-gradient(112deg, transparent 0 36.4%, rgba(201, 212, 223, 0.05) 36.55%, transparent 36.7%);
  mask-image: radial-gradient(circle at 50% 50%, black 0 58%, transparent 82%);
  transform: rotate(-8deg);
}

.variant-node {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
}

.variant-node span {
  display: block;
  margin-bottom: 8px;
  color: var(--sea);
  font-size: 0.72rem;
}

.variant-line {
  width: 2px;
  height: 52px;
  margin: 18px auto;
  background: linear-gradient(180deg, rgba(127, 169, 186, 0.6), rgba(245, 239, 223, 0.06));
}

.variant-children {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.architecture-card ul {
  padding-left: 18px;
  margin: 16px 0 0;
}

.architecture-card li + li {
  margin-top: 10px;
}

.architecture-card code {
  color: var(--paper);
  font: 0.92rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.architecture-footer {
  justify-content: flex-start;
}

.book-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.book-item {
  display: grid;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 36%),
    rgba(12, 22, 32, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.book-item:hover,
.book-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(245, 239, 223, 0.2);
}

.book-item strong {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 0.98;
}

.book-meta {
  margin: 0;
  color: var(--sea);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.featured-card,
.catalog-card,
.tune-stage-main,
.source-card,
.lyrics-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.catalog-kicker {
  margin: 0 0 12px;
  color: var(--sea);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.catalog-alt,
.catalog-preview,
.featured-card p,
.catalog-empty,
.detail-subtitle,
.lyrics-list li,
.download-link {
  color: var(--ink-muted);
  line-height: 1.7;
}

.featured-card h3,
.catalog-card h3,
.lyrics-card h3 {
  margin-bottom: 12px;
}

.featured-card .button,
.catalog-card .button {
  margin-top: 18px;
}

.catalog-page,
.tune-page {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.tune-page {
  position: relative;
  isolation: isolate;
  --tune-key-wheel-anchor-size: clamp(7.18rem, 9.8vw, 8.26rem);
}

.tune-page::before {
  position: fixed;
  inset: 0;
  content: "";
  background: rgba(6, 11, 18, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  z-index: 35;
}

.catalog-hero {
  display: grid;
  gap: 20px;
}

.search-panel-wide {
  max-width: 760px;
}

.catalog-empty {
  margin: 0;
}

.tune-stage {
  display: grid;
  gap: 20px;
}

.tune-titlebar {
  display: grid;
  gap: 10px;
}

.tune-titlebar h1 {
  max-width: none;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.tune-citation {
  margin: 0;
  color: var(--sea);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tune-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.tune-stage-main,
.source-card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.tune-stage-main,
.source-card {
  background: rgba(12, 22, 32, 0.9);
}

.tune-stage-main {
  position: relative;
  display: grid;
  gap: 20px;
  overflow: visible;
}

.tune-stage-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.tune-abc-shell {
  position: relative;
  z-index: 1;
}

.tune-key-wheel,
.key-wheel-overlay {
  --key-wheel-size: min(25.5rem, calc(100vw - 48px), calc(100dvh - 120px));
  --key-wheel-anchor-size: var(--tune-key-wheel-anchor-size);
  --key-wheel-ink: #0d2236;
  --key-wheel-ink-muted: rgba(12, 29, 46, 0.66);
  --key-wheel-glass-border: rgba(248, 252, 255, 0.28);
  --key-wheel-glass-fill: rgba(226, 238, 250, 0.14);
  --key-wheel-capstan-fill: linear-gradient(
    180deg,
    rgb(255, 249, 235),
    rgb(245, 239, 223) 54%,
    rgb(223, 211, 187) 100%
  );
  --key-wheel-ring-major-radius: calc(var(--key-wheel-size) * 0.49);
  --key-wheel-ring-inner-radius: calc(var(--key-wheel-size) * 0.364);
  --key-wheel-selected-radius: calc(var(--key-wheel-size) * 0.665);
  --key-wheel-capstan-wheel-inset: 20%;
  --key-wheel-capstan-wheel-compact-scale: 1.18;
  --key-wheel-capstan-arm-slot-width: 11.2%;
  --key-wheel-capstan-arm-slot-length: 50%;
  --key-wheel-capstan-arm-retract: 62%;
  --key-wheel-motion-enter: cubic-bezier(0.18, 0.88, 0.16, 1);
  --key-wheel-motion-exit: cubic-bezier(0.55, 0.02, 0.72, 0.3);
  --key-wheel-menu-scale: 0.22;
  --key-wheel-origin-offset-x: 0px;
  --key-wheel-origin-offset-y: 0px;
  --key-wheel-open-center-x: 50vw;
  --key-wheel-open-center-y: 50vh;
}

.tune-key-wheel {
  position: absolute;
  top: var(--key-wheel-anchor-y, 0);
  left: var(--key-wheel-anchor-x, 0);
  transform: translate(-50%, -50%);
  z-index: 12;
  width: var(--key-wheel-anchor-size);
  height: var(--key-wheel-anchor-size);
  pointer-events: auto;
}

.key-wheel-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: visible;
}

.tune-titlebar,
.tune-stage-main > :not(.tune-key-wheel),
.tune-stage-side > *,
.metadata-section {
  transition:
    filter 260ms ease,
    opacity 260ms ease,
    transform 260ms ease;
}

body.key-wheel-focus-active .tune-page::before {
  opacity: 1;
}

body.key-wheel-focus-active .tune-titlebar,
body.key-wheel-focus-active .tune-stage-main > :not(.tune-key-wheel),
body.key-wheel-focus-active .tune-stage-side > :not(.tune-key-wheel),
body.key-wheel-focus-active .metadata-section {
  filter: blur(8px);
  opacity: 0.2;
  transform: scale(0.982);
  pointer-events: none;
  user-select: none;
}

body.key-wheel-focus-active .tune-key-wheel {
  z-index: 120;
}

body.key-wheel-focus-active .key-wheel-toggle {
  opacity: 0;
  transform: scale(0.84);
  pointer-events: none;
}

body.key-wheel-focus-active .key-wheel-overlay,
body.key-wheel-focus-active .key-wheel-menu,
body.key-wheel-focus-active .key-wheel-mode-toggle {
  filter: none !important;
  opacity: 1 !important;
}

.key-wheel-shell.is-disabled {
  opacity: 0.68;
}

.key-wheel-overlay {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 260ms ease,
    visibility 0s linear 260ms;
  z-index: 108;
}

.key-wheel-overlay::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 26% 24%, rgba(144, 179, 208, 0.18), transparent 24%),
    radial-gradient(circle at 72% 70%, rgba(207, 224, 241, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(2, 9, 19, 0.2), rgba(2, 9, 19, 0.32));
}

.key-wheel-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 260ms ease;
}

.key-wheel-menu {
  position: fixed;
  top: var(--key-wheel-open-center-y);
  left: var(--key-wheel-open-center-x);
  width: var(--key-wheel-size);
  height: var(--key-wheel-size);
  opacity: 0;
  pointer-events: none;
  transform: translate(
      calc(-50% + var(--key-wheel-origin-offset-x)),
      calc(-50% + var(--key-wheel-origin-offset-y))
    )
    scale(var(--key-wheel-menu-scale));
  transition:
    transform 640ms var(--key-wheel-motion-enter),
    opacity 220ms ease;
  will-change: transform, opacity;
  z-index: 1;
}

.key-wheel-overlay.is-open .key-wheel-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.key-wheel-surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  isolation: isolate;
}

.key-wheel-liquid-glass {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.36), transparent 24%),
    radial-gradient(circle at 66% 74%, rgba(213, 229, 244, 0.18), transparent 26%),
    linear-gradient(160deg, rgba(245, 250, 255, 0.2), rgba(197, 214, 231, 0.08));
  border: 1px solid var(--key-wheel-glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -24px 48px rgba(11, 27, 43, 0.08),
    0 22px 54px rgba(1, 10, 21, 0.28),
    0 0 0 1px rgba(202, 223, 242, 0.08);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  opacity: 0;
  transform: scale(0.18);
  z-index: 3;
  transition:
    transform 620ms var(--key-wheel-motion-enter),
    opacity 320ms ease;
}

.key-wheel-liquid-glass::before,
.key-wheel-liquid-glass::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.key-wheel-liquid-glass::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 44%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(255, 255, 255, 0.12) 100%);
}

.key-wheel-liquid-glass::after {
  inset: 3.5%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.key-wheel-overlay.is-open .key-wheel-liquid-glass {
  opacity: 1;
  transform: scale(1);
}

.key-wheel-ring-label {
  display: none;
}

.key-wheel-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
}

.key-wheel-option {
  --key-wheel-option-scale: 0.74;
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(246, 250, 255, 0.32);
  border-radius: 999px;
  background: rgba(244, 249, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 12px 26px rgba(3, 14, 27, 0.16);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  color: var(--key-wheel-ink);
  font-family: "Manrope", sans-serif;
  font-variant-ligatures: none;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--radius)))
    rotate(calc(-1 * var(--angle))) scale(var(--key-wheel-option-scale));
  transition:
    transform 280ms var(--key-wheel-motion-enter),
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    opacity 220ms ease;
}

.key-wheel-label {
  --key-wheel-label-keyline-glyphs: 2;
  --key-wheel-label-mode-glyphs: 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  letter-spacing: 0;
}

.key-wheel-label.is-stacked {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  gap: 0.12em;
  white-space: normal;
  text-align: center;
}

.key-wheel-label-keyline {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
}

.key-wheel-label-mode {
  display: block;
  max-width: 100%;
  font-family: "Manrope", sans-serif;
  font-size: 0.42em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

.key-wheel-label-accidental {
  margin-left: -0.08em;
}

.key-wheel-overlay.is-open .key-wheel-option {
  --key-wheel-option-scale: 1;
  opacity: 1;
  pointer-events: auto;
}

.key-wheel-ring-major .key-wheel-option {
  width: 3rem;
  height: 3rem;
}

.key-wheel-ring-inner .key-wheel-option {
  width: 2.55rem;
  height: 2.55rem;
  font-size: 0.72rem;
}

.key-wheel-option:hover,
.key-wheel-option:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(249, 252, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 16px 28px rgba(2, 10, 21, 0.24);
  color: #07192b;
}

.key-wheel-option.is-source:not(.is-active) {
  border-color: rgba(165, 213, 244, 0.8);
  background: rgba(224, 242, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 14px 24px rgba(15, 41, 66, 0.2);
}

.key-wheel-option.is-active {
  background: linear-gradient(180deg, rgba(18, 39, 59, 0.96), rgba(4, 16, 29, 0.98));
  border-color: rgba(246, 251, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 30px rgba(1, 9, 18, 0.34);
  color: #f5f9fd;
}

.key-wheel-option:disabled {
  opacity: 0.34;
  cursor: default;
  box-shadow: none;
  filter: saturate(0.6);
}

.key-wheel-capstan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transform: rotate(-212deg) scale(0.82);
  transition: transform 820ms var(--key-wheel-motion-enter);
}

.key-wheel-overlay.is-open .key-wheel-capstan {
  transform: rotate(0deg) scale(1);
}

.key-wheel-capstan-rig,
.key-wheel-capstan-icon,
.key-wheel-toggle-capstan {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.key-wheel-capstan-icon,
.key-wheel-toggle-capstan {
  filter:
    drop-shadow(0 22px 32px rgba(1, 9, 18, 0.22))
    drop-shadow(0 0 1px rgba(3, 12, 22, 0.78))
    drop-shadow(0 0 18px rgba(255, 249, 235, 0.08));
}

.key-wheel-overlay.is-open .key-wheel-capstan-icon {
  opacity: 0.82;
  filter:
    brightness(0.82)
    saturate(0.78)
    drop-shadow(0 18px 26px rgba(1, 9, 18, 0.16))
    drop-shadow(0 0 1px rgba(3, 12, 22, 0.58));
}

.key-wheel-capstan-slot {
  --capstan-angle: 0deg;
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: var(--key-wheel-capstan-arm-slot-width);
  height: var(--key-wheel-capstan-arm-slot-length);
  overflow: hidden;
  transform: translateX(-50%) rotate(var(--capstan-angle));
  transform-origin: 50% 100%;
}

.key-wheel-overlay.is-open .key-wheel-capstan-icon .key-wheel-capstan-slot {
  transform: translateX(-50%) rotate(var(--capstan-angle)) translateY(-30%);
}

.key-wheel-capstan-slot.is-n {
  --capstan-angle: 0deg;
}

.key-wheel-capstan-slot.is-ne {
  --capstan-angle: 45deg;
}

.key-wheel-capstan-slot.is-e {
  --capstan-angle: 90deg;
}

.key-wheel-capstan-slot.is-se {
  --capstan-angle: 135deg;
}

.key-wheel-capstan-slot.is-s {
  --capstan-angle: 180deg;
}

.key-wheel-capstan-slot.is-sw {
  --capstan-angle: 225deg;
}

.key-wheel-capstan-slot.is-w {
  --capstan-angle: 270deg;
}

.key-wheel-capstan-slot.is-nw {
  --capstan-angle: 315deg;
}

.key-wheel-capstan-arm,
.key-wheel-capstan-wheel {
  position: absolute;
  background: var(--key-wheel-capstan-fill);
}

.key-wheel-capstan-arm {
  inset: 0;
  -webkit-mask: url("/assets/capstan-arm.svg?v=2026032105") center / 100% 100% no-repeat;
  mask: url("/assets/capstan-arm.svg?v=2026032105") center / 100% 100% no-repeat;
  transform: translateY(var(--key-wheel-capstan-arm-retract));
  transform-origin: 50% 100%;
  transition: transform 820ms var(--key-wheel-motion-enter);
}

.key-wheel-capstan-wheel {
  inset: var(--key-wheel-capstan-wheel-inset);
  position: absolute;
  -webkit-mask: url("/assets/capstan-wheel.svg?v=2026032107") center / contain no-repeat;
  mask: url("/assets/capstan-wheel.svg?v=2026032107") center / contain no-repeat;
  transform: scale(var(--key-wheel-capstan-wheel-compact-scale));
  transition: transform 820ms var(--key-wheel-motion-enter);
}

.key-wheel-overlay.is-open .key-wheel-capstan-icon .key-wheel-capstan-arm {
  transform: translateY(0);
}

.key-wheel-overlay.is-open .key-wheel-capstan-icon .key-wheel-capstan-wheel {
  transform: scale(1);
}

.key-wheel-mode-toggle {
  position: absolute;
  inset: 50% auto auto 50%;
  width: calc(var(--key-wheel-size) * 0.24);
  min-height: calc(var(--key-wheel-size) * 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  padding: 0.32rem 0.4rem;
  border: 0;
  transform: translate(-50%, -50%);
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
  color: var(--key-wheel-ink);
  cursor: pointer;
  pointer-events: auto;
  z-index: 7;
  opacity: 0;
  transition:
    transform 260ms var(--key-wheel-motion-enter),
    color 180ms ease,
    opacity 220ms ease;
}

.key-wheel-overlay.is-open .key-wheel-mode-toggle {
  opacity: 1;
}

.key-wheel-mode-toggle:hover,
.key-wheel-mode-toggle:focus-visible {
  color: #07192b;
}

.key-wheel-mode-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.key-wheel-mode-toggle-key {
  display: block;
  font-family: "Manrope", sans-serif;
  font-variant-ligatures: none;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--key-wheel-ink-muted);
}

.key-wheel-mode-toggle-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: none;
  min-height: 1.45rem;
  padding: 0.3rem 0.72rem;
  box-sizing: border-box;
  border: 1px solid rgba(241, 247, 255, 0.44);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.58), rgba(223, 234, 247, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 10px 20px rgba(4, 14, 28, 0.14);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  color: #0b2236;
  white-space: nowrap;
  transition:
    transform 220ms var(--key-wheel-motion-enter),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.key-wheel-selected-key {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) translateY(calc(-1 * var(--key-wheel-selected-radius))) scale(0.82);
  z-index: 7;
  transition:
    transform 320ms var(--key-wheel-motion-enter),
    opacity 220ms ease;
}

.key-wheel-selected-key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.65rem;
  min-height: 2.7rem;
  padding: 0.4rem 1rem 0.46rem;
  border: 1px solid rgba(246, 251, 255, 0.48);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(18, 39, 59, 0.96), rgba(4, 16, 29, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 30px rgba(1, 9, 18, 0.32);
  color: #f5f9fd;
  font-family: var(--display);
  font-size: clamp(1.18rem, 1.35vw, 1.34rem);
  font-variant-ligatures: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  text-wrap: balance;
}

.key-wheel-selected-key-badge .key-wheel-label.is-stacked {
  gap: 0.18em;
}

.key-wheel-selected-key-badge .key-wheel-label-mode {
  font-size: 0.64em;
  letter-spacing: 0.06em;
  line-height: 0.98;
}

.key-wheel-overlay.is-open .key-wheel-selected-key {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(calc(-1 * var(--key-wheel-selected-radius))) scale(1);
}

.key-wheel-mode-toggle:hover .key-wheel-mode-toggle-hint,
.key-wheel-mode-toggle:focus-visible .key-wheel-mode-toggle-hint {
  transform: scale(1.06);
  border-color: rgba(252, 255, 255, 0.7);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.72), rgba(230, 240, 250, 0.4));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 14px 26px rgba(4, 14, 28, 0.2);
}

.key-wheel-toggle {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--key-wheel-ink);
  cursor: pointer;
  transition:
    transform 220ms var(--key-wheel-motion-enter),
    opacity 220ms ease;
}

.key-wheel-toggle::before {
  position: absolute;
  inset: 14%;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(8, 18, 29, 0.58), rgba(8, 18, 29, 0.16) 62%, transparent 100%);
  filter: blur(14px);
  opacity: 1;
  transition:
    transform 220ms var(--key-wheel-motion-enter),
    opacity 220ms ease;
}

.key-wheel-toggle-capstan {
  filter:
    drop-shadow(0 16px 24px rgba(2, 10, 20, 0.34))
    drop-shadow(0 0 16px rgba(233, 242, 252, 0.1));
}

.key-wheel-toggle:hover,
.key-wheel-toggle:focus-visible {
  transform: scale(1.05);
}

.key-wheel-toggle:hover::before,
.key-wheel-toggle:focus-visible::before {
  transform: scale(1.08);
  opacity: 1;
}

.key-wheel-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.74;
}

.key-wheel-toggle strong {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 72%;
  font-family: var(--display);
  font-variant-ligatures: none;
  line-height: 1;
  text-align: center;
  color: var(--key-wheel-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.key-wheel-toggle .key-wheel-label.is-tonic-only {
  font-size: clamp(
    1.46rem,
    calc(1.83rem - ((var(--key-wheel-label-keyline-glyphs) - 1) * 0.18rem)),
    1.83rem
  );
  line-height: 0.84;
}

.key-wheel-toggle .key-wheel-label.has-inline-suffix {
  font-size: clamp(
    1.12rem,
    calc(1.6rem - ((var(--key-wheel-label-keyline-glyphs) - 2) * 0.14rem)),
    1.6rem
  );
  line-height: 0.88;
}

.key-wheel-toggle .key-wheel-label.is-stacked {
  gap: 0.08em;
  font-size: clamp(
    1rem,
    calc(1.39rem - ((max(var(--key-wheel-label-keyline-glyphs), var(--key-wheel-label-mode-glyphs)) - 3) * 0.12rem)),
    1.39rem
  );
  line-height: 0.9;
}

.key-wheel-toggle .key-wheel-label-mode {
  font-size: 0.58em;
  letter-spacing: 0.08em;
  line-height: 0.98;
  text-transform: uppercase;
}


.tune-abc-shell {
  display: grid;
  gap: 14px;
}

.abc-panel-toggle {
  justify-self: start;
}

.detail-subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
}

.notation-stage {
  --notation-shell-top: rgba(14, 26, 38, 0.94);
  --notation-shell-bottom: rgba(5, 12, 19, 0.98);
  --notation-ink: rgba(232, 221, 198, 0.86);
  --notation-ink-soft: rgba(216, 204, 180, 0.74);
  --notation-ink-muted: rgba(201, 188, 163, 0.72);
  --notation-ink-faded: rgba(191, 179, 155, 0.52);
  --notation-accent: #c59754;
  --notation-accent-strong: #dbaf6d;
  --notation-accent-soft: rgba(197, 151, 84, 0.2);
  --notation-track: rgba(245, 239, 223, 0.12);
  --notation-button-fill: rgba(255, 255, 255, 0.04);
  --notation-button-border: rgba(245, 239, 223, 0.12);
  display: grid;
  gap: 18px;
  align-content: start;
  position: relative;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(245, 239, 223, 0.1);
  background:
    radial-gradient(circle at 16% 14%, rgba(127, 169, 186, 0.14), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(197, 151, 84, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    linear-gradient(180deg, rgba(15, 29, 42, 0.94), rgba(5, 11, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 24px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.notation-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(245, 239, 223, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 239, 223, 0.022) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 36%);
  background-size:
    28px 28px,
    28px 28px,
    100% 100%;
  opacity: 0.24;
  pointer-events: none;
}

.notation-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 84% 72%, rgba(255, 249, 235, 0.08), transparent 18%),
    radial-gradient(circle at 24% 82%, rgba(127, 169, 186, 0.08), transparent 22%);
  pointer-events: none;
}

.notation-stage > * {
  position: relative;
  z-index: 1;
}

.control-deck-label {
  margin: 0;
  color: rgba(127, 169, 186, 0.88);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notation-loading {
  margin: 0;
  color: var(--notation-ink-soft);
  line-height: 1.6;
}

.notation-loading-error {
  color: #8b4f2f;
}

.notation-panel-controls {
  display: grid;
  gap: 14px;
  align-items: center;
}

.notation-panel-controls-verovio {
  grid-template-columns: 1fr;
}

.notation-controls-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.notation-panel-controls-verovio .notation-download,
.notation-panel-controls-verovio .notation-download:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--notation-button-border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--notation-ink);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.notation-target {
  position: relative;
  z-index: 1;
  min-height: clamp(360px, 44vw, 470px);
  padding: clamp(10px, 1vw, 14px) 0 clamp(22px, 2vw, 28px);
  border-bottom: 1px solid rgba(245, 239, 223, 0.1);
  background: none;
  box-shadow: none;
  color: var(--notation-ink);
  overflow: visible;
}

.notation-target::before,
.notation-target::after {
  content: none;
}

.notation-target > * {
  position: relative;
  z-index: 1;
}

.notation-target svg {
  display: block;
  width: 100%;
  height: auto;
}

.notation-target-verovio svg {
  overflow: visible;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.16));
}

.notation-target-verovio svg + svg {
  margin-top: clamp(18px, 2vw, 28px);
}

.notation-target-verovio g.system,
.notation-target-verovio g.staff,
.notation-target-verovio g.layer,
.notation-target-verovio g.note,
.notation-target-verovio g.rest,
.notation-target-verovio g.clef,
.notation-target-verovio g.keySig,
.notation-target-verovio g.meterSig,
.notation-target-verovio g.barLine,
.notation-target-verovio g.ledgerLines,
.notation-target-verovio g.lineDash {
  fill: var(--notation-ink);
  color: var(--notation-ink);
}

.notation-target-verovio g.tempo,
.notation-target-verovio g.text {
  fill: var(--notation-ink-soft);
  color: var(--notation-ink-soft);
}

.notation-target-verovio g.verse {
  fill: var(--notation-ink-soft);
  color: var(--notation-ink-soft);
}

.notation-target-verovio .custom-gliss-layer {
  pointer-events: none;
}

.notation-target-verovio g.gliss path {
  fill: none;
  stroke: var(--notation-ink-soft);
  opacity: 0.94;
}

.notation-target-verovio g.note,
.notation-target-verovio g.note g.verse,
.notation-target-verovio g.note g.text,
.notation-target-verovio g.note rect,
.notation-target-verovio g.note path,
.notation-target-verovio g.rest,
.notation-target-verovio g.rest use,
.notation-target-verovio g.beam polygon,
.notation-target-verovio g.tie path,
.notation-target-verovio g.slur path,
.notation-target-verovio g.gliss path {
  transition:
    fill 150ms ease,
    stroke 150ms ease,
    color 150ms ease,
    filter 180ms ease,
    opacity 180ms ease;
}

.notation-target-verovio g.note.is-played:not(.is-current) {
  fill: var(--notation-ink-faded);
  color: var(--notation-ink-faded);
}

.notation-target-verovio g.note.is-played:not(.is-current) g.notehead,
.notation-target-verovio g.note.is-played:not(.is-current) g.stem,
.notation-target-verovio g.note.is-played:not(.is-current) g.flag,
.notation-target-verovio g.note.is-played:not(.is-current) g.accid,
.notation-target-verovio g.note.is-played:not(.is-current) path,
.notation-target-verovio g.note.is-played:not(.is-current) rect {
  fill: var(--notation-ink-faded);
  color: var(--notation-ink-faded);
  stroke: var(--notation-ink-faded);
}

.notation-target-verovio g.note.is-played:not(.is-current) g.verse {
  fill: var(--notation-ink-muted);
  color: var(--notation-ink-muted);
}

.notation-target-verovio g.rest.is-played:not(.is-current),
.notation-target-verovio g.rest.is-played:not(.is-current) use,
.notation-target-verovio g.beam.is-played:not(.is-current) polygon,
.notation-target-verovio g.tie.is-played:not(.is-current) path,
.notation-target-verovio g.slur.is-played:not(.is-current) path,
.notation-target-verovio g.gliss.is-played:not(.is-current) path {
  fill: var(--notation-ink-faded);
  color: var(--notation-ink-faded);
  stroke: var(--notation-ink-faded);
}

.notation-target-verovio g.note.is-current,
.notation-target-verovio g.note.is-current g.notehead,
.notation-target-verovio g.note.is-current g.stem,
.notation-target-verovio g.note.is-current g.flag,
.notation-target-verovio g.note.is-current g.accid,
.notation-target-verovio g.note.is-current g.verse,
.notation-target-verovio g.note.is-current g.text,
.notation-target-verovio g.note.is-current path,
.notation-target-verovio g.note.is-current rect,
.notation-target-verovio g.rest.is-current,
.notation-target-verovio g.rest.is-current use,
.notation-target-verovio g.beam.is-current polygon,
.notation-target-verovio g.tie.is-current path,
.notation-target-verovio g.slur.is-current path,
.notation-target-verovio g.gliss.is-current path {
  fill: var(--notation-accent-strong) !important;
  color: var(--notation-accent-strong) !important;
  stroke: var(--notation-accent-strong) !important;
}

.notation-target-verovio g.note.is-current,
.notation-target-verovio g.rest.is-current,
.notation-target-verovio g.beam.is-current,
.notation-target-verovio g.tie.is-current,
.notation-target-verovio g.slur.is-current,
.notation-target-verovio g.gliss.is-current {
  filter: drop-shadow(0 0 14px rgba(197, 151, 84, 0.24));
}

.notation-target .abcjs-title {
  fill: var(--notation-ink-soft);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.notation-target .abcjs-staff path,
.notation-target .abcjs-bar,
.notation-target .abcjs-ledger,
.notation-target .abcjs-stem,
.notation-target .abcjs-top-line {
  fill: var(--notation-ink-soft);
  stroke: var(--notation-ink-soft);
}

.notation-target .abcjs-notehead,
.notation-target .abcjs-rest,
.notation-target .abcjs-clef,
.notation-target .abcjs-key-signature,
.notation-target .abcjs-time-signature {
  fill: var(--notation-ink);
  stroke: var(--notation-ink);
}

.notation-target .abcjs-tempo,
.notation-target .abcjs-lyric {
  fill: var(--notation-ink-soft);
  font-family: "Manrope", sans-serif;
}

.notation-target .abcjs-meta-top text,
.notation-target .abcjs-part-order text {
  fill: var(--notation-ink-muted);
}

.notation-target .abcjs-note_selected .abcjs-notehead,
.notation-target .abcjs-note_selected .abcjs-stem {
  fill: var(--notation-accent-strong);
  stroke: var(--notation-accent-strong);
}

.notation-panel-controls-verovio [data-verovio-download] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-color: var(--notation-button-border);
  background:
    linear-gradient(135deg, rgba(127, 169, 186, 0.12), rgba(255, 255, 255, 0.04));
  color: var(--notation-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verovio-player {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.verovio-player-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--notation-button-border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--notation-ink);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.verovio-player-button[data-verovio-play]:not(:disabled) {
  border-color: rgba(197, 151, 84, 0.24);
  background:
    linear-gradient(135deg, rgba(197, 151, 84, 0.16), rgba(255, 255, 255, 0.05));
}

.verovio-player-button:hover,
.verovio-player-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(197, 151, 84, 0.4);
  color: var(--paper-strong);
}

.verovio-player-button:disabled {
  opacity: 0.44;
  color: var(--notation-ink-muted);
  cursor: not-allowed;
  transform: none;
}

.verovio-player-progress {
  --progress: 0%;
  min-width: 220px;
  width: 100%;
  height: 14px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(90deg, rgba(255, 249, 235, 0.92), rgba(197, 151, 84, 0.92))
      0 / var(--progress) 100% no-repeat,
    linear-gradient(180deg, rgba(245, 239, 223, 0.12), rgba(245, 239, 223, 0.08));
  box-shadow: inset 0 0 0 1px rgba(245, 239, 223, 0.08);
  cursor: pointer;
}

.verovio-player-progress::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: transparent;
}

.verovio-player-progress::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: transparent;
  border: 0;
}

.verovio-player-progress::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -2px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background:
    radial-gradient(circle at 30% 30%, #fff4dd, #c59754 68%, #8e5c27 100%);
  box-shadow:
    0 0 0 4px rgba(197, 151, 84, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.verovio-player-progress::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff4dd, #c59754 68%, #8e5c27 100%);
  box-shadow:
    0 0 0 4px rgba(197, 151, 84, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.verovio-player-progress:focus-visible {
  outline: 2px solid rgba(197, 151, 84, 0.4);
  outline-offset: 4px;
}

.verovio-player-progress:disabled {
  cursor: default;
  opacity: 0.52;
}

.verovio-player-clock {
  color: var(--notation-ink-soft);
  font-variant-numeric: tabular-nums;
}

.notation-player-status {
  margin: 0;
  color: var(--notation-ink-soft);
  line-height: 1.6;
  min-height: 1.4em;
}

.notation-player-status[data-tone="error"] {
  color: #e8b07a;
}

.notation-panel-controls-verovio [data-verovio-download]:hover,
.notation-panel-controls-verovio [data-verovio-download]:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(197, 151, 84, 0.36);
}

.notation-panel-controls-verovio .notation-download:hover,
.notation-panel-controls-verovio .notation-download:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(197, 151, 84, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.18);
}

.notation-panel-controls-verovio .notation-download,
.notation-panel-controls-verovio .notation-download:visited,
.notation-panel-controls-verovio [data-verovio-download] {
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.tune-code {
  margin: 0;
  max-height: 36rem;
  opacity: 1;
  transition:
    max-height 260ms ease,
    opacity 220ms ease,
    border-color 220ms ease;
}

.tune-code.is-collapsed {
  max-height: 0;
  opacity: 0;
  border-color: transparent;
  pointer-events: none;
}

.tune-code pre {
  max-height: 24rem;
}

.tune-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.lyrics-grid {
  display: grid;
  gap: 24px;
}

.tune-side-lyrics {
  align-content: start;
}

.lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.metadata-section {
  display: grid;
  gap: 20px;
}

.lyrics-columns {
  position: relative;
}

.lyrics-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  animation: lyricsFade 320ms ease-out;
}

.lyrics-card[hidden] {
  display: none !important;
}

.lyrics-list {
  margin: 0;
}

.lyrics-list p {
  margin: 0;
  white-space: pre-line;
}

.lyrics-list p + p {
  margin-top: 12px;
}

.lyrics-selector {
  position: relative;
}

.lyrics-selector-tabs {
  --glow-x: 0px;
  --glow-width: 120px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 239, 223, 0.14);
  background: linear-gradient(180deg, rgba(255, 249, 235, 0.06), rgba(12, 22, 32, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 222, 0.08),
    0 16px 30px rgba(0, 0, 0, 0.24);
}

.lyrics-selector-tabs::before {
  position: absolute;
  top: 10px;
  left: 0;
  bottom: 10px;
  width: calc(var(--glow-width) + 8px);
  content: "";
  border-radius: 999px;
  background: radial-gradient(circle, rgba(233, 196, 137, 0.16), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  transform: translateX(calc(var(--glow-x) - 4px));
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lyrics-glow {
  position: absolute;
  top: 10px;
  left: 0;
  bottom: 10px;
  width: var(--glow-width);
  border-radius: 999px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 50%, rgba(255, 245, 210, 0.88), transparent 45%),
    linear-gradient(135deg, rgba(246, 218, 150, 0.94), rgba(201, 137, 75, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 234, 0.42),
    0 0 0 1px rgba(255, 232, 179, 0.18),
    0 0 16px rgba(233, 196, 137, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.2);
  transform: translateX(var(--glow-x));
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    width 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease;
  pointer-events: none;
}

.lyrics-glow::before {
  position: absolute;
  inset: 8% 6%;
  content: "";
  border-radius: 999px;
  background: radial-gradient(circle, rgba(233, 196, 137, 0.26), transparent 70%);
  filter: blur(8px);
  opacity: 0.72;
}

.lyrics-glow::after {
  position: absolute;
  inset: 18% 14%;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 251, 234, 0.86), rgba(255, 255, 255, 0));
  opacity: 0.72;
  filter: blur(6px);
}

.lyrics-tab {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(245, 239, 223, 0.12);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.lyrics-tab:hover,
.lyrics-tab:focus-visible {
  color: var(--paper);
  border-color: rgba(245, 239, 223, 0.2);
  transform: translateY(-1px);
}

.lyrics-tab.is-active {
  color: #1b1812;
  border-color: transparent;
  box-shadow: none;
}

.lyrics-selector-dropdown {
  display: inline-grid;
  gap: 8px;
}

.lyrics-select-label {
  color: var(--sea);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lyrics-select-wrap {
  position: relative;
}

.lyrics-select-wrap::before {
  position: absolute;
  inset: 50% auto auto 18px;
  width: 86px;
  height: 60%;
  content: "";
  border-radius: 999px;
  background: radial-gradient(circle, rgba(233, 196, 137, 0.2), transparent 72%);
  transform: translateY(-50%);
  filter: blur(12px);
  pointer-events: none;
}

.lyrics-select-wrap::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 10px;
  height: 10px;
  content: "";
  border-right: 2px solid rgba(245, 239, 223, 0.7);
  border-bottom: 2px solid rgba(245, 239, 223, 0.7);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.lyrics-select-wrap select {
  min-width: 220px;
  min-height: 48px;
  padding: 0 44px 0 18px;
  border: 1px solid rgba(245, 239, 223, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 249, 235, 0.08), rgba(12, 22, 32, 0.9));
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  appearance: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 222, 0.08),
    0 16px 30px rgba(0, 0, 0, 0.24);
}

@keyframes lyricsFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 480ms ease, transform 480ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hero,
  .source-book-grid,
  .source-book-card,
  .featured-grid,
  .record-shell,
  .tune-stage-grid,
  .lyrics-columns,
  .browse-grid,
  .architecture-grid,
  .variant-children,
  .book-list {
    grid-template-columns: 1fr;
  }

  .source-book-card {
    grid-template-areas:
      "visual"
      "copy"
      "meta";
  }

  .hero-visual {
    min-height: 520px;
  }

  .source-book-visual {
    width: min(100%, 440px);
    max-width: 440px;
    justify-self: start;
  }

  .hero-visual img {
    object-position: center 38%;
  }

  .celestial-atlas::before {
    height: min(68rem, 72vh + 18rem);
    background-size: cover;
  }

}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 1220px);
  }

  .site-header {
    margin-top: 10px;
    padding: 16px;
    border-radius: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy,
  .browse-card,
  .featured-card,
  .catalog-card,
  .record-main,
  .record-sidebar,
  .tune-stage-main,
  .tune-side-card,
  .source-card,
  .lyrics-card,
  .architecture-card,
  .variant-map,
  .source-book-card {
    padding: 24px;
  }

  .source-book-visual {
    padding: 14px;
  }

  .book-card-meta {
    padding: 16px 18px;
  }

  .book-card-meta-row {
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
  }

  .book-card-meta-row::before {
    display: none;
  }

  .book-card-meta dd {
    margin-left: 0;
    text-align: left;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .tune-titlebar h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  h2 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .notation-stage {
    padding: 20px;
  }

  .notation-target {
    min-height: clamp(300px, 82vw, 420px);
    padding: 6px 0 18px;
  }

  .notation-controls-meta {
    align-items: flex-start;
  }

  .verovio-player {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .verovio-player-button {
    justify-content: center;
  }

  .verovio-player-progress {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .verovio-player-clock {
    grid-column: 1 / -1;
    text-align: right;
  }

  .notation-panel-controls-verovio [data-verovio-download] {
    min-width: 0;
  }

  .tune-page {
    --tune-key-wheel-anchor-size: 6.37rem;
  }

  .tune-key-wheel,
  .key-wheel-overlay {
    --key-wheel-size: min(21rem, calc(100vw - 40px), calc(100dvh - 104px));
  }

  .key-wheel-shell {
    overflow: hidden;
  }

  .key-wheel-ring-major .key-wheel-option {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 0.68rem;
  }

  .key-wheel-ring-inner .key-wheel-option {
    width: 2.08rem;
    height: 2.08rem;
    font-size: 0.6rem;
  }

  .key-wheel-mode-toggle-key {
    font-size: 0.56rem;
  }

  .key-wheel-mode-toggle-hint {
    min-height: 1.24rem;
    padding: 0.24rem 0.58rem;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  .key-wheel-selected-key-badge {
    min-width: 3.14rem;
    min-height: 2.3rem;
    padding: 0.34rem 0.78rem 0.4rem;
    font-size: 1.04rem;
  }

  .key-wheel-toggle strong {
    font-size: 0.8rem;
  }

  .abc-panel-toggle {
    width: 100%;
    justify-content: center;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row input {
    min-width: 0;
    width: 100%;
  }

  .celestial-atlas::before {
    top: -2rem;
    height: min(50rem, 54vh + 16rem);
    opacity: 0.24;
    background-position: center top;
    background-size: cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero-visual img,
  .hero-plaque {
    transform: none !important;
  }
}
