:root {
  --ink: #17151d;
  --muted: #6d6877;
  --line: #ddd9e4;
  --line-strong: #c7c0d2;
  --paper: #fffefa;
  --canvas: #efedf2;
  --canvas-warm: #f7f5ee;
  --purple: #503aa8;
  --purple-dark: #33236f;
  --purple-soft: #ece8fb;
  --gold: #ffee58;
  --rail: #211a35;
  --rail-soft: #33294e;
  --danger: #a83745;
  --shadow-sm: 0 1px 2px rgb(20 14 35 / 8%);
  --shadow-lg: 0 22px 60px rgb(22 15 38 / 22%);
  --rail-width: 76px;
  --drawer-width: min(360px, calc(100vw - var(--rail-width)));
  --music-drawer-width: min(430px, calc(100vw - var(--rail-width)));
  --reader-scale: 1;
  color-scheme: light;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
select,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--purple) 72%, white);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: var(--purple-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.study-app {
  --source-copy-dock-offset: 0px;
  position: relative;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  isolation: isolate;
}

#study-audio {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.tool-rail {
  position: relative;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 12px 8px;
  background:
    radial-gradient(circle at 50% 0%, rgb(99 76 168 / 38%), transparent 34%),
    var(--rail);
  color: white;
  box-shadow: 3px 0 16px rgb(19 13 32 / 18%);
}

.rail-actions {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.rail-button {
  display: grid;
  min-height: 64px;
  place-items: center;
  gap: 5px;
  padding: 8px 3px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgb(255 255 255 / 75%);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.rail-button:hover,
.rail-button[aria-expanded="true"],
.rail-button[aria-pressed="true"],
.rail-button.is-active {
  background: var(--rail-soft);
  color: white;
}

.rail-button:active {
  transform: translateY(1px);
}

.pane-switch-button {
  display: none;
}

.study-fullscreen-button {
  margin-top: auto;
}

.study-collapse-icon {
  display: none;
}

.study-fullscreen-button[aria-pressed="true"] .study-expand-icon {
  display: none;
}

.study-fullscreen-button[aria-pressed="true"] .study-collapse-icon {
  display: block;
}

.rail-button svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.rail-button span {
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.rail-info-group {
  display: grid;
  flex: none;
  gap: 1px;
  text-align: center;
}

.rail-info-group .rail-button {
  width: 100%;
}

.rail-version {
  display: block;
  overflow: hidden;
  color: rgb(255 255 255 / 64%);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  letter-spacing: 0.025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-rail-button {
  position: relative;
}

.music-playing-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--rail);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgb(255 238 88 / 16%);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.music-rail-button.is-playing .music-playing-dot {
  animation: music-playing-pulse 1.8s ease-in-out infinite;
  opacity: 1;
  transform: scale(1);
}

@keyframes music-playing-pulse {
  50% {
    box-shadow: 0 0 0 5px rgb(255 238 88 / 8%);
  }
}

.workspace {
  --split-percent: 50%;
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 0;
  background: var(--canvas);
}

.workspace[data-layout="single"] {
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}

.workspace[data-layout="horizontal"] {
  grid-template: minmax(0, 1fr) / minmax(280px, var(--split-percent)) 7px minmax(280px, 1fr);
}

.workspace[data-layout="vertical"] {
  grid-template: minmax(280px, var(--split-percent)) 7px minmax(280px, 1fr) / minmax(0, 1fr);
}

.study-pane {
  position: relative;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas-warm);
  container-type: inline-size;
}

.study-pane.is-active-pane {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--purple) 26%, transparent);
}

.pane-divider {
  position: relative;
  z-index: 12;
  display: grid;
  place-items: center;
  background: #d6d1dc;
  cursor: col-resize;
  touch-action: none;
}

.workspace[data-layout="vertical"] .pane-divider {
  cursor: row-resize;
}

.pane-divider::before {
  position: absolute;
  inset: -5px;
  content: "";
}

.pane-divider:hover,
.pane-divider:focus-visible,
.pane-divider.is-dragging {
  background: var(--purple);
}

.pane-divider span {
  width: 2px;
  height: 28px;
  border-radius: 2px;
  background: rgb(255 255 255 / 70%);
  opacity: 0;
}

.workspace[data-layout="vertical"] .pane-divider span {
  width: 28px;
  height: 2px;
}

.pane-divider:hover span,
.pane-divider:focus-visible span,
.pane-divider.is-dragging span {
  opacity: 1;
}

.tab-strip {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: end;
  min-width: 0;
  padding: 6px 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line-strong);
  background: #e6e3e9;
  scrollbar-width: thin;
}

.tab-strip.is-drop-target,
.study-pane.is-drop-target .empty-pane {
  background: color-mix(in srgb, var(--purple-soft) 78%, white);
  box-shadow: inset 0 0 0 2px var(--purple);
}

.document-tab {
  position: relative;
  display: flex;
  flex: 0 1 260px;
  align-items: center;
  min-width: 128px;
  max-width: 280px;
  height: 37px;
  margin-right: 2px;
  padding: 0 5px 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: #5d5963;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.document-tab:hover {
  background: rgb(255 255 255 / 52%);
  color: var(--ink);
}

.document-tab[aria-selected="true"] {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 3px 0 var(--purple);
}

.document-tab.is-dragging {
  opacity: 0.45;
}

.tab-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 690;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-language {
  flex: none;
  margin-left: 7px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tab-close {
  display: grid;
  flex: none;
  width: 25px;
  height: 25px;
  margin-left: 4px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #77727d;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.tab-close:hover {
  background: #e2dee6;
  color: var(--danger);
}

.document-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: var(--paper);
}

.document-toolbar {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 88px;
  gap: 7px;
  padding: 8px 15px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 254 250 / 96%);
  box-shadow: var(--shadow-sm);
}

.document-heading-row,
.document-actions-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
}

.document-heading-row {
  gap: 12px;
}

.document-actions-row {
  gap: 8px;
}

.document-identity {
  display: flex;
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 10px;
}

.document-identity strong,
.document-identity span,
.document-identity a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-identity strong {
  max-width: 55%;
  flex: 0 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 650;
}

.document-identity span,
.document-identity a {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.document-identity a {
  text-decoration-color: color-mix(in srgb, currentColor 50%, transparent);
  text-underline-offset: 2px;
}

.document-identity a:hover,
.document-identity a:focus-visible {
  color: var(--purple-dark);
}

.document-identity .document-source-line {
  display: block;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-identity .document-source-line > span,
.document-identity .document-source-line > a {
  display: inline;
  margin-top: 0;
}

.location-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--purple-dark);
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-scroll-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--line));
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.linked-scroll-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  content: "";
}

.outline-select {
  width: min(250px, 28vw);
  min-height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: #423e47;
  font-size: 11px;
  cursor: pointer;
}

.document-actions-row .outline-select {
  margin-right: auto;
}

.bible-navigation {
  display: flex;
  min-width: 0;
  gap: 6px;
  margin-right: auto;
}

.bible-select-field {
  position: relative;
  display: block;
  min-width: 0;
  flex: none;
}

.bible-select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 2px 28px 11px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background-color: white;
  color: #423e47;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.bible-select-caption {
  position: absolute;
  z-index: 1;
  bottom: 3px;
  left: 9px;
  color: var(--purple);
  font-size: 6px;
  font-weight: 820;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
}

.bible-book-field {
  width: min(190px, 21vw);
}

.bible-chapter-field {
  width: 104px;
}

.bible-verse-field {
  width: 84px;
}

.toolbar-group {
  display: inline-flex;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
}

.toolbar-button {
  display: grid;
  min-width: 35px;
  height: 34px;
  place-items: center;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid var(--line);
  background: white;
  color: #4f4a54;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.toolbar-button:last-child {
  border-right: 0;
}

.toolbar-button:hover {
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.toolbar-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.work-info-toolbar-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--purple);
  cursor: pointer;
}

.work-info-toolbar-button:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.work-info-toolbar-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.move-pane-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: #4f4a54;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.move-pane-button:hover {
  border-color: var(--purple);
  color: var(--purple-dark);
}

.move-pane-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.narration-launch-button {
  position: relative;
  display: inline-grid;
  flex: none;
  min-height: 36px;
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--purple) 42%, var(--line));
  border-radius: 9px;
  background: linear-gradient(145deg, #fff9cf, #fff2ac);
  color: #3d2d68;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 78%);
}

.narration-launch-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.narration-launch-button i {
  position: absolute;
  top: -7px;
  right: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--purple);
  color: white;
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.narration-launch-button:hover,
.narration-launch-button.is-active {
  border-color: var(--purple);
  background: linear-gradient(145deg, var(--gold), #f6d65a);
  color: var(--purple-dark);
}

.reader-scroller {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: #bbb4c4 transparent;
}

.reader-scroller.is-linked-scroll-target {
  scroll-behavior: auto !important;
}

.reader-scroller.is-restoring-position {
  scroll-behavior: auto !important;
}

.reader-page {
  width: min(820px, calc(100% - 64px));
  max-width: 100%;
  min-height: calc(100% - 64px);
  margin: 32px auto 72px;
  padding: clamp(30px, 5vw, 64px) clamp(28px, 6vw, 74px) 80px;
  border: 1px solid #e4dfd3;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 5px 28px rgb(65 54 38 / 8%);
  color: #28242b;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: calc(18px * var(--reader-scale));
  line-height: 1.77;
  overflow-wrap: break-word;
}

.reader-page[lang="grc"] {
  font-family: "Gentium Plus", "Noto Serif", "Noto Serif Greek", "Palatino Linotype", Georgia, Cambria, "Times New Roman", serif;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

.internal-citation-link {
  display: inline;
  margin: 0;
  padding: 0 0.08em;
  border: 0;
  border-radius: 0.18em;
  background: transparent;
  color: var(--purple-dark);
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--purple) 68%, transparent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.internal-citation-link:hover,
.internal-citation-link:focus-visible {
  background: var(--purple-soft);
  color: var(--purple);
  text-decoration-color: currentColor;
}

.footnote-reference-link {
  position: relative;
  top: -0.28em;
  margin-inline: 0.03em;
  padding-inline: 0.11em;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1;
  text-underline-offset: 0.09em;
}

.has-narration-text .narration-sentence,
.has-narration-text .narration-word,
.has-narration-title .narration-sentence,
.has-narration-title .narration-word {
  border-radius: 0.2em;
}

.work-title > .narration-title-sentence {
  display: inline;
}

.is-narration-mode .narration-sentence {
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.is-narration-mode .narration-sentence:hover,
.is-narration-mode .narration-sentence:focus-visible {
  background: color-mix(in srgb, var(--purple-soft) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple-soft) 62%, transparent);
  outline: 0;
}

.narration-sentence.is-active-sentence {
  background: color-mix(in srgb, #fff2a8 27%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, #fff2a8 22%, transparent);
}

.narration-word.is-active-word {
  background: var(--gold);
  color: #1d1630;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 68%, transparent);
}

.narration-sentence-play-button {
  display: inline-grid;
  width: 1.55em;
  height: 1.55em;
  margin: 0 0.32em 0 0;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--purple) 35%, white);
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-dark);
  cursor: pointer;
  vertical-align: 0.08em;
}

.narration-sentence-play-button:disabled {
  display: none;
}

.narration-sentence-play-button svg {
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
}

.study-app.is-narration-mode .reader-scroller {
  padding-bottom: calc(158px + env(safe-area-inset-bottom));
}

.narration-dock {
  position: fixed;
  z-index: 45;
  right: 0;
  bottom: 0;
  left: var(--rail-width);
  display: grid;
  min-height: 146px;
  grid-template-columns: minmax(190px, 300px) minmax(320px, 760px) auto;
  grid-template-areas:
    "summary progress close"
    "summary transport close"
    "summary hint close";
  justify-content: center;
  align-items: center;
  gap: 2px 22px;
  padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) 18px;
  border-top: 1px solid rgb(255 255 255 / 15%);
  background:
    radial-gradient(circle at 15% 0%, rgb(99 76 168 / 42%), transparent 40%),
    linear-gradient(145deg, #211a35, #302443);
  color: white;
  box-shadow: 0 -16px 42px rgb(24 17 38 / 24%);
}

.narration-dock-summary {
  display: grid;
  min-width: 0;
  grid-area: summary;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.narration-dock-art {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 11px;
  background: linear-gradient(145deg, rgb(255 255 255 / 16%), rgb(255 255 255 / 6%));
  color: var(--gold);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%);
}

.narration-dock-art svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.narration-dock-copy {
  min-width: 0;
}

.narration-dock-copy p,
.narration-dock-copy strong,
.narration-dock-copy small {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.narration-dock-copy p {
  color: #f4d966;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.narration-dock-copy p span {
  margin-left: 5px;
  color: rgb(255 255 255 / 62%);
}

.narration-dock-copy strong {
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 620;
}

.narration-dock-copy small {
  margin-top: 2px;
  color: rgb(255 255 255 / 62%);
  font-size: 9px;
}

.narration-transport {
  display: flex;
  grid-area: transport;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.narration-skip-button,
.narration-play-button,
.narration-close-button {
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 8%);
  color: white;
  cursor: pointer;
}

.narration-skip-button {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.narration-skip-button svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.narration-skip-button span {
  position: absolute;
  top: 51%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: 850;
}

.narration-play-button {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), #e9bd37);
  color: #251b36;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 58%), 0 7px 18px rgb(0 0 0 / 25%);
}

.narration-play-button svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.narration-play-button:disabled,
.narration-skip-button:disabled,
.narration-progress-row input:disabled,
.narration-dock.is-loading .narration-progress-row {
  opacity: 0.48;
}

.narration-play-button:disabled,
.narration-skip-button:disabled {
  cursor: wait;
}

.narration-pause-icon,
.narration-dock.is-playing .narration-play-icon {
  display: none;
}

.narration-dock.is-playing .narration-pause-icon {
  display: block;
}

.narration-skip-button:hover,
.narration-close-button:hover {
  border-color: rgb(255 255 255 / 45%);
  background: rgb(255 255 255 / 15%);
}

.narration-progress-row {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-area: progress;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.narration-progress-row span {
  color: rgb(255 255 255 / 70%);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.narration-progress-row span:last-child {
  text-align: right;
}

.narration-progress-row input[type="range"] {
  --narration-progress: 0%;
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.narration-progress-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--gold) 0 var(--narration-progress),
    rgb(255 255 255 / 20%) var(--narration-progress) 100%
  );
}

.narration-progress-row input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  appearance: none;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 3px 10px rgb(0 0 0 / 34%);
}

.narration-progress-row input[type="range"]::-moz-range-track {
  height: 8px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 20%);
}

.narration-progress-row input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
}

.narration-progress-row input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 3px 10px rgb(0 0 0 / 34%);
}

.narration-progress-row input[type="range"]:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.narration-hint {
  grid-area: hint;
  margin: 0;
  color: rgb(255 255 255 / 58%);
  font-size: 8px;
  text-align: center;
}

.narration-close-button {
  width: 42px;
  height: 42px;
  grid-area: close;
  border-radius: 12px;
}

.narration-close-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.narration-dock.has-error {
  border-top-color: #e47d89;
}

.reader-page .work-author {
  margin: 0 0 9px;
  color: var(--purple);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.67em;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.reader-page .work-title {
  max-width: 100%;
  margin: 0 0 2.2em;
  color: #18131f;
  font-size: 2.15em;
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.13;
  overflow-wrap: anywhere;
  text-align: center;
}

.reader-page .reader-source-details {
  display: block;
  margin: -3.25em 0 2.2em;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.55;
  text-align: center;
  text-transform: uppercase;
}

.reader-page .reader-source-details > span,
.reader-page .reader-source-details > a {
  display: inline;
}

.reader-page .reader-source-details a {
  color: inherit;
  text-underline-offset: 2px;
}

.reader-page .reader-source-details a:hover,
.reader-page .reader-source-details a:focus-visible {
  color: var(--purple-dark);
}

.reader-page .translation-note {
  margin: -1em 0 2.6em;
  padding: 0.9em 1.1em;
  border: 1px solid #ded8e8;
  border-radius: 9px;
  background: #faf8fd;
  color: #595163;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72em;
  line-height: 1.55;
}

.reader-page.has-provenance .work-title {
  margin-bottom: 0.8em;
}

.reader-provenance-chain {
  max-width: 660px;
  margin: 0 auto 1em;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--purple-soft) 42%, var(--paper));
  color: var(--ink);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84em;
  line-height: 1.45;
}

.reader-provenance-chain-summary {
  display: grid;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 18px;
  padding: 14px clamp(16px, 3vw, 24px);
  cursor: pointer;
  list-style: none;
}

.reader-provenance-chain[open] > .reader-provenance-chain-summary {
  border-bottom: 1px solid var(--line);
}

.reader-provenance-chain-summary::-webkit-details-marker {
  display: none;
}

.reader-provenance-chain-summary::marker {
  content: "";
}

.reader-provenance-chain-summary::after {
  width: 0.55em;
  height: 0.55em;
  border-right: 2px solid var(--purple-dark);
  border-bottom: 2px solid var(--purple-dark);
  content: "";
  transform: rotate(45deg) translate(-0.08em, -0.08em);
}

.reader-provenance-chain:not([open]) > .reader-provenance-chain-summary::after {
  transform: rotate(-45deg);
}

.reader-provenance-chain-summary:hover {
  background: color-mix(in srgb, var(--purple-soft) 58%, transparent);
}

.reader-provenance-chain-summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--purple) 72%, white);
  outline-offset: -3px;
}

.reader-page .reader-provenance-chain-title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--purple-dark);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78em;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
}

.reader-provenance-chain-direction {
  margin: 0;
  color: var(--muted);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-align: right;
}

.reader-provenance-chain:not([open]) .reader-provenance-chain-direction {
  display: none;
}

.reader-provenance-chain-body {
  padding: clamp(16px, 3vw, 24px);
}

.reader-provenance-chain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader-provenance-stage {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.16em;
  margin: 0;
  padding: 0 0 1.2em 28px;
  overflow-wrap: anywhere;
}

.reader-provenance-stage:last-child {
  padding-bottom: 0;
}

.reader-provenance-stage::before {
  position: absolute;
  z-index: 1;
  top: 0.42em;
  left: 2px;
  width: 11px;
  height: 11px;
  border: 3px solid color-mix(in srgb, var(--purple) 24%, var(--paper));
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 55%, var(--line));
  content: "";
}

.reader-provenance-stage:not(:last-child)::after {
  position: absolute;
  top: 1.2em;
  bottom: -0.2em;
  left: 9px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.reader-provenance-stage-label {
  color: var(--purple);
  font-size: 0.69em;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.reader-provenance-stage-title {
  color: var(--ink);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.05em;
  font-weight: 650;
  line-height: 1.35;
}

.reader-provenance-stage-date {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12em 0.45em;
  margin: 0.04em 0 0;
  color: var(--muted);
  font-size: 0.76em;
  line-height: 1.4;
}

.reader-provenance-stage-date dt,
.reader-provenance-stage-date dd {
  min-width: 0;
  margin: 0;
}

.reader-provenance-stage-date dt {
  color: var(--purple-dark);
  font-weight: 800;
  letter-spacing: 0.025em;
}

.reader-provenance-stage-detail {
  color: var(--muted);
  font-size: 0.78em;
  line-height: 1.48;
}

.reader-provenance-stage-link {
  width: fit-content;
  margin-top: 0.2em;
  color: var(--purple-dark);
  font-size: 0.76em;
  font-weight: 800;
  line-height: 1.4;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button.reader-provenance-stage-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.reader-provenance-stage-link:hover,
.reader-provenance-stage-link:focus-visible {
  color: var(--purple);
}

.reader-provenance-supporting {
  margin-top: clamp(18px, 3vw, 24px);
  padding-top: clamp(16px, 2.5vw, 20px);
  border-top: 1px solid var(--line);
}

.reader-provenance-supporting-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.74em;
  font-weight: 820;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.reader-provenance-supporting-note {
  max-width: 60ch;
  margin: 0.45em 0 0;
  color: var(--muted);
  font-size: 0.74em;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.reader-provenance-supporting-list {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0.9em 0 0;
  padding: 0;
  list-style: none;
}

.reader-provenance-stage.reader-provenance-supporting-item {
  gap: 0.18em;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 82%, var(--purple-soft));
}

.reader-provenance-stage.reader-provenance-supporting-item::before,
.reader-provenance-stage.reader-provenance-supporting-item::after {
  display: none;
  content: none;
}

.reader-provenance-supporting-item .reader-provenance-stage-label,
.reader-provenance-supporting-item .reader-provenance-stage-date,
.reader-provenance-supporting-item .reader-provenance-stage-detail {
  color: var(--muted);
}

.reader-provenance-supporting-item .reader-provenance-stage-title {
  font-size: 0.98em;
}

.reader-provenance-supporting-item .reader-provenance-stage-link {
  color: var(--muted);
}

.reader-provenance-supporting-item .reader-provenance-stage-link:hover,
.reader-provenance-supporting-item .reader-provenance-stage-link:focus-visible {
  color: var(--purple-dark);
}

.reader-source-details-panel {
  max-width: 660px;
  margin: 0 auto 2.6em;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 88%, var(--purple-soft));
  color: var(--muted);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72em;
  line-height: 1.55;
}

.reader-source-details-panel > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0.75em 1em;
  color: var(--purple-dark);
  cursor: pointer;
  font-weight: 820;
  letter-spacing: 0.03em;
}

.reader-source-details-panel > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--purple) 72%, white);
  outline-offset: -3px;
}

.reader-source-details-body {
  padding: 0 1em 1em;
  border-top: 1px solid var(--line);
}

.reader-source-details-section {
  padding-top: 1em;
}

.reader-source-details-section + .reader-source-details-section {
  margin-top: 1em;
  border-top: 1px solid var(--line);
}

.reader-page .reader-source-details-section h3 {
  margin: 0 0 0.6em;
  color: var(--purple);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76em;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.reader-source-details-section p {
  margin: 0;
}

.reader-source-record {
  margin: 0;
}

.reader-source-record dt {
  margin-top: 0.85em;
  color: var(--ink);
  font-size: 0.78em;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.reader-source-record dt:first-child {
  margin-top: 0;
}

.reader-source-record dd {
  margin: 0.18em 0 0;
  overflow-wrap: anywhere;
}

.reader-license-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader-license-list li + li {
  margin-top: 0.85em;
}

.reader-license-list a,
.reader-license-list span {
  display: block;
}

.reader-license-list a {
  width: fit-content;
  color: var(--purple-dark);
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.reader-license-list span {
  margin-top: 0.18em;
}

.reader-provenance {
  margin: -1.25em 0 2.6em;
  overflow: hidden;
  border: 1px solid #ded8e8;
  border-radius: 9px;
  background: #faf8fd;
  color: #595163;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68em;
}

.reader-provenance > summary {
  padding: 0.8em 1em;
  color: var(--purple-dark);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.reader-provenance-body {
  padding: 0 1em 0.8em;
  border-top: 1px solid #e5dfeb;
}

.reader-provenance-body p {
  margin: 0.8em 0 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.bible-reader-page .work-title {
  margin-bottom: 0.55em;
}

.bible-edition-note {
  margin: 0 0 2.4em !important;
  color: #6e6576;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.67em;
  font-weight: 720;
  letter-spacing: 0.045em;
  text-align: center;
  text-transform: uppercase;
}

.reader-page .bible-chapter-title {
  margin: 0 0 1.35em;
  padding: 0 0 0.65em;
  border-top: 0;
  border-bottom: 1px solid #d9d2c4;
  font-size: 1.28em;
}

.bible-verses {
  counter-reset: none;
}

.reader-page .bible-verse {
  margin-bottom: 0.75em;
  padding-left: 2em;
  text-indent: -2em;
  overflow-wrap: normal;
  word-break: normal;
}

.verse-number {
  display: inline-block;
  min-width: 2em;
  padding-right: 0.45em;
  color: #776a83;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58em;
  font-weight: 820;
  line-height: 1;
  text-align: right;
  text-indent: 0;
  vertical-align: 0.42em;
}

.bible-chapter-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 3em;
}

.bible-chapter-button {
  display: flex;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #d8d1e2;
  border-radius: 10px;
  background: #faf8fd;
  color: var(--purple-dark);
  cursor: pointer;
  text-align: left;
}

.bible-chapter-button:last-child {
  text-align: right;
}

.bible-chapter-button:hover,
.bible-chapter-button:focus-visible {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.bible-chapter-button:disabled {
  visibility: hidden;
}

.bible-chapter-button small,
.bible-chapter-button strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bible-chapter-button small {
  color: var(--muted);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bible-chapter-button strong {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 650;
}

.reader-page h2,
.reader-page h3,
.reader-page h4,
.reader-page h5 {
  scroll-margin-top: 24px;
}

.reader-page h2 {
  margin: 2.8em 0 0.8em;
  padding-top: 1.15em;
  border-top: 1px solid #d9d2c4;
  color: #24183f;
  font-size: 1.45em;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.reader-page h3 {
  margin: 2.4em 0 0.75em;
  color: var(--purple-dark);
  font-size: 1.12em;
  font-weight: 640;
  line-height: 1.35;
}

.reader-page h4 {
  margin: 2.1em 0 0.7em;
  color: #3a3045;
  font-size: 1em;
  font-style: italic;
  font-weight: 600;
  line-height: 1.42;
}

.reader-page h5 {
  margin: 1.7em 0 0.65em;
  color: #564b61;
  font-size: 0.92em;
  font-style: italic;
  font-weight: 600;
  line-height: 1.42;
}

.reader-page p {
  margin: 0 0 1.05em;
  text-wrap: pretty;
}

.reader-page .book-summary {
  margin: -0.2em 0 2.1em;
  color: #625969;
  font-size: 0.91em;
  font-style: italic;
  line-height: 1.6;
  text-align: center;
}

.reader-page .editorial-synopsis {
  color: #625969;
  font-size: 0.91em;
  font-style: italic;
  line-height: 1.6;
}

.reader-page .editorial-synopsis--chapter {
  margin: -0.15em 0 1.8em;
}

.reader-page .editorial-synopsis--prologue,
.reader-page .editorial-synopsis--work {
  margin: -0.2em 0 2.1em;
  text-align: center;
}

.reader-page .section-paragraph {
  position: relative;
}

.reader-page .poetic-stanza {
  white-space: pre-line;
}

.section-number {
  position: absolute;
  top: 0.12em;
  right: calc(100% + 12px);
  color: #8d8396;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58em;
  font-weight: 760;
  line-height: 1;
}

.reader-page .editorial-note {
  padding: 1.1em 1.25em;
  border-left: 3px solid var(--purple);
  background: var(--purple-soft);
  color: #4c4357;
  font-size: 0.91em;
}

.reader-page .source-record {
  padding: 1.1em 1.25em;
  border-left: 3px solid var(--purple);
  background: var(--purple-soft);
  color: #4c4357;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72em;
  line-height: 1.65;
  white-space: pre-line;
}

.reader-page .source-transcription {
  padding: 1.2em 1.35em;
  border: 1px solid #e2dccf;
  border-radius: 8px;
  background: #fbfaf6;
  color: #342d39;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.72em;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.reader-page .source-marker {
  display: none;
}

.migne-apparatus {
  margin: 0 0 2.6em;
  padding: 0;
  border: 1px solid #dcd6e5;
  border-radius: 10px;
  background: #faf8fd;
  overflow: hidden;
}

.migne-apparatus > summary {
  position: sticky;
  top: 0;
  padding: 13px 16px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  cursor: pointer;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.migne-apparatus > :not(summary) {
  margin-right: 18px;
  margin-left: 18px;
}

.migne-apparatus > :last-child {
  margin-bottom: 20px;
}

.reader-page .source-endmark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 3em;
  color: #8e8793;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.6em;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.reader-page .source-endmark::before,
.reader-page .source-endmark::after {
  height: 1px;
  flex: 1;
  background: #ddd7ca;
  content: "";
}

.loading-state,
.error-state,
.empty-pane {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(rgb(255 255 255 / 63%), rgb(255 255 255 / 63%)),
    repeating-linear-gradient(135deg, #f0edf2 0 12px, #ece9ef 12px 24px);
  text-align: center;
}

.empty-pane {
  grid-row: 2;
  border: 2px dashed transparent;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.empty-card,
.status-card {
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 255 255 / 90%);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 17px;
  background: var(--purple-soft);
  color: var(--purple);
}

.empty-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.empty-card h2,
.status-card h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
}

.empty-card p,
.status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.empty-card .primary-action,
.status-card .primary-action {
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: var(--purple);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 16px;
  border: 3px solid #ddd7ee;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.drawer-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0 0 0 var(--rail-width);
  background: rgb(22 15 34 / 22%);
  backdrop-filter: blur(1px);
}

.library-drawer,
.music-drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  bottom: 0;
  left: var(--rail-width);
  display: grid;
  overflow: hidden;
  border-right: 1px solid var(--line-strong);
  background: #fcfbf8;
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(-100% - 18px));
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 220ms cubic-bezier(.22, .8, .3, 1),
    visibility 0s linear 220ms;
}

.library-drawer {
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  width: var(--drawer-width);
}

.music-drawer {
  grid-template-rows: auto minmax(0, 1fr);
  width: var(--music-drawer-width);
}

.music-drawer.has-lyrics {
  width: min(920px, calc(100vw - var(--rail-width)));
}

.library-drawer.is-open,
.music-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 22px 16px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 580;
}

.drawer-header-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: #514b58;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.music-collapse-icon {
  display: none;
}

.library-search {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  margin: 0 22px 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: white;
}

.library-search:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 16%, transparent);
}

.library-search svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: #766f7d;
}

.library-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.library-search input::placeholder {
  color: #9a949f;
}

.library-language-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  gap: 4px;
  margin: 0 22px 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f1edf5;
}

.library-language-filter label {
  min-width: 0;
  cursor: pointer;
}

.library-language-filter input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.library-language-filter span {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #6d6674;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.library-language-filter input:checked + span {
  border-color: #d8d0e6;
  background: white;
  color: var(--purple);
  box-shadow: 0 1px 3px rgb(42 30 64 / 10%);
}

.library-language-filter input:focus-visible + span {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.library-summary {
  min-height: 26px;
  padding: 0 24px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.library-list {
  min-height: 0;
  padding: 0 12px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}

.library-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 2px;
}

.library-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 74px;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.library-item:hover,
.library-item:focus-visible {
  border-color: #ddd7eb;
  background: var(--purple-soft);
}

.library-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.library-item:disabled:hover {
  border-color: transparent;
  background: transparent;
}

.library-info-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-self: center;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #70677d;
  cursor: pointer;
}

.library-info-button:hover,
.library-info-button:focus-visible {
  border-color: #d6cdea;
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.library-info-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.book-glyph {
  position: relative;
  display: grid;
  width: 35px;
  height: 47px;
  place-items: center;
  border-radius: 3px 7px 7px 3px;
  background: linear-gradient(145deg, var(--purple), var(--purple-dark));
  color: white;
  box-shadow: inset 4px 0 0 rgb(255 255 255 / 14%), 0 4px 9px rgb(33 24 55 / 14%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.book-glyph::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 8px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.library-item-copy {
  min-width: 0;
}

.library-item-copy strong,
.library-item-copy span {
  display: block;
}

.library-item-copy strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-copy .english-title {
  margin-top: 2px;
  overflow: hidden;
  color: #6b6471;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-copy .source-line {
  margin-top: 6px;
  color: #928b97;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.open-indicator {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--purple);
  font-size: 17px;
  box-shadow: 0 0 0 1px #dcd5e9;
}

.library-empty {
  padding: 38px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.drawer-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  color: #89828e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.citation-preview-dialog {
  position: fixed;
  top: 12px;
  left: 12px;
  width: min(500px, calc(100vw - 24px));
  max-width: none;
  max-height: min(620px, calc(100dvh - 24px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8d1df;
  border-radius: 16px;
  background: #fcfbf8;
  color: var(--ink);
  box-shadow: 0 24px 72px rgb(17 10 31 / 34%);
}

.citation-preview-dialog::backdrop {
  background: rgb(21 14 33 / 36%);
  backdrop-filter: blur(2px);
}

.citation-preview-shell {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.citation-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 0%, rgb(96 72 170 / 13%), transparent 40%),
    #fffefa;
}

.citation-preview-header > div {
  min-width: 0;
}

.citation-preview-header h2 {
  margin: 1px 0 0;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 580;
  line-height: 1.08;
}

.citation-preview-location {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.citation-preview-location[hidden] {
  display: none;
}

.citation-preview-body {
  min-height: 0;
  padding: 18px 22px 22px;
  overflow: auto;
  overscroll-behavior: contain;
}

.citation-preview-reference,
.citation-preview-excerpt-label {
  margin: 0;
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.citation-preview-locators {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.citation-preview-locators[hidden] {
  display: none;
}

.citation-preview-locator-map {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #ded7e5;
  border-radius: 10px;
  background: #f8f5fb;
}

.citation-preview-locator-map p {
  display: grid;
  grid-template-columns: minmax(122px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.citation-preview-locator-map span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.citation-preview-locator-map strong {
  overflow-wrap: anywhere;
  color: var(--purple-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 600;
}

.citation-preview-locator-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.citation-preview-reference[hidden] {
  display: none;
}

.citation-preview-excerpt-label {
  margin-top: 15px;
  color: #827a88;
}

.citation-preview-passages {
  display: grid;
  gap: 18px;
}

.citation-preview-passage + .citation-preview-passage {
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.citation-preview-passage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.citation-preview-passage-header .citation-preview-excerpt-label {
  margin-top: 0;
}

.citation-preview-passage-open {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cfc7d6;
  border-radius: 999px;
  background: #fff;
  color: var(--purple-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
}

.citation-preview-passage-open:hover {
  border-color: var(--purple);
  background: #f7f2fb;
}

.citation-preview-passage-open:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--purple) 25%, transparent);
  outline-offset: 2px;
}

.citation-preview-status {
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
}

.citation-preview-body blockquote {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}

.citation-preview-passage.is-compact blockquote {
  margin-top: 0;
}

.citation-preview-body blockquote p {
  margin: 0;
  color: #302b34;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
  white-space: pre-line;
}

.citation-preview-body blockquote p.citation-preview-empty-passage {
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-style: italic;
}

.citation-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 22px max(13px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fffefa;
}

.citation-preview-actions > p,
.citation-preview-actions strong,
.citation-preview-actions span {
  display: block;
  margin: 0;
}

.citation-preview-actions strong {
  color: #514a56;
  font-size: 10px;
  font-weight: 760;
}

.citation-preview-actions > p > span {
  margin-top: 2px;
  color: #8d8592;
  font-size: 9px;
}

.citation-preview-actions .work-info-primary-action {
  min-width: 94px;
}

.citation-preview-actions .work-info-primary-action:disabled {
  border-color: #bcb5c4;
  background: #bcb5c4;
  cursor: wait;
}

.work-info-dialog {
  position: fixed;
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(780px, calc(100dvh - 32px));
  inset: 0;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8d1df;
  border-radius: 20px;
  background: #fcfbf8;
  color: var(--ink);
  box-shadow: 0 30px 90px rgb(17 10 31 / 34%);
}

.work-info-dialog::backdrop {
  background: rgb(21 14 33 / 48%);
  backdrop-filter: blur(3px);
}

.work-info-shell {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.work-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 0%, rgb(96 72 170 / 13%), transparent 38%),
    #fffefa;
}

.work-info-header > div {
  min-width: 0;
}

.work-info-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 580;
  line-height: 1.08;
}

.work-info-original-title {
  margin: 7px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.35;
}

.work-info-body {
  min-height: 0;
  padding: 22px 26px 30px;
  overflow: auto;
  overscroll-behavior: contain;
}

.work-info-section + .work-info-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.work-info-section h3 {
  margin: 0 0 12px;
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-info-overview {
  margin: 0;
  color: #39333e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.62;
}

.work-info-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.work-info-facts > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2dde7;
  border-radius: 11px;
  background: white;
}

.work-info-facts dt {
  color: #8a8290;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.work-info-facts dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: #3d3742;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.48;
}

.work-info-edition .work-info-facts > div:nth-child(3),
.work-info-edition .work-info-facts > div:nth-child(4) {
  grid-column: 1 / -1;
}

.work-info-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 3px solid color-mix(in srgb, var(--purple) 52%, white);
  border-radius: 0 10px 10px 0;
  background: #f3f0f8;
}

.work-info-note h4 {
  margin: 0 0 5px;
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-info-note p {
  margin: 0;
  color: #55505c;
  font-size: 12px;
  line-height: 1.55;
}

.work-info-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.work-info-link {
  display: grid;
  min-width: 0;
  min-height: 62px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #ded8e7;
  border-radius: 11px;
  background: white;
  color: var(--purple-dark);
  text-decoration: none;
}

.work-info-link:hover,
.work-info-link:focus-visible {
  border-color: #bdb0dc;
  background: var(--purple-soft);
}

.work-info-link strong,
.work-info-link small {
  display: block;
}

.work-info-link strong {
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.work-info-link small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.work-info-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.work-info-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 26px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fffefa;
}

.work-info-primary-action,
.work-info-secondary-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.work-info-primary-action {
  border: 1px solid var(--purple);
  background: var(--purple);
  color: white;
}

.work-info-primary-action:hover {
  background: var(--purple-dark);
}

.work-info-secondary-action {
  border: 1px solid #c9bfdd;
  background: white;
  color: var(--purple-dark);
}

.work-info-secondary-action:hover {
  background: var(--purple-soft);
}

.study-info-version {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.study-info-header h2:focus {
  outline: none;
}

.study-info-body {
  display: grid;
  align-content: start;
  gap: 26px;
}

.study-info-description {
  margin: 0;
  color: #39333e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.62;
}

.study-methods {
  min-height: 82px;
  overflow: hidden;
  border: 1px solid #d9d2e2;
  border-radius: 15px;
  background: white;
}

.study-methods[open] {
  display: grid;
  height: max-content;
}

.study-methods > summary {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: center;
  padding: 14px 52px 14px 18px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.study-methods > summary::-webkit-details-marker {
  display: none;
}

.study-methods > summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform 150ms ease;
}

.study-methods[open] > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.study-methods > summary:hover,
.study-methods > summary:focus-visible {
  background: var(--purple-soft);
}

.study-methods > summary:focus-visible {
  outline: 3px solid rgb(91 60 169 / 32%);
  outline-offset: -3px;
}

.study-methods-summary,
.study-methods-summary > span,
.study-methods-summary small {
  display: block;
  min-width: 0;
}

.study-methods-kicker {
  color: var(--purple-dark);
  font-size: 9px;
  font-weight: 840;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.study-methods-title {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 620;
  line-height: 1.13;
}

.study-methods-summary small {
  margin-top: 5px;
  color: #514a56;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.study-methods-content {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.study-methods-lead {
  margin: 0;
  color: #39333e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
}

.study-methods-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.study-methods-item {
  padding: 14px;
  border: 1px solid #e5e0e8;
  border-radius: 12px;
  background: #fcfbfd;
}

.study-methods-item dt {
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 840;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.study-methods-item dd {
  margin: 6px 0 0;
}

.study-methods-item p,
.study-methods-rights {
  margin: 0;
  color: #514a56;
  font-size: 12px;
  line-height: 1.58;
}

.study-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.study-resource-links a {
  display: inline-flex;
  min-height: 40px;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid #d8cfeb;
  border-radius: 10px;
  background: white;
  color: var(--purple-dark);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.study-resource-links a:hover,
.study-resource-links a:focus-visible {
  border-color: var(--purple);
  background: var(--purple-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.study-resource-links a:focus-visible {
  outline: 3px solid rgb(91 60 169 / 28%);
  outline-offset: 2px;
}

.study-resource-links a span {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}

.study-replication {
  padding: 16px;
  border-radius: 13px;
  background: var(--purple-soft);
}

.study-replication h4 {
  margin: 0;
  color: var(--purple-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 620;
}

.study-replication ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: #514a56;
  font-size: 12px;
  line-height: 1.52;
}

.study-replication strong {
  color: var(--ink);
}

.study-methods-rights {
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.study-info-release-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.study-info-section-heading p,
.study-info-section-heading h3 {
  margin: 0;
}

.study-info-section-heading p {
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.study-info-section-heading h3 {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 580;
  line-height: 1.12;
}

.release-history-note {
  margin: 10px 0 0;
  color: #655e69;
  font-size: 11px;
  line-height: 1.55;
}

.release-notes-list {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.release-entry {
  overflow: hidden;
  border: 1px solid #e2dde7;
  border-radius: 13px;
  background: white;
}

article.release-entry {
  padding: 17px 18px 18px;
}

.release-entry.is-latest {
  border-color: #c9bcea;
  background:
    radial-gradient(circle at 100% 0%, rgb(96 72 170 / 13%), transparent 42%),
    #f6f2ff;
  box-shadow: inset 4px 0 0 var(--purple);
}

.release-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.release-entry-header strong,
.release-entry summary strong {
  color: var(--purple-dark);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.release-latest-label {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--purple);
  color: white;
  font-size: 8px;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.release-entry h4 {
  margin: 13px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 620;
  line-height: 1.2;
}

.release-entry ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 19px;
  color: #514a56;
  font-size: 12px;
  line-height: 1.55;
}

.release-entry summary {
  position: relative;
  display: flex;
  min-height: 66px;
  align-items: center;
  padding: 12px 46px 12px 16px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.release-entry summary::-webkit-details-marker {
  display: none;
}

.release-entry summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform 150ms ease;
}

.release-entry[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.release-entry summary span,
.release-entry summary small {
  display: block;
  min-width: 0;
}

.release-entry summary small {
  margin-top: 4px;
  color: #39333e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.25;
}

.release-entry summary:hover,
.release-entry summary:focus-visible {
  background: var(--purple-soft);
}

.release-entry-details {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.release-entry-details p {
  margin: 0;
  color: #514a56;
  font-size: 12px;
  line-height: 1.58;
}

.study-info-actions {
  align-items: center;
  justify-content: space-between;
}

.study-info-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.study-info-actions p strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.study-info-actions .work-info-primary-action {
  min-width: 108px;
}

.music-loading {
  display: grid;
  min-height: 0;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.music-loading .loading-spinner {
  margin-bottom: 8px;
}

.music-loading strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
}

.music-loading > span:not(.loading-spinner) {
  max-width: 28em;
}

.music-loading .primary-action {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--purple);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.music-app-surface {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.music-drawer.has-lyrics .music-app-surface {
  grid-template-columns: minmax(310px, 430px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.music-mobile-tabs {
  display: none;
}

.music-mobile-tab {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6f6877;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  touch-action: manipulation;
}

.music-mobile-tab[aria-pressed="true"] {
  background: white;
  color: var(--purple-dark);
  box-shadow: 0 2px 9px rgb(33 24 55 / 10%);
}

.music-browser {
  grid-row: 1;
  grid-column: 1;
  min-width: 0;
  min-height: 0;
  padding: 0 18px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.music-lyrics-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-row: 1 / 3;
  grid-column: 2;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 82% 5%, rgb(241 228 102 / 13%), transparent 24%),
    #fffefa;
}

.music-lyrics-header {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 254 250 / 96%);
}

.music-lyrics-header p,
.music-lyrics-header h2 {
  margin: 0;
}

.music-lyrics-header > div {
  min-width: 0;
  flex: 1;
}

.music-title-action-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.music-title-action-row .music-scroll-title {
  flex: 1;
}

.music-lyrics-header p {
  color: var(--purple);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.music-lyrics-header h2 {
  max-width: 25ch;
  margin-top: 3px;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 620;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-lyrics-header .music-title-action-row {
  max-width: calc(25ch + 52px);
  margin-top: 3px;
}

.music-lyrics-header .music-title-action-row h2 {
  margin-top: 0;
}

.music-lyrics-header h2.music-scroll-title,
.now-playing-copy h2.music-scroll-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-song-info-link {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfc5ed;
  border-radius: 10px;
  background: #fff;
  color: var(--purple);
  box-shadow: 0 2px 8px rgb(38 27 65 / 7%);
  text-decoration: none;
  touch-action: manipulation;
}

.music-song-info-link[hidden] {
  display: none;
}

.music-song-info-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.music-song-info-link:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.music-song-info-link:focus-visible {
  border-color: var(--purple);
  outline: 3px solid rgb(91 55 183 / 22%);
  outline-offset: 2px;
}

.music-scroll-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-title-scroll-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.music-scroll-title.is-title-overflowing {
  text-overflow: clip;
}

.music-scroll-title.is-title-overflowing .music-title-scroll-text {
  max-width: none;
  overflow: visible;
  animation: music-title-scroll var(--music-title-scroll-duration) linear 0.6s infinite alternate;
  text-overflow: clip;
  will-change: transform;
}

.music-drawer:not(.is-open) .music-title-scroll-text {
  animation-play-state: paused;
}

@keyframes music-title-scroll {
  0%,
  16% {
    transform: translateX(0);
  }

  84%,
  100% {
    transform: translateX(calc(var(--music-title-scroll-distance) * -1));
  }
}

.music-lyrics-follow {
  min-width: 70px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cfc5ed;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  touch-action: manipulation;
}

.music-lyrics-follow:hover {
  border-color: var(--purple);
  background: #ece6fb;
}

.music-lyrics-status {
  display: grid;
  min-height: 0;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.music-lyrics-status strong {
  max-width: 28ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.music-lyrics-scroll {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 36%;
  scrollbar-gutter: stable;
}

.music-lyrics-content {
  padding: 32px 28px 52px;
}

.music-lyric-section {
  margin: 30px 10px 8px;
  color: var(--purple);
  font-size: 9px;
  font-weight: 840;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.music-lyric-section:first-child {
  margin-top: 2px;
}

.music-lyric-section.is-spoken::after {
  content: "Spoken";
  display: inline-block;
  margin-left: 7px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #f1edf7;
  color: #726881;
  font-size: 7px;
  letter-spacing: 0.06em;
  vertical-align: 1px;
}

.music-lyric-line {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #716b73;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 520;
  line-height: 1.45;
  text-align: left;
  text-wrap: pretty;
  touch-action: manipulation;
  transition: color 150ms ease, background 150ms ease, opacity 150ms ease;
  user-select: none;
}

.music-lyric-line:hover,
.music-lyric-line:focus-visible {
  background: rgb(81 58 168 / 7%);
  color: var(--ink);
}

.music-lyric-line.is-active {
  background: rgb(81 58 168 / 10%);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--purple);
}

.music-view-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 10px;
  background: linear-gradient(#fcfbf8 76%, rgb(252 251 248 / 92%) 90%, transparent);
}

.music-view-copy {
  min-width: 0;
  flex: 1;
}

.music-view-copy p,
.music-view-copy h2 {
  margin: 0;
}

.music-view-copy p {
  overflow: hidden;
  color: var(--purple);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.music-view-copy h2 {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.music-back-button,
.music-shuffle-button,
.music-play-album-button,
.music-control-button,
.music-play-button,
.music-mode-button,
.music-volume-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  touch-action: manipulation;
}

.music-back-button,
.music-shuffle-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  color: #514b58;
  font-size: 10px;
  font-weight: 760;
}

.music-back-button {
  padding: 0 10px;
}

.music-shuffle-button {
  padding: 0 11px;
}

.music-back-button svg,
.music-shuffle-button svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: currentColor;
}

.music-back-button:hover,
.music-shuffle-button:hover,
.music-shuffle-button[aria-pressed="true"] {
  border-color: #cfc5ed;
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.music-album-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px 13px;
  padding: 2px;
}

.music-album-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.music-album-card:hover,
.music-album-card:focus-visible {
  border-color: #dcd5ea;
  background: var(--purple-soft);
  transform: translateY(-2px);
}

.music-album-card:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.55;
}

.music-album-card:disabled:hover {
  border-color: transparent;
  background: transparent;
  transform: none;
}

.music-album-art,
.music-album-hero-art,
.now-playing-cover {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgb(255 238 88 / 50%), transparent 23%),
    linear-gradient(145deg, var(--purple), var(--purple-dark));
  color: white;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%), 0 7px 18px rgb(33 24 55 / 15%);
}

.music-album-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
}

.music-album-hero-art {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 12px;
}

.music-album-art img,
.music-album-hero-art img,
.now-playing-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-album-art img.is-loading,
.music-album-hero-art img.is-loading,
.now-playing-cover img.is-loading {
  opacity: 0;
}

.music-art-fallback {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 9px rgb(0 0 0 / 25%);
}

.music-album-card-copy,
.music-album-card-copy strong,
.music-album-card-copy span {
  display: block;
  min-width: 0;
}

.music-album-card-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 640;
  line-height: 1.27;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.music-album-card-copy span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.025em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.music-album-detail {
  padding: 2px;
}

.music-album-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 5px 0 20px;
  border-bottom: 1px solid var(--line);
}

.music-album-hero h3,
.music-album-hero p {
  margin: 0;
}

.music-album-hero h3 {
  display: -webkit-box;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.music-album-hero p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.music-play-album-button {
  margin-top: 12px;
  padding: 0 14px;
  border-color: var(--purple);
  border-radius: 10px;
  background: var(--purple);
  color: white;
  font-size: 11px;
  font-weight: 780;
}

.music-play-album-button:hover {
  border-color: var(--purple-dark);
  background: var(--purple-dark);
}

.music-track-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.music-track-list li + li {
  border-top: 1px solid #ebe7ee;
}

.music-track-button {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.music-track-button:hover,
.music-track-button.is-current {
  background: var(--purple-soft);
}

.music-track-button.is-current {
  box-shadow: inset 3px 0 0 var(--purple);
}

.music-track-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.music-track-number {
  color: #918a98;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-align: center;
}

.music-track-name {
  min-width: 0;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 610;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-track-status {
  color: var(--purple);
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.now-playing {
  position: relative;
  z-index: 3;
  grid-row: 2;
  grid-column: 1;
  min-width: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line-strong);
  background:
    linear-gradient(145deg, rgb(255 255 255 / 96%), rgb(247 244 251 / 98%)),
    white;
  box-shadow: 0 -10px 28px rgb(31 22 48 / 9%);
}

.now-playing-summary {
  display: grid;
  min-width: 0;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.now-playing-cover {
  width: 54px;
  height: 54px;
  border-radius: 9px;
}

.now-playing-cover span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.now-playing-copy {
  min-width: 0;
}

.now-playing-copy .music-title-action-row {
  margin-top: 2px;
}

.now-playing-copy p,
.now-playing-copy h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-copy > p:first-child {
  color: var(--purple);
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.now-playing-copy h2 {
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 640;
}

.now-playing-copy .music-title-action-row h2 {
  margin-top: 0;
}

.now-playing-copy .music-song-info-link {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.now-playing-copy .music-song-info-link svg {
  width: 15px;
  height: 15px;
}

.now-playing-copy > p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.music-progress-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.music-progress-row > span {
  color: #756e7c;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.music-progress-row > span:last-child {
  text-align: right;
}

.music-progress-row input,
.music-volume-control input {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  accent-color: var(--purple);
  cursor: pointer;
}

.music-progress-row input:disabled {
  cursor: default;
  opacity: 0.45;
}

.music-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: -3px;
}

.music-control-button,
.music-play-button,
.music-volume-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #4c4653;
}

.music-control-button:hover,
.music-volume-button:hover {
  border-color: #cfc5ed;
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.music-control-button:disabled,
.music-play-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.music-control-button svg,
.music-play-button svg,
.music-volume-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.music-play-button {
  width: 52px;
  height: 52px;
  border-color: var(--purple);
  background: var(--purple);
  color: white;
  box-shadow: 0 7px 16px rgb(80 58 168 / 24%);
}

.music-play-button:hover:not(:disabled) {
  border-color: var(--purple-dark);
  background: var(--purple-dark);
}

.music-play-button .pause-icon {
  display: none;
}

.music-play-button.is-playing .play-icon {
  display: none;
}

.music-play-button.is-playing .pause-icon {
  display: block;
}

.music-mode-row {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(44px, 1fr)) minmax(98px, 1.7fr);
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.music-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 10px;
  color: #6d6674;
  font-size: 8px;
  font-weight: 780;
}

.music-mode-button span:first-child {
  color: var(--purple);
  font-size: 12px;
  line-height: 1;
}

.music-mode-button:hover,
.music-mode-button[aria-pressed="true"] {
  border-color: #c9bee9;
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.music-mode-button[aria-pressed="true"] {
  box-shadow: inset 0 -2px 0 var(--purple);
}

.music-volume-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.music-volume-button {
  flex: none;
  border-color: transparent;
  background: transparent;
}

.music-volume-button.is-muted {
  color: var(--danger);
}

.layout-menu {
  position: fixed;
  z-index: 80;
  top: 98px;
  left: calc(var(--rail-width) + 10px);
  width: 278px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgb(255 255 255 / 98%);
  box-shadow: var(--shadow-lg);
}

.menu-label {
  margin: 2px 8px 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.layout-option {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.layout-option:hover {
  background: #f4f1f7;
}

.layout-option[aria-checked="true"] {
  border-color: #d8d0ef;
  background: var(--purple-soft);
}

.layout-option strong,
.layout-option small {
  display: block;
}

.layout-option strong {
  font-size: 12px;
}

.layout-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.layout-preview {
  display: grid;
  width: 44px;
  height: 34px;
  gap: 3px;
  padding: 4px;
  border: 1px solid #aaa3b4;
  border-radius: 5px;
  background: white;
}

.layout-preview i {
  display: block;
  border-radius: 2px;
  background: #d8d2df;
}

.preview-single {
  grid-template: 1fr / 1fr;
}

.preview-vertical {
  grid-template: 1fr 1fr / 1fr;
}

.preview-horizontal {
  grid-template: 1fr / 1fr 1fr;
}

.layout-option[aria-checked="true"] .layout-preview {
  border-color: var(--purple);
}

.layout-option[aria-checked="true"] .layout-preview i {
  background: color-mix(in srgb, var(--purple) 62%, white);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 15px;
  border-radius: 10px;
  background: #211a35;
  color: white;
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 650;
}

.reader-page::selection,
.reader-page ::selection {
  background: color-mix(in srgb, var(--purple) 32%, #fff4a8);
  color: #17121f;
}

.reader-page [data-copy-role="source"] {
  user-select: text;
  -webkit-user-select: text;
}

.reader-page .source-sentence {
  border-radius: 0.12em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.reader-page .source-sentence.is-source-selected {
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  box-shadow: inset 0 -0.09em color-mix(in srgb, var(--purple) 18%, transparent);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--purple) 82%, var(--ink));
  text-underline-offset: 0.2em;
  /* Keep the default slice behavior so Chrome preserves the existing line breaks at larger text sizes. */
}

.study-app.is-narration-mode .reader-page .source-sentence {
  cursor: pointer;
}

.study-app.is-narration-mode {
  --source-copy-dock-offset: 146px;
}

.source-copy-popover {
  position: fixed;
  z-index: 55;
  right: auto;
  bottom: calc(var(--source-copy-dock-offset) + max(14px, env(safe-area-inset-bottom)));
  left: calc(var(--rail-width) + ((100vw - var(--rail-width)) / 2));
  display: grid;
  width: min(720px, calc(100vw - var(--rail-width) - 28px));
  max-width: calc(100vw - var(--rail-width) - 28px);
  min-height: 58px;
  grid-template-columns: minmax(120px, 1fr) auto 38px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--line-strong));
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--purple-soft) 72%, transparent), transparent 48%),
    rgb(255 254 250 / 98%);
  box-shadow: 0 16px 44px rgb(26 17 43 / 22%);
  color: var(--ink);
  transform: translateX(-50%);
  animation: source-copy-enter 150ms ease-out both;
  user-select: none;
  -webkit-user-select: none;
}

@keyframes source-copy-enter {
  from {
    opacity: 0;
    translate: 0 6px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

.source-copy-summary {
  min-width: 0;
  padding: 1px 5px 1px 7px;
}

.source-copy-summary span,
.source-copy-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-copy-summary span {
  margin-bottom: 2px;
  color: var(--purple);
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-copy-summary strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.source-copy-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.source-copy-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--purple);
  border-radius: 10px;
  background: var(--purple);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  touch-action: manipulation;
  white-space: nowrap;
}

.source-copy-button:hover,
.source-copy-button:focus-visible {
  border-color: var(--purple-dark);
  background: var(--purple-dark);
}

.source-copy-button-secondary {
  border-color: var(--line-strong);
  background: color-mix(in srgb, white 74%, var(--purple-soft));
  color: var(--purple-dark);
}

.source-copy-button-secondary:hover,
.source-copy-button-secondary:focus-visible {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.source-copy-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.source-copy-button svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}

.source-copy-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, white 76%, var(--purple-soft));
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
}

.source-copy-close:hover,
.source-copy-close:focus-visible {
  border-color: var(--line-strong);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.source-copy-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@container (max-width: 700px) {
  .document-toolbar {
    gap: 6px;
    padding-inline: 9px;
  }

  .document-identity {
    min-width: 0;
    max-width: none;
  }

  .location-label {
    display: none;
  }

  .document-actions-row .outline-select {
    width: auto;
    min-width: 88px;
    flex: 1 1 130px;
    margin: 0 auto 0 0;
  }

  .move-pane-button span {
    display: none;
  }

  .bible-toolbar .document-actions-row {
    flex-wrap: wrap;
  }

  .bible-toolbar .document-identity {
    flex: 1;
  }

  .bible-navigation {
    width: 100%;
    flex: 1 0 100%;
  }

  .bible-book-field {
    width: auto;
    flex: 1;
  }
}

@container (max-width: 460px) {
  .linked-scroll-badge {
    width: 28px;
    min-width: 28px;
    justify-content: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .document-identity {
    min-width: 0;
    max-width: none;
  }

  .document-identity strong {
    max-width: 56%;
  }

  .document-identity .document-source-line {
    display: block;
  }

  .reader-page .work-title {
    font-size: 1.8em;
    line-height: 1.08;
  }

}

@media (max-width: 980px) {
  :root {
    --rail-width: 68px;
  }

  .document-toolbar {
    gap: 8px;
    padding-inline: 10px;
  }

  .location-label {
    display: none;
  }

  .document-actions-row .outline-select {
    margin: 0 auto 0 0;
  }

  .move-pane-button span {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --rail-width: 58px;
  }

  .study-app.is-narration-mode {
    --source-copy-dock-offset: 192px;
  }

  .source-copy-popover {
    top: auto;
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(var(--source-copy-dock-offset) + max(8px, env(safe-area-inset-bottom)));
    left: calc(var(--rail-width) + 8px);
    width: auto;
    max-width: none;
    min-height: 108px;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-rows: auto auto;
    gap: 7px;
    padding: 7px;
    border-radius: 13px;
    transform: none;
  }

  .source-copy-summary {
    grid-row: 1;
    grid-column: 1;
    padding-left: 6px;
  }

  .source-copy-summary strong {
    font-size: 12px;
  }

  .source-copy-actions {
    display: grid;
    grid-row: 2;
    grid-column: 1 / -1;
    grid-template-columns: minmax(92px, 0.8fr) minmax(142px, 1.2fr);
  }

  .source-copy-button {
    width: 100%;
    min-height: 44px;
    padding-inline: 11px;
  }

  .source-copy-close {
    grid-row: 1;
    grid-column: 2;
    width: 42px;
    height: 44px;
  }

  .study-app {
    min-height: 420px;
  }

  .tool-rail {
    padding: 8px 5px;
  }

  .rail-button {
    min-height: 56px;
  }

  .rail-button span {
    font-size: 8px;
  }

  .workspace[data-layout="vertical"] {
    grid-template: minmax(0, var(--split-percent)) 9px minmax(0, 1fr) / minmax(0, 1fr);
  }

  .workspace[data-layout="horizontal"] {
    grid-template: minmax(0, 1fr) / minmax(0, var(--split-percent)) 9px minmax(0, 1fr);
  }

  .workspace[data-layout="vertical"] .empty-pane {
    overflow: auto;
    padding: 8px;
  }

  .workspace[data-layout="vertical"] .empty-card {
    padding: 12px;
  }

  .workspace[data-layout="vertical"] .empty-icon {
    display: none;
  }

  .workspace[data-layout="vertical"] .empty-card h2 {
    font-size: 16px;
  }

  .workspace[data-layout="vertical"] .empty-card p {
    font-size: 11px;
  }

  .workspace[data-layout="vertical"] .empty-card .primary-action {
    min-height: 36px;
    margin-top: 8px;
  }

  .study-pane {
    grid-template-rows: 42px minmax(0, 1fr);
  }

  .tab-strip {
    padding: 5px 5px 0;
  }

  .document-tab {
    flex-basis: 210px;
    height: 36px;
  }

  .document-toolbar {
    min-height: 88px;
    gap: 6px;
    padding: 6px 8px;
  }

  .narration-launch-button {
    width: auto;
    min-width: 58px;
    grid-template-columns: 15px auto;
    gap: 4px;
    padding: 0 7px;
  }

  .narration-launch-button span {
    display: inline;
  }

  .narration-launch-button i {
    display: none;
  }

  .bible-toolbar .document-actions-row {
    row-gap: 6px;
  }

  .document-identity {
    min-width: 0;
    max-width: none;
    flex: 1;
  }

  .document-identity strong {
    max-width: 56%;
    font-size: 13px;
  }

  .document-identity span,
  .document-identity a {
    font-size: 8px;
  }

  .document-actions-row {
    gap: 6px;
  }

  .document-actions-row .outline-select {
    width: auto;
    min-width: 68px;
    flex: 1 1 100px;
    padding: 0 24px 0 8px;
    background: white;
    color: #423e47;
  }

  .toolbar-button {
    width: 32px;
    min-width: 32px;
    padding-inline: 0;
  }

  .work-info-toolbar-button {
    width: 34px;
  }

  .bible-select {
    min-height: 38px;
  }

  .move-pane-button {
    min-width: 38px;
    padding: 0 10px;
  }

  .reader-page {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 34px 24px 72px 35px;
    border: 0;
    box-shadow: none;
    font-size: calc(17px * var(--reader-scale));
  }

  .reader-provenance-chain {
    border-radius: 12px;
  }

  .reader-provenance-chain-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 14px;
  }

  .reader-provenance-chain-summary::after {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .reader-provenance-chain-direction {
    grid-row: 2;
    grid-column: 1;
    text-align: left;
  }

  .reader-provenance-chain-body {
    padding: 16px 14px;
  }

  .reader-provenance-stage {
    padding-left: 25px;
  }

  .reader-provenance-stage:not(:last-child)::after {
    left: 8px;
  }

  .section-number {
    right: calc(100% + 8px);
  }

  .library-drawer,
  .music-drawer {
    width: calc(100vw - var(--rail-width));
  }

  .citation-preview-dialog {
    top: auto !important;
    right: 6px;
    bottom: max(6px, env(safe-area-inset-bottom));
    left: 6px !important;
    width: calc(100vw - 12px);
    max-height: min(660px, calc(100dvh - 12px));
    border-radius: 19px 19px 12px 12px;
  }

  .citation-preview-header {
    padding: 18px 18px 14px;
  }

  .citation-preview-header h2 {
    font-size: 27px;
  }

  .citation-preview-body {
    padding: 16px 18px 22px;
  }

  .citation-preview-body blockquote p {
    font-size: 16px;
    line-height: 1.62;
  }

  .citation-preview-actions {
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }

  .citation-preview-actions .work-info-primary-action {
    min-height: 44px;
  }

  .work-info-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    inset: auto 6px max(6px, env(safe-area-inset-bottom)) 6px;
    margin: 0;
    border-radius: 19px 19px 12px 12px;
  }

  .work-info-header {
    padding: 19px 18px 14px;
  }

  .work-info-header h2 {
    font-size: 27px;
  }

  .work-info-body {
    padding: 18px 18px 26px;
  }

  .work-info-facts,
  .work-info-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-info-edition .work-info-facts > div:nth-child(3),
  .work-info-edition .work-info-facts > div:nth-child(4) {
    grid-column: auto;
  }

  .work-info-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }

  .work-info-actions:not(.has-companion) .work-info-primary-action {
    grid-column: 1 / -1;
  }

  .study-info-actions {
    display: flex;
    grid-template-columns: none;
  }

  .study-info-actions .work-info-primary-action {
    grid-column: auto;
  }

  .study-methods > summary {
    min-height: 86px;
    padding-inline: 15px 46px;
  }

  .study-methods {
    min-height: 86px;
  }

  .study-methods > summary::after {
    right: 17px;
  }

  .study-methods-content {
    padding: 14px;
  }

  .study-methods-item {
    padding: 13px;
  }

  .study-resource-links a {
    min-height: 44px;
  }

  .music-drawer.has-lyrics {
    width: calc(100vw - var(--rail-width));
  }

  .music-drawer.has-lyrics .music-app-surface {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .music-mobile-tabs:not([hidden]) {
    display: grid;
    grid-row: 1;
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0 14px 8px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f1edf5;
  }

  .music-drawer.has-lyrics .music-browser,
  .music-drawer.has-lyrics .music-lyrics-panel {
    grid-row: 2;
    grid-column: 1;
  }

  .music-drawer.has-lyrics .now-playing {
    grid-row: 3;
    grid-column: 1;
  }

  .music-app-surface.is-mobile-lyrics .music-browser {
    display: none;
  }

  .music-app-surface:not(.is-mobile-lyrics) .music-lyrics-panel {
    display: none;
  }

  .music-lyrics-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .music-lyrics-header {
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    align-content: start;
    gap: 0;
    padding: 8px 14px;
  }

  .music-lyrics-header p {
    display: none;
  }

  .music-lyrics-header > div,
  .music-lyrics-header .music-title-action-row {
    width: 100%;
  }

  .music-lyrics-header .music-title-action-row {
    max-width: none;
    margin-top: 0;
    align-items: center;
  }

  .music-lyrics-header h2 {
    max-width: none;
    font-size: 18px;
  }

  .music-lyrics-follow {
    width: min(calc(100% - 52px), 280px);
    margin-top: 4px;
    justify-self: start;
    border-radius: 9px;
  }

  .music-lyrics-content {
    padding: 24px 16px 48px;
  }

  .music-lyric-line {
    padding-inline: 9px;
    font-size: 18px;
  }

  .music-drawer .drawer-header {
    padding: 18px 16px 11px;
  }

  .music-drawer .drawer-header h1 {
    font-size: 26px;
  }

  .music-browser {
    padding: 0 14px 18px;
    scrollbar-gutter: auto;
  }

  .music-view-header {
    min-height: 66px;
    gap: 8px;
  }

  .music-shuffle-button {
    padding-inline: 9px;
  }

  .music-album-list {
    gap: 13px 9px;
  }

  .music-album-card {
    gap: 7px;
    padding: 6px;
  }

  .music-album-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
  }

  .music-album-hero-art {
    width: 92px;
  }

  .music-album-hero h3 {
    font-size: 16px;
  }

  .now-playing {
    padding: 12px 14px 13px;
  }

  .music-mode-row {
    grid-template-columns: repeat(3, minmax(44px, 1fr)) minmax(88px, 1.45fr);
    gap: 4px;
    margin-top: 8px;
  }

  .layout-menu {
    top: 76px;
    left: calc(var(--rail-width) + 6px);
    width: min(278px, calc(100vw - var(--rail-width) - 12px));
  }

  .study-app.is-narration-mode .reader-scroller {
    padding-bottom: calc(204px + env(safe-area-inset-bottom));
  }

  .narration-dock {
    min-height: 192px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "summary close"
      "progress progress"
      "transport transport";
    justify-content: stretch;
    gap: 4px 10px;
    padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) 10px;
  }

  .narration-hint {
    display: none;
  }

  .narration-dock-summary {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .narration-dock-art {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .narration-dock-art svg {
    width: 24px;
    height: 24px;
  }

  .narration-dock-copy p {
    display: none;
  }

  .narration-dock-copy strong {
    margin-top: 0;
    font-size: 15px;
  }

  .narration-dock-copy small {
    font-size: 9px;
  }

  .narration-progress-row {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 7px;
  }

  .narration-progress-row span {
    font-size: 9px;
  }

  .narration-transport {
    gap: 16px;
  }

  .narration-close-button {
    width: 40px;
    height: 40px;
    align-self: start;
  }

  .narration-skip-button {
    width: 50px;
    height: 50px;
  }

  .narration-play-button {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 340px) {
  .source-copy-summary span {
    display: none;
  }

  .source-copy-actions {
    grid-template-columns: 1fr;
  }

  .source-copy-popover {
    min-height: 158px;
  }
}

@container (max-width: 240px) {
  .document-toolbar {
    gap: 4px;
    padding-inline: 4px;
  }

  .document-identity {
    display: flex;
  }

  .document-identity strong {
    max-width: 52%;
    font-size: 11px;
  }

  .document-identity .document-source-line {
    display: block;
    font-size: 7px;
  }

  .document-actions-row {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .document-actions-row::-webkit-scrollbar {
    display: none;
  }

  .toolbar-group {
    display: inline-flex;
  }

  .toolbar-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding-inline: 0;
  }

  .document-actions-row .outline-select {
    width: 68px;
    min-width: 68px;
    flex: none;
  }

  .bible-toolbar .document-actions-row {
    align-content: start;
    flex-wrap: wrap;
  }

  .bible-navigation {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .bible-book-field {
    width: 100%;
    grid-column: 1 / -1;
  }

  .bible-chapter-field,
  .bible-verse-field {
    width: 100%;
  }

  .move-pane-button {
    min-width: 30px;
    padding-inline: 6px;
  }

  .reader-page {
    padding: 20px 8px 48px 16px;
    font-size: calc(15px * var(--reader-scale));
    overflow-wrap: anywhere;
  }

  .reader-page .bible-verse {
    padding-left: 1.55em;
    text-indent: -1.55em;
    overflow-wrap: normal;
  }

  .verse-number {
    min-width: 1.55em;
    padding-right: 0.3em;
  }

  .bible-chapter-navigation {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .bible-chapter-button:last-child {
    text-align: left;
  }

  .reader-page .work-title {
    font-size: 1.7em;
  }

  .section-number {
    right: calc(100% + 4px);
  }

  .loading-state,
  .error-state,
  .empty-pane {
    overflow: auto;
    padding: 8px;
  }

  .empty-card,
  .status-card {
    padding: 12px 8px;
  }

  .empty-icon {
    display: none;
  }

  .empty-card h2,
  .status-card h2 {
    font-size: 16px;
  }

  .empty-card p,
  .status-card p {
    font-size: 11px;
  }

  .empty-card .primary-action,
  .status-card .primary-action {
    min-height: 36px;
    margin-top: 8px;
    padding-inline: 8px;
  }
}

@container (max-width: 145px) {
  .move-pane-button {
    display: none;
  }
}

@container (max-width: 105px) {
  .outline-select {
    display: none;
  }
}

@container (max-width: 80px) {
  .toolbar-group {
    flex-direction: column;
  }

  .toolbar-button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .toolbar-button:last-child {
    border-bottom: 0;
  }
}

@media (max-height: 480px) {
  .tool-rail {
    overflow-y: auto;
    scrollbar-width: none;
  }

  .tool-rail::-webkit-scrollbar {
    display: none;
  }

  .rail-actions {
    flex: none;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .study-app {
    min-height: 0;
  }

  .study-app.is-narration-mode {
    --source-copy-dock-offset: 134px;
  }

  .rail-actions {
    gap: 2px;
  }

  .rail-button {
    min-height: 48px;
  }

  .music-drawer .drawer-header {
    padding-block: 10px 7px;
  }

  .music-drawer .drawer-header .eyebrow {
    display: none;
  }

  .music-drawer .drawer-header h1 {
    font-size: 23px;
  }

  .music-view-header {
    min-height: 56px;
  }

  .now-playing {
    padding-block: 9px 10px;
  }

  .now-playing-summary {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .now-playing-cover {
    width: 44px;
    height: 44px;
  }

  .music-progress-row {
    margin-top: 0;
  }

  .music-transport {
    margin-top: -7px;
  }

  .music-play-button {
    width: 48px;
    height: 48px;
  }

  .music-mode-row {
    margin-top: 5px;
  }

  .study-app.is-narration-mode .reader-scroller {
    padding-bottom: calc(146px + env(safe-area-inset-bottom));
  }

  .narration-dock {
    min-height: 134px;
    grid-template-columns: minmax(130px, 210px) minmax(200px, 1fr) auto;
    grid-template-areas:
      "summary progress close"
      "summary transport close";
    justify-content: stretch;
    gap: 2px 14px;
    padding-block: 7px max(7px, env(safe-area-inset-bottom));
  }

  .narration-hint {
    display: none;
  }

  .narration-dock-summary {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
  }

  .narration-dock-art {
    width: 40px;
    height: 40px;
  }

  .narration-dock-copy p {
    display: none;
  }

  .narration-dock-copy strong {
    margin-top: 0;
    font-size: 14px;
  }

  .narration-progress-row input[type="range"] {
    height: 36px;
  }

  .narration-transport {
    gap: 10px;
  }

  .narration-skip-button {
    width: 40px;
    height: 40px;
  }

  .narration-play-button {
    width: 48px;
    height: 48px;
  }

  .narration-close-button {
    width: 36px;
    height: 36px;
  }
}

@media (max-height: 280px) and (orientation: landscape) {
  .study-app.is-narration-mode {
    --source-copy-dock-offset: 94px;
  }

  .tool-rail {
    padding-block: 4px;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .tool-rail::-webkit-scrollbar {
    display: none;
  }

  .rail-button {
    position: relative;
    min-height: 40px;
    gap: 0;
    padding-block: 3px;
  }

  .rail-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .study-app.is-narration-mode .reader-scroller {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .narration-dock {
    min-height: 94px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "progress close"
      "transport transport";
    padding-block: 4px max(4px, env(safe-area-inset-bottom));
  }

  .narration-dock-summary {
    display: none;
  }

  .narration-progress-row input[type="range"] {
    height: 30px;
  }

  .narration-skip-button {
    width: 34px;
    height: 34px;
  }

  .narration-play-button {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .music-rail-button.is-playing .music-playing-dot {
    animation: none;
  }

  .music-scroll-title.is-title-overflowing {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .music-scroll-title.is-title-overflowing .music-title-scroll-text {
    max-width: 100%;
    overflow: hidden;
    animation: none;
    text-overflow: ellipsis;
    transform: none;
    white-space: nowrap;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #aca4b3;
    --line-strong: #817787;
  }

  .document-tab[aria-selected="true"],
  .study-pane.is-active-pane {
    box-shadow: inset 0 0 0 2px var(--purple);
  }

  .music-mode-button[aria-pressed="true"],
  .music-track-button.is-current {
    box-shadow: inset 0 0 0 2px var(--purple);
  }
}

body.study-fullscreen-open {
  overflow: hidden;
}

.study-app.is-fullscreen,
.study-app:fullscreen,
.study-app:-webkit-full-screen {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  background: var(--canvas);
}

.study-app:fullscreen::backdrop {
  background: var(--canvas);
}

.study-app.is-fullscreen .tool-rail,
.study-app:fullscreen .tool-rail,
.study-app:-webkit-full-screen .tool-rail {
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  padding-left: max(8px, env(safe-area-inset-left));
}

.study-app.is-fullscreen .workspace,
.study-app:fullscreen .workspace,
.study-app:-webkit-full-screen .workspace {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 720px) {
  .study-app.is-fullscreen .tool-rail,
  .study-app:fullscreen .tool-rail,
  .study-app:-webkit-full-screen .tool-rail {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(5px, env(safe-area-inset-left));
  }
}

body.music-fullscreen-open {
  overflow: hidden;
}

body.music-fullscreen-open .drawer-backdrop {
  display: none !important;
}

.music-drawer.is-fullscreen,
.music-drawer:fullscreen {
  z-index: 100;
  inset: 0;
  width: 100vw !important;
  max-width: none;
  height: 100dvh;
  border: 0;
  background: #fcfbf8;
  box-shadow: none;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: none;
}

.music-drawer.is-fullscreen .music-expand-icon,
.music-drawer:fullscreen .music-expand-icon {
  display: none;
}

.music-drawer.is-fullscreen .music-collapse-icon,
.music-drawer:fullscreen .music-collapse-icon {
  display: block;
}

.music-drawer.is-fullscreen .drawer-header,
.music-drawer:fullscreen .drawer-header {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-right: max(22px, env(safe-area-inset-right));
  padding-left: max(22px, env(safe-area-inset-left));
}

.music-drawer.is-fullscreen .music-browser,
.music-drawer:fullscreen .music-browser {
  padding-right: max(18px, env(safe-area-inset-right));
  padding-left: max(18px, env(safe-area-inset-left));
}

.music-drawer.is-fullscreen .music-lyrics-content,
.music-drawer:fullscreen .music-lyrics-content {
  padding-right: max(28px, env(safe-area-inset-right));
  padding-bottom: max(52px, env(safe-area-inset-bottom));
  padding-left: max(28px, env(safe-area-inset-left));
}

.music-drawer.is-fullscreen .music-lyrics-header,
.music-drawer:fullscreen .music-lyrics-header {
  padding-right: max(24px, env(safe-area-inset-right));
  padding-left: max(24px, env(safe-area-inset-left));
}

.music-drawer.is-fullscreen .music-lyrics-status,
.music-drawer:fullscreen .music-lyrics-status {
  padding-right: max(30px, env(safe-area-inset-right));
  padding-left: max(30px, env(safe-area-inset-left));
}

.music-drawer.is-fullscreen .now-playing,
.music-drawer:fullscreen .now-playing {
  padding-right: max(18px, env(safe-area-inset-right));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(18px, env(safe-area-inset-left));
}

.music-drawer.is-fullscreen:not(.has-lyrics) .music-album-list,
.music-drawer:fullscreen:not(.has-lyrics) .music-album-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.music-drawer.is-fullscreen:not(.has-lyrics) .now-playing-summary,
.music-drawer.is-fullscreen:not(.has-lyrics) .music-progress-row,
.music-drawer.is-fullscreen:not(.has-lyrics) .music-transport,
.music-drawer.is-fullscreen:not(.has-lyrics) .music-mode-row,
.music-drawer:fullscreen:not(.has-lyrics) .now-playing-summary,
.music-drawer:fullscreen:not(.has-lyrics) .music-progress-row,
.music-drawer:fullscreen:not(.has-lyrics) .music-transport,
.music-drawer:fullscreen:not(.has-lyrics) .music-mode-row {
  width: min(100%, 760px);
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 720px) {
  .music-drawer.is-fullscreen,
  .music-drawer:fullscreen {
    left: 0;
    width: 100vw !important;
  }

  .music-drawer.is-fullscreen .drawer-header,
  .music-drawer:fullscreen .drawer-header {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .music-drawer.is-fullscreen .music-browser,
  .music-drawer:fullscreen .music-browser {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .music-drawer.is-fullscreen .music-lyrics-header,
  .music-drawer:fullscreen .music-lyrics-header {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .music-drawer.is-fullscreen .music-lyrics-content,
  .music-drawer:fullscreen .music-lyrics-content {
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .music-drawer.is-fullscreen .now-playing,
  .music-drawer:fullscreen .now-playing {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }
}

@supports not (height: 100dvh) {
  .study-app.is-fullscreen,
  .study-app:fullscreen,
  .study-app:-webkit-full-screen,
  .music-drawer.is-fullscreen,
  .music-drawer:fullscreen {
    height: 100vh;
  }
}

/* The saved Study theme is applied on <html> before this stylesheet loads so
   returning dark-mode readers never see a bright intermediate frame. */
html[data-study-theme="dark"] {
  --ink: #f3eef7;
  --muted: #b7adbd;
  --line: #3b3444;
  --line-strong: #574c61;
  --paper: #1c1921;
  --canvas: #0f0d14;
  --canvas-warm: #14111a;
  --purple: #b9a7ff;
  --purple-dark: #d8cfff;
  --purple-soft: #2d2646;
  --rail: #171221;
  --rail-soft: #3a3052;
  --danger: #ff8d9c;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 32%);
  --shadow-lg: 0 22px 60px rgb(0 0 0 / 52%);
  color-scheme: dark;
}

.theme-toggle-button {
  margin-top: auto;
}

.study-fullscreen-button {
  margin-top: 0;
}

html[data-study-theme="dark"] .skip-link {
  background: var(--paper);
  color: var(--purple-dark);
}

html[data-study-theme="dark"] .pane-divider {
  background: #3c3543;
}

html[data-study-theme="dark"] .pane-divider:hover,
html[data-study-theme="dark"] .pane-divider:focus-visible,
html[data-study-theme="dark"] .pane-divider.is-dragging {
  background: #5c43ba;
}

html[data-study-theme="dark"] .tab-strip {
  background: #18151d;
}

html[data-study-theme="dark"] .tab-strip.is-drop-target,
html[data-study-theme="dark"] .study-pane.is-drop-target .empty-pane {
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .document-tab {
  color: var(--muted);
}

html[data-study-theme="dark"] .document-tab:hover {
  background: rgb(255 255 255 / 7%);
  color: var(--ink);
}

html[data-study-theme="dark"] .document-tab[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
}

html[data-study-theme="dark"] .tab-close {
  color: var(--muted);
}

html[data-study-theme="dark"] .tab-close:hover {
  background: #302a36;
  color: var(--danger);
}

html[data-study-theme="dark"] .document-toolbar,
html[data-study-theme="dark"] .music-lyrics-header {
  background: rgb(28 25 33 / 97%);
}

html[data-study-theme="dark"] .outline-select,
html[data-study-theme="dark"] .bible-select,
html[data-study-theme="dark"] .toolbar-group,
html[data-study-theme="dark"] .toolbar-button,
html[data-study-theme="dark"] .work-info-toolbar-button,
html[data-study-theme="dark"] .move-pane-button,
html[data-study-theme="dark"] .icon-button,
html[data-study-theme="dark"] .library-search,
html[data-study-theme="dark"] .music-back-button,
html[data-study-theme="dark"] .music-shuffle-button,
html[data-study-theme="dark"] .music-control-button,
html[data-study-theme="dark"] .music-mode-button {
  background: #27232d;
  color: var(--ink);
}

html[data-study-theme="dark"] .work-info-toolbar-button {
  color: var(--purple);
}

html[data-study-theme="dark"] .reader-scroller {
  scrollbar-color: #5b5263 transparent;
}

html[data-study-theme="dark"] .reader-page {
  border-color: #37313d;
  box-shadow: 0 5px 28px rgb(0 0 0 / 24%);
  color: var(--ink);
}

html[data-study-theme="dark"] .reader-page::selection,
html[data-study-theme="dark"] .reader-page ::selection {
  background: #5c43ba;
  color: white;
}

html[data-study-theme="dark"] .reader-page .source-sentence.is-source-selected {
  background: rgb(133 108 214 / 22%);
  box-shadow: inset 0 -0.09em rgb(177 157 239 / 22%);
  text-decoration-color: #b49df2;
}

html[data-study-theme="dark"] .source-copy-popover {
  border-color: var(--line-strong);
  background:
    radial-gradient(circle at 8% 0%, rgb(133 108 214 / 18%), transparent 48%),
    rgb(28 25 33 / 98%);
  box-shadow: 0 16px 44px rgb(0 0 0 / 48%);
}

html[data-study-theme="dark"] .source-copy-button {
  border-color: #5c43ba;
  background: #5c43ba;
  color: white;
}

html[data-study-theme="dark"] .source-copy-button:hover,
html[data-study-theme="dark"] .source-copy-button:focus-visible {
  border-color: #49349a;
  background: #49349a;
}

html[data-study-theme="dark"] .source-copy-button-secondary {
  border-color: var(--line-strong);
  background: #27232d;
  color: #d8cafb;
}

html[data-study-theme="dark"] .source-copy-button-secondary:hover,
html[data-study-theme="dark"] .source-copy-button-secondary:focus-visible {
  border-color: #8065d4;
  background: #332c43;
  color: white;
}

html[data-study-theme="dark"] .source-copy-close {
  border-color: var(--line);
  background: #27232d;
  color: var(--muted);
}

html[data-study-theme="dark"] .source-copy-close:hover,
html[data-study-theme="dark"] .source-copy-close:focus-visible {
  border-color: var(--line-strong);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

html[data-study-theme="dark"] .reader-page .work-title,
html[data-study-theme="dark"] .reader-page h2,
html[data-study-theme="dark"] .reader-page h4,
html[data-study-theme="dark"] .reader-page h5 {
  color: var(--ink);
}

html[data-study-theme="dark"] .reader-page .translation-note,
html[data-study-theme="dark"] .reader-provenance,
html[data-study-theme="dark"] .bible-chapter-button,
html[data-study-theme="dark"] .reader-page .source-transcription,
html[data-study-theme="dark"] .migne-apparatus {
  border-color: var(--line);
  background: #242029;
  color: var(--ink);
}

html[data-study-theme="dark"] .reader-provenance-body,
html[data-study-theme="dark"] .reader-page .bible-chapter-title,
html[data-study-theme="dark"] .reader-page h2 {
  border-color: var(--line);
}

html[data-study-theme="dark"] .bible-edition-note,
html[data-study-theme="dark"] .verse-number,
html[data-study-theme="dark"] .reader-page .book-summary,
html[data-study-theme="dark"] .reader-page .editorial-synopsis,
html[data-study-theme="dark"] .section-number,
html[data-study-theme="dark"] .reader-page .source-endmark {
  color: var(--muted);
}

html[data-study-theme="dark"] .reader-page .editorial-note,
html[data-study-theme="dark"] .reader-page .source-record {
  background: var(--purple-soft);
  color: #e5deeb;
}

html[data-study-theme="dark"] .reader-page .source-endmark::before,
html[data-study-theme="dark"] .reader-page .source-endmark::after {
  background: var(--line);
}

html[data-study-theme="dark"] .narration-sentence-play-button {
  border-color: var(--line-strong);
}

html[data-study-theme="dark"] .narration-launch-button i {
  background: #5c43ba;
}

html[data-study-theme="dark"] .narration-launch-button:hover,
html[data-study-theme="dark"] .narration-launch-button.is-active {
  color: #251b36;
}

html[data-study-theme="dark"] .loading-state,
html[data-study-theme="dark"] .error-state,
html[data-study-theme="dark"] .empty-pane {
  background:
    linear-gradient(rgb(15 13 20 / 72%), rgb(15 13 20 / 72%)),
    repeating-linear-gradient(135deg, #1c1822 0 12px, #17141c 12px 24px);
}

html[data-study-theme="dark"] .empty-card,
html[data-study-theme="dark"] .status-card {
  background: rgb(33 29 39 / 96%);
}

html[data-study-theme="dark"] .loading-spinner {
  border-color: #443a54;
  border-top-color: var(--purple);
}

html[data-study-theme="dark"] .library-drawer,
html[data-study-theme="dark"] .music-drawer,
html[data-study-theme="dark"] .music-drawer.is-fullscreen,
html[data-study-theme="dark"] .music-drawer:fullscreen {
  background: var(--paper);
}

html[data-study-theme="dark"] .library-search svg {
  fill: var(--muted);
}

html[data-study-theme="dark"] .library-search input::placeholder {
  color: #8f8696;
}

html[data-study-theme="dark"] .library-language-filter,
html[data-study-theme="dark"] .music-mobile-tabs:not([hidden]) {
  background: #24202a;
}

html[data-study-theme="dark"] .library-language-filter span,
html[data-study-theme="dark"] .music-mobile-tab {
  color: var(--muted);
}

html[data-study-theme="dark"] .library-language-filter input:checked + span,
html[data-study-theme="dark"] .music-mobile-tab[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: #302a38;
  color: var(--purple-dark);
  box-shadow: 0 1px 3px rgb(0 0 0 / 26%);
}

html[data-study-theme="dark"] .library-item:hover,
html[data-study-theme="dark"] .library-item:focus-visible,
html[data-study-theme="dark"] .library-info-button:hover,
html[data-study-theme="dark"] .library-info-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .library-info-button,
html[data-study-theme="dark"] .library-item-copy .english-title,
html[data-study-theme="dark"] .library-item-copy .source-line,
html[data-study-theme="dark"] .drawer-footer {
  color: var(--muted);
}

html[data-study-theme="dark"] .open-indicator {
  background: #28232e;
  color: var(--purple);
  box-shadow: 0 0 0 1px var(--line-strong);
}

html[data-study-theme="dark"] .citation-preview-dialog,
html[data-study-theme="dark"] .work-info-dialog {
  border-color: var(--line-strong);
  background: var(--paper);
}

html[data-study-theme="dark"] .citation-preview-header,
html[data-study-theme="dark"] .work-info-header {
  background:
    radial-gradient(circle at 92% 0%, rgb(155 128 255 / 12%), transparent 40%),
    var(--paper);
}

html[data-study-theme="dark"] .citation-preview-excerpt-label,
html[data-study-theme="dark"] .citation-preview-actions > p > span,
html[data-study-theme="dark"] .work-info-facts dt {
  color: var(--muted);
}

html[data-study-theme="dark"] .citation-preview-body blockquote p,
html[data-study-theme="dark"] .citation-preview-actions strong,
html[data-study-theme="dark"] .work-info-overview,
html[data-study-theme="dark"] .work-info-facts dd,
html[data-study-theme="dark"] .work-info-note p {
  color: var(--ink);
}

html[data-study-theme="dark"] .citation-preview-actions,
html[data-study-theme="dark"] .work-info-actions {
  background: var(--paper);
}

html[data-study-theme="dark"] .citation-preview-actions .work-info-primary-action:disabled {
  border-color: #514a57;
  background: #514a57;
  color: #a9a1ad;
}

html[data-study-theme="dark"] .work-info-facts > div,
html[data-study-theme="dark"] .work-info-link {
  border-color: var(--line);
  background: #242029;
}

html[data-study-theme="dark"] .work-info-note {
  border-left-color: var(--purple);
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .work-info-link:hover,
html[data-study-theme="dark"] .work-info-link:focus-visible {
  border-color: var(--purple);
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .work-info-secondary-action {
  border-color: var(--line-strong);
  background: #27232d;
  color: var(--purple-dark);
}

html[data-study-theme="dark"] .study-info-description,
html[data-study-theme="dark"] .study-methods-lead,
html[data-study-theme="dark"] .study-methods-summary small,
html[data-study-theme="dark"] .study-methods-item p,
html[data-study-theme="dark"] .study-methods-rights,
html[data-study-theme="dark"] .study-replication ol,
html[data-study-theme="dark"] .release-entry summary small,
html[data-study-theme="dark"] .release-entry-details p,
html[data-study-theme="dark"] .release-entry ul,
html[data-study-theme="dark"] .release-history-note {
  color: var(--ink);
}

html[data-study-theme="dark"] .study-methods,
html[data-study-theme="dark"] .study-resource-links a {
  border-color: var(--line);
  background: #242029;
}

html[data-study-theme="dark"] .study-methods-item {
  border-color: var(--line);
  background: #211d26;
}

html[data-study-theme="dark"] .study-methods > summary:hover,
html[data-study-theme="dark"] .study-methods > summary:focus-visible,
html[data-study-theme="dark"] .study-resource-links a:hover,
html[data-study-theme="dark"] .study-resource-links a:focus-visible,
html[data-study-theme="dark"] .study-replication {
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .release-entry {
  border-color: var(--line);
  background: #242029;
}

html[data-study-theme="dark"] .release-entry.is-latest {
  border-color: var(--purple);
  background:
    radial-gradient(circle at 100% 0%, rgb(155 128 255 / 13%), transparent 42%),
    var(--purple-soft);
}

html[data-study-theme="dark"] .release-entry summary:hover,
html[data-study-theme="dark"] .release-entry summary:focus-visible {
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .study-info-actions p strong {
  color: var(--ink);
}

html[data-study-theme="dark"] .music-lyrics-panel {
  background:
    radial-gradient(circle at 82% 5%, rgb(241 228 102 / 8%), transparent 24%),
    var(--paper);
}

html[data-study-theme="dark"] .music-lyrics-follow,
html[data-study-theme="dark"] .music-lyrics-follow:hover {
  border-color: var(--line-strong);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

html[data-study-theme="dark"] .music-song-info-link {
  border-color: var(--line-strong);
  background: var(--purple-soft);
  color: var(--purple-dark);
  box-shadow: none;
}

html[data-study-theme="dark"] .music-song-info-link:hover,
html[data-study-theme="dark"] .music-song-info-link:focus-visible {
  border-color: var(--purple);
  background: #31283f;
  color: #c5b5ff;
}

html[data-study-theme="dark"] .music-lyric-section.is-spoken::after {
  background: #2b2632;
  color: var(--muted);
}

html[data-study-theme="dark"] .music-lyric-line {
  color: var(--muted);
}

html[data-study-theme="dark"] .music-lyric-line:hover,
html[data-study-theme="dark"] .music-lyric-line:focus-visible,
html[data-study-theme="dark"] .music-lyric-line.is-active {
  background: rgb(185 167 255 / 11%);
  color: var(--ink);
}

html[data-study-theme="dark"] .music-view-header {
  background: linear-gradient(var(--paper) 76%, rgb(28 25 33 / 92%) 90%, transparent);
}

html[data-study-theme="dark"] .music-back-button:hover,
html[data-study-theme="dark"] .music-shuffle-button:hover,
html[data-study-theme="dark"] .music-shuffle-button[aria-pressed="true"],
html[data-study-theme="dark"] .music-control-button:hover,
html[data-study-theme="dark"] .music-volume-button:hover,
html[data-study-theme="dark"] .music-mode-button:hover,
html[data-study-theme="dark"] .music-mode-button[aria-pressed="true"],
html[data-study-theme="dark"] .music-album-card:hover,
html[data-study-theme="dark"] .music-album-card:focus-visible,
html[data-study-theme="dark"] .music-track-button:hover,
html[data-study-theme="dark"] .music-track-button.is-current {
  border-color: var(--line-strong);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

html[data-study-theme="dark"] .music-track-list li + li {
  border-color: var(--line);
}

html[data-study-theme="dark"] .music-track-number,
html[data-study-theme="dark"] .music-progress-row > span {
  color: var(--muted);
}

html[data-study-theme="dark"] .now-playing {
  background:
    linear-gradient(145deg, rgb(38 33 45 / 98%), rgb(27 24 32 / 98%)),
    var(--paper);
  box-shadow: 0 -10px 28px rgb(0 0 0 / 28%);
}

html[data-study-theme="dark"] .layout-menu {
  background: rgb(30 27 35 / 98%);
}

html[data-study-theme="dark"] .layout-option:hover {
  background: #29242f;
}

html[data-study-theme="dark"] .layout-option[aria-checked="true"] {
  border-color: var(--line-strong);
  background: var(--purple-soft);
}

html[data-study-theme="dark"] .layout-preview {
  border-color: var(--line-strong);
  background: #242029;
}

html[data-study-theme="dark"] .layout-preview i {
  background: #5b5264;
}

html[data-study-theme="dark"] .layout-option[aria-checked="true"] .layout-preview i {
  background: var(--purple);
}

/* Accent text becomes lighter in dark mode, so filled controls keep a separate
   deep purple that remains readable with white labels. */
html[data-study-theme="dark"] .empty-card .primary-action,
html[data-study-theme="dark"] .status-card .primary-action,
html[data-study-theme="dark"] .work-info-primary-action,
html[data-study-theme="dark"] .music-loading .primary-action,
html[data-study-theme="dark"] .music-play-album-button,
html[data-study-theme="dark"] .music-play-button {
  border-color: #5c43ba;
  background: #5c43ba;
  color: white;
}

html[data-study-theme="dark"] .work-info-primary-action:hover,
html[data-study-theme="dark"] .music-play-album-button:hover,
html[data-study-theme="dark"] .music-play-button:hover:not(:disabled) {
  border-color: #49349a;
  background: #49349a;
}

html[data-study-theme="dark"] .book-glyph,
html[data-study-theme="dark"] .music-album-art,
html[data-study-theme="dark"] .music-album-hero-art,
html[data-study-theme="dark"] .now-playing-cover {
  background:
    radial-gradient(circle at 72% 18%, rgb(255 238 88 / 36%), transparent 23%),
    linear-gradient(145deg, #5c43ba, #32256b);
}

@media (prefers-contrast: more) {
  html[data-study-theme="dark"] {
    --line: #6c6177;
    --line-strong: #93869f;
  }
}

/* The rail button shows the current theme and cycles Light, Dark, and Retro. */
.theme-mode-icon {
  display: none;
}

html:not([data-study-theme]) .theme-light-icon,
html[data-study-theme="light"] .theme-light-icon,
html[data-study-theme="dark"] .theme-dark-icon,
html[data-study-theme="retro"] .theme-retro-icon {
  display: block;
}

/* The deck readout is Retro-only; keeping it absolutely positioned inside the
   existing top padding prevents a theme switch from resizing the player. */
.retro-deck-readout {
  display: none;
}

.now-playing::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
  opacity: 0;
  pointer-events: none;
}

/* Retro Study uses the same neon language as the canonical song-page player:
   cyan, pink and orange light over a midnight studio console. The reading page
   itself deliberately remains a quiet, flat surface. */
html[data-study-theme="retro"] {
  --retro-pink: #ff4fa3;
  --retro-cyan: #49e9ff;
  --retro-orange: #ff9a3d;
  --retro-midnight: #090d25;
  --retro-violet: #1a1236;
  --retro-plum: #210d2f;
  --retro-control: #071022;
  --retro-panel: #0d1025;
  --retro-raised: #121832;
  --retro-deep-pink: #9e175f;
  --ink: #f8fbff;
  --muted: #a9b7d0;
  --line: #29416b;
  --line-strong: #4c6f9f;
  --paper: #0d1025;
  --canvas: #050716;
  --canvas-warm: #090d25;
  --purple: var(--retro-pink);
  --purple-dark: var(--retro-cyan);
  --purple-soft: #21143c;
  --gold: var(--retro-orange);
  --rail: var(--retro-midnight);
  --rail-soft: var(--retro-violet);
  --danger: #ff7c9e;
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 38%);
  --shadow-lg: 0 24px 72px rgb(0 0 0 / 58%);
  color-scheme: dark;
}

html[data-study-theme="retro"] body,
html[data-study-theme="retro"] .study-app {
  background: var(--canvas);
}

html[data-study-theme="retro"] .skip-link {
  border: 1px solid var(--retro-cyan);
  background: var(--retro-control);
  color: var(--retro-cyan);
  box-shadow: 0 0 18px rgb(73 233 255 / 28%);
}

html[data-study-theme="retro"] .tool-rail {
  border-right: 1px solid rgb(73 233 255 / 34%);
  background:
    linear-gradient(rgb(73 233 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 5%) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgb(73 233 255 / 24%), transparent 31%),
    radial-gradient(circle at 50% 100%, rgb(255 79 163 / 20%), transparent 34%),
    linear-gradient(180deg, var(--retro-violet), var(--retro-midnight) 48%, #11091d);
  background-size: 18px 18px, 18px 18px, auto, auto, auto;
  box-shadow:
    3px 0 20px rgb(0 0 0 / 42%),
    1px 0 12px rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .rail-button {
  border: 1px solid transparent;
  color: #bdc9e0;
  text-shadow: 0 0 8px rgb(73 233 255 / 12%);
}

html[data-study-theme="retro"] .rail-button:hover,
html[data-study-theme="retro"] .rail-button:focus-visible,
html[data-study-theme="retro"] .rail-button[aria-expanded="true"],
html[data-study-theme="retro"] .rail-button[aria-pressed="true"],
html[data-study-theme="retro"] .rail-button.is-active {
  border-color: rgb(73 233 255 / 55%);
  background:
    linear-gradient(145deg, rgb(73 233 255 / 13%), rgb(255 79 163 / 11%)),
    var(--retro-violet);
  color: white;
  box-shadow:
    inset 0 0 12px rgb(73 233 255 / 8%),
    0 0 14px rgb(255 79 163 / 12%);
}

html[data-study-theme="retro"] .rail-button span,
html[data-study-theme="retro"] .rail-version {
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

html[data-study-theme="retro"] .rail-version {
  color: #8999bb;
}

html[data-study-theme="retro"] .music-playing-dot {
  border-color: var(--retro-midnight);
  background: var(--retro-cyan);
  box-shadow: 0 0 10px var(--retro-cyan);
}

html[data-study-theme="retro"] .workspace {
  background:
    linear-gradient(rgb(73 233 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 4%) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgb(73 233 255 / 12%), transparent 32%),
    radial-gradient(circle at 90% 100%, rgb(255 79 163 / 10%), transparent 34%),
    var(--canvas);
  background-size: 24px 24px, 24px 24px, auto, auto, auto;
}

html[data-study-theme="retro"] .study-pane {
  background: rgb(7 10 27 / 94%);
}

html[data-study-theme="retro"] .study-pane.is-active-pane {
  box-shadow:
    inset 0 0 0 1px rgb(73 233 255 / 42%),
    inset 0 0 20px rgb(73 233 255 / 4%);
}

html[data-study-theme="retro"] .pane-divider {
  background: linear-gradient(180deg, #172447, #321947, #172447);
  box-shadow: inset 0 0 0 1px rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .pane-divider:hover,
html[data-study-theme="retro"] .pane-divider:focus-visible,
html[data-study-theme="retro"] .pane-divider.is-dragging {
  background: linear-gradient(180deg, var(--retro-cyan), var(--retro-pink));
  box-shadow: 0 0 14px rgb(73 233 255 / 28%);
}

html[data-study-theme="retro"] .tab-strip {
  border-bottom-color: #36557e;
  background:
    linear-gradient(180deg, rgb(26 18 54 / 96%), rgb(7 10 28 / 98%));
  box-shadow: inset 0 -1px 0 rgb(73 233 255 / 13%);
}

html[data-study-theme="retro"] .tab-strip.is-drop-target,
html[data-study-theme="retro"] .study-pane.is-drop-target .empty-pane {
  background: #171539;
  box-shadow: inset 0 0 0 2px var(--retro-cyan);
}

html[data-study-theme="retro"] .document-tab {
  color: #9eadc8;
}

html[data-study-theme="retro"] .document-tab:hover {
  background: rgb(73 233 255 / 8%);
  color: white;
}

html[data-study-theme="retro"] .document-tab[aria-selected="true"] {
  border-color: #405e8b;
  background:
    linear-gradient(180deg, #171c3b, var(--retro-panel));
  color: white;
  box-shadow:
    inset 0 3px 0 var(--retro-pink),
    inset 0 -1px 0 rgb(73 233 255 / 28%),
    0 -4px 13px rgb(255 79 163 / 10%);
}

html[data-study-theme="retro"] .tab-language {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .tab-close {
  color: #91a1bf;
}

html[data-study-theme="retro"] .tab-close:hover {
  background: rgb(255 79 163 / 12%);
  color: #ff92c5;
}

html[data-study-theme="retro"] .document-shell {
  background: var(--paper);
}

html[data-study-theme="retro"] .document-toolbar,
html[data-study-theme="retro"] .music-lyrics-header {
  border-color: #2e4a73;
  background:
    radial-gradient(circle at 92% 0%, rgb(255 79 163 / 10%), transparent 32%),
    linear-gradient(180deg, rgb(18 24 50 / 98%), rgb(9 13 37 / 98%));
  box-shadow:
    0 1px 0 rgb(73 233 255 / 14%),
    0 6px 20px rgb(0 0 0 / 22%);
}

html[data-study-theme="retro"] .document-identity strong {
  color: #f8fbff;
}

html[data-study-theme="retro"] .document-identity span,
html[data-study-theme="retro"] .document-identity a {
  color: #9cacc8;
}

html[data-study-theme="retro"] .document-identity a:hover,
html[data-study-theme="retro"] .document-identity a:focus-visible,
html[data-study-theme="retro"] .location-label {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .linked-scroll-badge {
  border-color: rgb(73 233 255 / 38%);
  background: rgb(73 233 255 / 8%);
  color: var(--retro-cyan);
  box-shadow: inset 0 0 10px rgb(73 233 255 / 6%);
}

html[data-study-theme="retro"] .linked-scroll-badge::before {
  background: var(--retro-pink);
  box-shadow: 0 0 7px var(--retro-pink);
}

html[data-study-theme="retro"] .outline-select,
html[data-study-theme="retro"] .bible-select,
html[data-study-theme="retro"] .toolbar-group,
html[data-study-theme="retro"] .toolbar-button,
html[data-study-theme="retro"] .work-info-toolbar-button,
html[data-study-theme="retro"] .move-pane-button,
html[data-study-theme="retro"] .icon-button,
html[data-study-theme="retro"] .library-search,
html[data-study-theme="retro"] .music-back-button,
html[data-study-theme="retro"] .music-shuffle-button,
html[data-study-theme="retro"] .music-control-button,
html[data-study-theme="retro"] .music-mode-button {
  border-color: #38577f;
  background:
    linear-gradient(180deg, rgb(22 30 61 / 98%), rgb(8 14 35 / 98%));
  color: #e7f5ff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
}

html[data-study-theme="retro"] .toolbar-button {
  border-right-color: #2d466c;
}

html[data-study-theme="retro"] .toolbar-button:hover,
html[data-study-theme="retro"] .work-info-toolbar-button:hover,
html[data-study-theme="retro"] .move-pane-button:hover,
html[data-study-theme="retro"] .icon-button:hover {
  border-color: var(--retro-cyan);
  background: rgb(73 233 255 / 10%);
  color: var(--retro-cyan);
  box-shadow: inset 0 0 12px rgb(73 233 255 / 8%);
}

html[data-study-theme="retro"] .work-info-toolbar-button {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .bible-select-caption {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .narration-launch-button {
  border-color: rgb(255 79 163 / 66%);
  background:
    linear-gradient(145deg, rgb(255 79 163 / 18%), rgb(73 233 255 / 9%)),
    var(--retro-control);
  color: #f8fbff;
  box-shadow:
    inset 0 0 12px rgb(73 233 255 / 8%),
    0 0 12px rgb(255 79 163 / 10%);
}

html[data-study-theme="retro"] .narration-launch-button i {
  background: var(--retro-orange);
  color: var(--retro-control);
  box-shadow: 0 0 8px rgb(255 154 61 / 48%);
}

html[data-study-theme="retro"] .narration-launch-button:hover,
html[data-study-theme="retro"] .narration-launch-button.is-active {
  border-color: var(--retro-cyan);
  background:
    linear-gradient(145deg, rgb(73 233 255 / 22%), rgb(255 79 163 / 18%)),
    var(--retro-control);
  color: var(--retro-cyan);
}

/* The grid belongs to the studio around the page, never to the prose itself. */
html[data-study-theme="retro"] .reader-scroller {
  background:
    linear-gradient(rgb(73 233 255 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 3.5%) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgb(73 233 255 / 7%), transparent 38%),
    #06091a;
  background-size: 24px 24px, 24px 24px, auto, auto;
  scrollbar-color: #526b94 transparent;
}

html[data-study-theme="retro"] .reader-page {
  border-color: #263f64;
  background: #101327;
  box-shadow:
    0 8px 34px rgb(0 0 0 / 38%),
    0 0 0 1px rgb(73 233 255 / 4%);
  color: #f1f3f8;
}

html[data-study-theme="retro"] .reader-page .work-author {
  color: var(--retro-pink);
  text-shadow: 0 0 12px rgb(255 79 163 / 16%);
}

html[data-study-theme="retro"] .reader-page .work-title,
html[data-study-theme="retro"] .reader-page h2,
html[data-study-theme="retro"] .reader-page h4,
html[data-study-theme="retro"] .reader-page h5 {
  color: #f8fbff;
}

html[data-study-theme="retro"] .reader-page h2,
html[data-study-theme="retro"] .reader-page .bible-chapter-title,
html[data-study-theme="retro"] .reader-provenance-body {
  border-color: #29416b;
}

html[data-study-theme="retro"] .reader-page h3,
html[data-study-theme="retro"] .internal-citation-link,
html[data-study-theme="retro"] .reader-provenance > summary,
html[data-study-theme="retro"] .bible-chapter-button {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .internal-citation-link {
  text-decoration-color: rgb(73 233 255 / 64%);
}

html[data-study-theme="retro"] .internal-citation-link:hover,
html[data-study-theme="retro"] .internal-citation-link:focus-visible {
  background: rgb(255 79 163 / 12%);
  color: #ff88bf;
  text-decoration-color: currentColor;
}

html[data-study-theme="retro"] .reader-page .translation-note,
html[data-study-theme="retro"] .reader-provenance,
html[data-study-theme="retro"] .bible-chapter-button,
html[data-study-theme="retro"] .reader-page .source-transcription,
html[data-study-theme="retro"] .migne-apparatus {
  border-color: #29416b;
  background: #15172e;
  color: #dde4f0;
}

html[data-study-theme="retro"] .migne-apparatus > summary {
  background: #21143c;
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .bible-edition-note,
html[data-study-theme="retro"] .verse-number,
html[data-study-theme="retro"] .reader-page .book-summary,
html[data-study-theme="retro"] .reader-page .editorial-synopsis,
html[data-study-theme="retro"] .section-number,
html[data-study-theme="retro"] .reader-page .source-endmark {
  color: #a9b7d0;
}

html[data-study-theme="retro"] .reader-page .editorial-note,
html[data-study-theme="retro"] .reader-page .source-record {
  border-left-color: var(--retro-pink);
  background: #1d1735;
  color: #e1e3ed;
}

html[data-study-theme="retro"] .reader-page .source-endmark::before,
html[data-study-theme="retro"] .reader-page .source-endmark::after {
  background: #29416b;
}

html[data-study-theme="retro"] .reader-page::selection,
html[data-study-theme="retro"] .reader-page ::selection {
  background: var(--retro-cyan);
  color: var(--retro-control);
}

html[data-study-theme="retro"] .reader-page .source-sentence.is-source-selected {
  background: rgb(255 79 163 / 16%);
  box-shadow: inset 0 -0.09em rgb(73 233 255 / 24%);
  text-decoration-color: var(--retro-cyan);
}

html[data-study-theme="retro"] .is-narration-mode .narration-sentence:hover,
html[data-study-theme="retro"] .is-narration-mode .narration-sentence:focus-visible {
  background: rgb(73 233 255 / 9%);
  box-shadow: 0 0 0 3px rgb(73 233 255 / 8%);
}

html[data-study-theme="retro"] .narration-sentence.is-active-sentence {
  background: rgb(255 154 61 / 13%);
  box-shadow: 0 0 0 3px rgb(255 154 61 / 10%);
}

html[data-study-theme="retro"] .narration-word.is-active-word {
  background: var(--retro-orange);
  color: var(--retro-control);
  box-shadow: 0 0 9px rgb(255 154 61 / 34%);
}

html[data-study-theme="retro"] .narration-sentence-play-button {
  border-color: rgb(73 233 255 / 42%);
  background: rgb(73 233 255 / 8%);
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .loading-state,
html[data-study-theme="retro"] .error-state,
html[data-study-theme="retro"] .empty-pane {
  background:
    linear-gradient(rgb(5 7 22 / 80%), rgb(5 7 22 / 80%)),
    linear-gradient(rgb(73 233 255 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 8%) 1px, transparent 1px),
    var(--canvas);
  background-size: auto, 24px 24px, 24px 24px, auto;
}

html[data-study-theme="retro"] .empty-card,
html[data-study-theme="retro"] .status-card {
  border-color: #38577f;
  background:
    radial-gradient(circle at 80% 0%, rgb(255 79 163 / 10%), transparent 36%),
    rgb(13 16 37 / 96%);
  box-shadow:
    0 18px 45px rgb(0 0 0 / 36%),
    inset 0 1px 0 rgb(73 233 255 / 9%);
}

html[data-study-theme="retro"] .empty-icon {
  background:
    radial-gradient(circle at 70% 20%, rgb(73 233 255 / 28%), transparent 24%),
    linear-gradient(145deg, #32164f, #0b1835);
  color: var(--retro-cyan);
  box-shadow: inset 0 0 0 1px rgb(255 79 163 / 40%);
}

html[data-study-theme="retro"] .loading-spinner {
  border-color: #263c61;
  border-top-color: var(--retro-cyan);
  filter: drop-shadow(0 0 5px rgb(73 233 255 / 36%));
}

html[data-study-theme="retro"] .drawer-backdrop {
  background: rgb(2 3 13 / 64%);
  backdrop-filter: blur(3px);
}

html[data-study-theme="retro"] .library-drawer,
html[data-study-theme="retro"] .music-drawer,
html[data-study-theme="retro"] .music-drawer.is-fullscreen,
html[data-study-theme="retro"] .music-drawer:fullscreen {
  border-right-color: rgb(73 233 255 / 42%);
  background:
    radial-gradient(circle at 14% 0%, rgb(73 233 255 / 11%), transparent 30%),
    radial-gradient(circle at 100% 100%, rgb(255 79 163 / 9%), transparent 34%),
    linear-gradient(145deg, #11152e, #090d25 56%, #180c26);
  box-shadow:
    20px 0 54px rgb(0 0 0 / 54%),
    2px 0 18px rgb(73 233 255 / 12%);
}

html[data-study-theme="retro"] .drawer-header {
  border-bottom-color: rgb(73 233 255 / 18%);
}

html[data-study-theme="retro"] .eyebrow {
  color: var(--retro-orange);
  text-shadow: 0 0 8px rgb(255 154 61 / 28%);
}

html[data-study-theme="retro"] .library-search:focus-within {
  border-color: var(--retro-cyan);
  box-shadow: 0 0 0 3px rgb(73 233 255 / 11%);
}

html[data-study-theme="retro"] .library-search svg {
  fill: var(--retro-cyan);
}

html[data-study-theme="retro"] .library-search input::placeholder {
  color: #7283a6;
}

html[data-study-theme="retro"] .library-language-filter,
html[data-study-theme="retro"] .music-mobile-tabs:not([hidden]) {
  border-color: #29416b;
  background: #090f27;
  box-shadow: inset 0 0 12px rgb(73 233 255 / 4%);
}

html[data-study-theme="retro"] .library-language-filter span,
html[data-study-theme="retro"] .music-mobile-tab {
  color: #9baaca;
}

html[data-study-theme="retro"] .library-language-filter input:checked + span,
html[data-study-theme="retro"] .music-mobile-tab[aria-pressed="true"] {
  border-color: rgb(73 233 255 / 48%);
  background: linear-gradient(145deg, rgb(73 233 255 / 13%), rgb(255 79 163 / 9%));
  color: var(--retro-cyan);
  box-shadow:
    inset 0 -2px 0 var(--retro-pink),
    0 0 12px rgb(73 233 255 / 8%);
}

html[data-study-theme="retro"] .library-summary,
html[data-study-theme="retro"] .drawer-footer {
  color: #8d9bbb;
}

html[data-study-theme="retro"] .library-item:hover,
html[data-study-theme="retro"] .library-item:focus-visible,
html[data-study-theme="retro"] .library-info-button:hover,
html[data-study-theme="retro"] .library-info-button:focus-visible {
  border-color: rgb(73 233 255 / 40%);
  background: linear-gradient(145deg, rgb(73 233 255 / 9%), rgb(255 79 163 / 8%));
}

html[data-study-theme="retro"] .library-info-button {
  color: #9fb0cc;
}

html[data-study-theme="retro"] .library-item-copy .english-title,
html[data-study-theme="retro"] .library-item-copy .source-line {
  color: #91a0bd;
}

html[data-study-theme="retro"] .book-glyph {
  border: 1px solid rgb(73 233 255 / 46%);
  background:
    linear-gradient(145deg, rgb(255 79 163 / 30%), rgb(73 233 255 / 13%)),
    var(--retro-control);
  color: #f8fbff;
  box-shadow:
    inset 4px 0 0 rgb(255 79 163 / 18%),
    0 0 12px rgb(73 233 255 / 12%);
}

html[data-study-theme="retro"] .book-glyph::after {
  background: var(--retro-orange);
  box-shadow: 0 0 5px rgb(255 154 61 / 40%);
}

html[data-study-theme="retro"] .open-indicator {
  background: var(--retro-control);
  color: var(--retro-cyan);
  box-shadow:
    0 0 0 1px #38577f,
    0 0 9px rgb(73 233 255 / 12%);
}

html[data-study-theme="retro"] .citation-preview-dialog,
html[data-study-theme="retro"] .work-info-dialog {
  border-color: rgb(73 233 255 / 48%);
  background: var(--retro-panel);
  box-shadow:
    0 30px 90px rgb(0 0 0 / 66%),
    0 0 24px rgb(255 79 163 / 10%),
    inset 0 0 0 1px rgb(255 79 163 / 10%);
}

html[data-study-theme="retro"] .citation-preview-dialog::backdrop,
html[data-study-theme="retro"] .work-info-dialog::backdrop {
  background: rgb(2 3 13 / 72%);
  backdrop-filter: blur(4px);
}

html[data-study-theme="retro"] .citation-preview-header,
html[data-study-theme="retro"] .work-info-header {
  border-color: #29416b;
  background:
    linear-gradient(rgb(73 233 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 5%) 1px, transparent 1px),
    radial-gradient(circle at 92% 0%, rgb(255 79 163 / 18%), transparent 40%),
    linear-gradient(145deg, #171a3a, #0d1025);
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow: inset 0 2px 0 rgb(255 79 163 / 62%);
}

html[data-study-theme="retro"] .citation-preview-location,
html[data-study-theme="retro"] .citation-preview-excerpt-label,
html[data-study-theme="retro"] .citation-preview-actions > p > span,
html[data-study-theme="retro"] .work-info-original-title,
html[data-study-theme="retro"] .work-info-facts dt {
  color: #9babc7;
}

html[data-study-theme="retro"] .citation-preview-reference,
html[data-study-theme="retro"] .work-info-section h3,
html[data-study-theme="retro"] .study-methods-kicker,
html[data-study-theme="retro"] .study-info-section-heading p {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .citation-preview-locator-map,
html[data-study-theme="retro"] .work-info-facts > div,
html[data-study-theme="retro"] .work-info-link,
html[data-study-theme="retro"] .study-methods,
html[data-study-theme="retro"] .study-resource-links a,
html[data-study-theme="retro"] .release-entry {
  border-color: #29416b;
  background: #13172f;
}

html[data-study-theme="retro"] .citation-preview-locator-map strong {
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .citation-preview-passage-open {
  border-color: #3e5e89;
  background: var(--retro-control);
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .citation-preview-passage-open:hover,
html[data-study-theme="retro"] .citation-preview-passage-open:focus-visible {
  border-color: var(--retro-pink);
  background: rgb(255 79 163 / 10%);
  color: #ff8cc1;
}

html[data-study-theme="retro"] .citation-preview-passage + .citation-preview-passage,
html[data-study-theme="retro"] .work-info-section + .work-info-section {
  border-color: #29416b;
}

html[data-study-theme="retro"] .citation-preview-body blockquote p,
html[data-study-theme="retro"] .citation-preview-actions strong,
html[data-study-theme="retro"] .work-info-overview,
html[data-study-theme="retro"] .work-info-facts dd,
html[data-study-theme="retro"] .work-info-note p,
html[data-study-theme="retro"] .study-info-description,
html[data-study-theme="retro"] .study-methods-lead,
html[data-study-theme="retro"] .study-methods-summary small,
html[data-study-theme="retro"] .study-methods-item p,
html[data-study-theme="retro"] .study-methods-rights,
html[data-study-theme="retro"] .study-replication ol,
html[data-study-theme="retro"] .release-entry summary small,
html[data-study-theme="retro"] .release-entry-details p,
html[data-study-theme="retro"] .release-entry ul,
html[data-study-theme="retro"] .release-history-note {
  color: var(--ink);
}

html[data-study-theme="retro"] .citation-preview-actions,
html[data-study-theme="retro"] .work-info-actions {
  border-color: #29416b;
  background:
    linear-gradient(180deg, #11152d, #090d25);
}

html[data-study-theme="retro"] .citation-preview-actions .work-info-primary-action:disabled {
  border-color: #344866;
  background: #27344e;
  color: #8997ae;
}

html[data-study-theme="retro"] .work-info-note,
html[data-study-theme="retro"] .study-replication {
  border-left-color: var(--retro-pink);
  background: #1d1735;
}

html[data-study-theme="retro"] .work-info-link:hover,
html[data-study-theme="retro"] .work-info-link:focus-visible,
html[data-study-theme="retro"] .study-methods > summary:hover,
html[data-study-theme="retro"] .study-methods > summary:focus-visible,
html[data-study-theme="retro"] .study-resource-links a:hover,
html[data-study-theme="retro"] .study-resource-links a:focus-visible,
html[data-study-theme="retro"] .release-entry summary:hover,
html[data-study-theme="retro"] .release-entry summary:focus-visible {
  border-color: rgb(73 233 255 / 50%);
  background: rgb(73 233 255 / 7%);
}

html[data-study-theme="retro"] .study-methods-item {
  border-color: #29416b;
  background: #0f142b;
}

html[data-study-theme="retro"] .release-entry.is-latest {
  border-color: var(--retro-pink);
  background:
    radial-gradient(circle at 100% 0%, rgb(255 79 163 / 16%), transparent 42%),
    #1d1735;
  box-shadow: inset 0 1px 0 rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .release-latest-label {
  background: var(--retro-orange);
  color: var(--retro-control);
}

html[data-study-theme="retro"] .work-info-secondary-action {
  border-color: #3e5e89;
  background: var(--retro-control);
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .empty-card .primary-action,
html[data-study-theme="retro"] .status-card .primary-action,
html[data-study-theme="retro"] .work-info-primary-action,
html[data-study-theme="retro"] .music-loading .primary-action,
html[data-study-theme="retro"] .music-play-album-button,
html[data-study-theme="retro"] .music-play-button,
html[data-study-theme="retro"] .source-copy-button {
  border-color: var(--retro-cyan);
  background: var(--retro-cyan);
  color: var(--retro-control);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 34%),
    0 0 14px rgb(73 233 255 / 20%);
}

html[data-study-theme="retro"] .empty-card .primary-action:hover,
html[data-study-theme="retro"] .status-card .primary-action:hover,
html[data-study-theme="retro"] .work-info-primary-action:hover,
html[data-study-theme="retro"] .music-loading .primary-action:hover,
html[data-study-theme="retro"] .music-play-album-button:hover,
html[data-study-theme="retro"] .music-play-button:hover:not(:disabled),
html[data-study-theme="retro"] .source-copy-button:hover,
html[data-study-theme="retro"] .source-copy-button:focus-visible {
  border-color: var(--retro-pink);
  background: var(--retro-pink);
  color: var(--retro-control);
  box-shadow: 0 0 17px rgb(255 79 163 / 28%);
}

html[data-study-theme="retro"] .source-copy-popover {
  border-color: rgb(73 233 255 / 58%);
  background:
    linear-gradient(rgb(73 233 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 4%) 1px, transparent 1px),
    radial-gradient(circle at 8% 0%, rgb(255 79 163 / 16%), transparent 48%),
    rgb(9 13 37 / 98%);
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow:
    0 18px 48px rgb(0 0 0 / 56%),
    0 0 18px rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .source-copy-summary span {
  color: var(--retro-pink);
}

html[data-study-theme="retro"] .source-copy-button-secondary {
  border-color: #3e5e89;
  background: var(--retro-control);
  color: var(--retro-cyan);
  box-shadow: inset 0 0 10px rgb(73 233 255 / 5%);
}

html[data-study-theme="retro"] .source-copy-button-secondary:hover,
html[data-study-theme="retro"] .source-copy-button-secondary:focus-visible {
  border-color: var(--retro-pink);
  background: rgb(255 79 163 / 11%);
  color: #ff9ac8;
}

html[data-study-theme="retro"] .source-copy-close {
  border-color: #38577f;
  background: var(--retro-control);
  color: #9cacc8;
}

html[data-study-theme="retro"] .source-copy-close:hover,
html[data-study-theme="retro"] .source-copy-close:focus-visible {
  border-color: var(--retro-cyan);
  background: rgb(73 233 255 / 9%);
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .narration-dock {
  border-top-color: rgb(255 79 163 / 72%);
  background:
    linear-gradient(rgb(73 233 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 6%) 1px, transparent 1px),
    radial-gradient(circle at 15% 0%, rgb(73 233 255 / 24%), transparent 40%),
    linear-gradient(145deg, var(--retro-violet), var(--retro-midnight) 54%, var(--retro-plum));
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow:
    0 -16px 46px rgb(0 0 0 / 44%),
    0 -2px 18px rgb(255 79 163 / 14%),
    inset 0 1px 0 rgb(73 233 255 / 14%);
}

html[data-study-theme="retro"] .narration-dock-art {
  border-color: rgb(73 233 255 / 48%);
  background:
    linear-gradient(145deg, rgb(73 233 255 / 14%), rgb(255 79 163 / 10%)),
    var(--retro-control);
  color: var(--retro-orange);
  box-shadow:
    inset 0 0 12px rgb(73 233 255 / 8%),
    0 0 12px rgb(255 79 163 / 12%);
}

html[data-study-theme="retro"] .narration-dock-copy p {
  color: var(--retro-orange);
  text-shadow: 0 0 8px rgb(255 154 61 / 28%);
}

html[data-study-theme="retro"] .narration-skip-button,
html[data-study-theme="retro"] .narration-close-button {
  border-color: rgb(73 233 255 / 32%);
  background: rgb(7 16 34 / 74%);
}

html[data-study-theme="retro"] .narration-skip-button:hover,
html[data-study-theme="retro"] .narration-close-button:hover {
  border-color: var(--retro-cyan);
  background: rgb(73 233 255 / 10%);
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .narration-play-button {
  border: 1px solid var(--retro-cyan);
  background: var(--retro-cyan);
  color: var(--retro-control);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 48%),
    0 0 19px rgb(73 233 255 / 28%);
}

html[data-study-theme="retro"] .narration-progress-row input[type="range"]::-webkit-slider-runnable-track {
  border-color: rgb(73 233 255 / 24%);
  background: linear-gradient(
    to right,
    var(--retro-cyan) 0,
    var(--retro-pink) var(--narration-progress),
    rgb(169 183 208 / 22%) var(--narration-progress) 100%
  );
  box-shadow: 0 0 8px rgb(73 233 255 / 15%);
}

html[data-study-theme="retro"] .narration-progress-row input[type="range"]::-webkit-slider-thumb {
  border-color: #f8fbff;
  background: var(--retro-pink);
  box-shadow: 0 0 10px rgb(255 79 163 / 52%);
}

html[data-study-theme="retro"] .narration-progress-row input[type="range"]::-moz-range-track {
  border-color: rgb(73 233 255 / 24%);
  background: rgb(169 183 208 / 22%);
}

html[data-study-theme="retro"] .narration-progress-row input[type="range"]::-moz-range-progress {
  background: linear-gradient(90deg, var(--retro-cyan), var(--retro-pink));
}

html[data-study-theme="retro"] .narration-progress-row input[type="range"]::-moz-range-thumb {
  border-color: #f8fbff;
  background: var(--retro-pink);
  box-shadow: 0 0 10px rgb(255 79 163 / 52%);
}

html[data-study-theme="retro"] .music-app-surface {
  background: rgb(7 10 28 / 56%);
}

html[data-study-theme="retro"] .music-browser {
  scrollbar-color: #526b94 transparent;
}

html[data-study-theme="retro"] .music-lyrics-panel {
  border-color: rgb(73 233 255 / 30%);
  background:
    linear-gradient(rgb(73 233 255 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 3.5%) 1px, transparent 1px),
    radial-gradient(circle at 82% 5%, rgb(255 154 61 / 9%), transparent 24%),
    var(--retro-panel);
  background-size: 24px 24px, 24px 24px, auto, auto;
}

html[data-study-theme="retro"] .music-lyrics-header p,
html[data-study-theme="retro"] .music-view-copy p,
html[data-study-theme="retro"] .now-playing-copy > p:first-child,
html[data-study-theme="retro"] .music-track-status {
  color: var(--retro-orange);
  text-shadow: 0 0 8px rgb(255 154 61 / 24%);
}

html[data-study-theme="retro"] .music-lyrics-follow {
  border-color: rgb(73 233 255 / 42%);
  background: var(--retro-control);
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .music-lyrics-follow:hover {
  border-color: var(--retro-pink);
  background: rgb(255 79 163 / 10%);
  color: #ff8fc3;
}

html[data-study-theme="retro"] .music-song-info-link {
  border-color: rgb(73 233 255 / 46%);
  background:
    linear-gradient(145deg, rgb(73 233 255 / 9%), rgb(255 79 163 / 7%)),
    var(--retro-control);
  color: var(--retro-cyan);
  box-shadow:
    inset 0 0 9px rgb(73 233 255 / 7%),
    0 0 10px rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .music-song-info-link:hover,
html[data-study-theme="retro"] .music-song-info-link:focus-visible {
  border-color: var(--retro-pink);
  background: rgb(255 79 163 / 11%);
  color: #ff95c6;
  box-shadow:
    inset 0 0 10px rgb(255 79 163 / 8%),
    0 0 12px rgb(255 79 163 / 14%);
}

html[data-study-theme="retro"] .music-lyric-section {
  border-color: #29416b;
}

html[data-study-theme="retro"] .music-lyric-section.is-spoken::after {
  background: #171b37;
  color: #91a0be;
}

html[data-study-theme="retro"] .music-lyric-line {
  color: #94a3c0;
}

html[data-study-theme="retro"] .music-lyric-line:hover,
html[data-study-theme="retro"] .music-lyric-line:focus-visible {
  background: rgb(73 233 255 / 7%);
  color: #eafaff;
}

html[data-study-theme="retro"] .music-lyric-line.is-active {
  background: linear-gradient(90deg, rgb(73 233 255 / 13%), rgb(255 79 163 / 8%));
  color: #f8fbff;
  box-shadow: inset 3px 0 0 var(--retro-pink);
  text-shadow: 0 0 10px rgb(73 233 255 / 13%);
}

html[data-study-theme="retro"] .music-view-header {
  background: linear-gradient(var(--retro-panel) 76%, rgb(13 16 37 / 92%) 90%, transparent);
}

html[data-study-theme="retro"] .music-back-button:hover,
html[data-study-theme="retro"] .music-shuffle-button:hover,
html[data-study-theme="retro"] .music-shuffle-button[aria-pressed="true"],
html[data-study-theme="retro"] .music-control-button:hover,
html[data-study-theme="retro"] .music-volume-button:hover,
html[data-study-theme="retro"] .music-mode-button:hover,
html[data-study-theme="retro"] .music-mode-button[aria-pressed="true"],
html[data-study-theme="retro"] .music-album-card:hover,
html[data-study-theme="retro"] .music-album-card:focus-visible,
html[data-study-theme="retro"] .music-track-button:hover,
html[data-study-theme="retro"] .music-track-button.is-current {
  border-color: rgb(73 233 255 / 48%);
  background: linear-gradient(145deg, rgb(73 233 255 / 10%), rgb(255 79 163 / 8%));
  color: var(--retro-cyan);
}

html[data-study-theme="retro"] .music-album-card:hover,
html[data-study-theme="retro"] .music-album-card:focus-visible {
  box-shadow:
    0 8px 22px rgb(0 0 0 / 28%),
    0 0 14px rgb(73 233 255 / 8%);
}

html[data-study-theme="retro"] .music-album-art,
html[data-study-theme="retro"] .music-album-hero-art,
html[data-study-theme="retro"] .now-playing-cover {
  border: 1px solid rgb(73 233 255 / 50%);
  background:
    radial-gradient(circle at 72% 18%, rgb(255 154 61 / 32%), transparent 23%),
    linear-gradient(145deg, #44135e, #0d2041);
  color: white;
  box-shadow:
    inset 0 0 0 1px rgb(255 79 163 / 16%),
    0 0 15px rgb(73 233 255 / 14%);
}

html[data-study-theme="retro"] .music-album-art {
  aspect-ratio: 1003 / 1568;
}

html[data-study-theme="retro"] .music-album-hero {
  grid-template-columns: 72px minmax(0, 1fr);
}

html[data-study-theme="retro"] .music-album-hero-art {
  width: 72px;
  aspect-ratio: 1003 / 1568;
}

html[data-study-theme="retro"] .now-playing-summary {
  grid-template-columns: 35px minmax(0, 1fr);
}

html[data-study-theme="retro"] .now-playing-cover {
  width: 35px;
  height: 54px;
}

html[data-study-theme="retro"] .music-album-art img,
html[data-study-theme="retro"] .music-album-hero-art img,
html[data-study-theme="retro"] .now-playing-cover img {
  object-fit: contain;
}

html[data-study-theme="retro"] :is(
  .music-album-art,
  .music-album-hero-art,
  .now-playing-cover
).has-image {
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

html[data-study-theme="retro"] :is(
  .music-album-art,
  .music-album-hero-art,
  .now-playing-cover
).has-image img {
  filter: drop-shadow(0 8px 14px rgb(0 0 0 / 38%));
}

@media (max-height: 620px) and (orientation: landscape) {
  html[data-study-theme="retro"] .now-playing-summary {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  html[data-study-theme="retro"] .now-playing-cover {
    width: 28px;
    height: 44px;
  }
}

html[data-study-theme="retro"] .music-track-list li + li,
html[data-study-theme="retro"] .music-album-hero {
  border-color: #29416b;
}

html[data-study-theme="retro"] .music-track-button.is-current {
  box-shadow:
    inset 3px 0 0 var(--retro-pink),
    inset 0 -1px 0 rgb(73 233 255 / 16%);
}

html[data-study-theme="retro"] .music-track-number,
html[data-study-theme="retro"] .music-progress-row > span {
  color: #a9b7d0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-study-theme="retro"] .now-playing {
  border-top-color: rgb(255 79 163 / 70%);
  background:
    linear-gradient(rgb(73 233 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 6%) 1px, transparent 1px),
    radial-gradient(circle at 12% -30%, rgb(73 233 255 / 24%), transparent 48%),
    linear-gradient(145deg, var(--retro-violet), var(--retro-midnight) 54%, var(--retro-plum));
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow:
    0 -12px 34px rgb(0 0 0 / 38%),
    0 -2px 18px rgb(255 79 163 / 12%),
    inset 0 1px 0 rgb(73 233 255 / 14%);
}

html[data-study-theme="retro"] .now-playing::before {
  background: linear-gradient(
    90deg,
    transparent,
    var(--retro-cyan),
    var(--retro-pink),
    transparent
  );
  box-shadow: 0 0 10px rgb(73 233 255 / 42%);
  opacity: 1;
}

html[data-study-theme="retro"] .retro-deck-readout {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 18px;
  left: 18px;
  display: flex;
  height: 9px;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  color: var(--retro-orange);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1;
  text-shadow: 0 0 7px rgb(255 154 61 / 44%);
  white-space: nowrap;
  pointer-events: none;
}

html[data-study-theme="retro"] .retro-eq {
  display: flex;
  height: 8px;
  flex: none;
  align-items: end;
  gap: 2px;
}

html[data-study-theme="retro"] .retro-eq i {
  display: block;
  width: 2px;
  height: 35%;
  border-radius: 2px;
  background: var(--retro-cyan);
  box-shadow: 0 0 5px rgb(73 233 255 / 58%);
}

html[data-study-theme="retro"] .retro-eq i:nth-child(2) {
  height: 78%;
}

html[data-study-theme="retro"] .retro-eq i:nth-child(3) {
  height: 52%;
}

html[data-study-theme="retro"] .retro-eq i:nth-child(4) {
  height: 100%;
}

html[data-study-theme="retro"] .retro-eq i:nth-child(5) {
  height: 64%;
}

html[data-study-theme="retro"] .now-playing-copy h2 {
  color: #f8fbff;
  text-shadow: 0 0 10px rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .music-progress-row input {
  accent-color: var(--retro-cyan);
  filter: drop-shadow(0 0 4px rgb(73 233 255 / 24%));
}

html[data-study-theme="retro"] .music-volume-control input {
  accent-color: var(--retro-pink);
}

html[data-study-theme="retro"] .music-control-button,
html[data-study-theme="retro"] .music-volume-button {
  color: #dbe9f8;
}

html[data-study-theme="retro"] .music-mode-button {
  color: #a9b7d0;
}

html[data-study-theme="retro"] .music-mode-button span:first-child {
  color: var(--retro-pink);
  text-shadow: 0 0 7px rgb(255 79 163 / 35%);
}

html[data-study-theme="retro"] .music-mode-button[aria-pressed="true"] {
  box-shadow:
    inset 0 -2px 0 var(--retro-pink),
    inset 0 0 11px rgb(73 233 255 / 6%);
}

html[data-study-theme="retro"] .layout-menu {
  border-color: rgb(73 233 255 / 48%);
  background:
    linear-gradient(rgb(73 233 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 79 163 / 5%) 1px, transparent 1px),
    radial-gradient(circle at 100% 0%, rgb(255 79 163 / 15%), transparent 38%),
    rgb(9 13 37 / 98%);
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow:
    0 22px 60px rgb(0 0 0 / 58%),
    0 0 18px rgb(73 233 255 / 10%);
}

html[data-study-theme="retro"] .layout-option:hover {
  background: rgb(73 233 255 / 7%);
}

html[data-study-theme="retro"] .layout-option[aria-checked="true"] {
  border-color: rgb(255 79 163 / 58%);
  background: linear-gradient(145deg, rgb(255 79 163 / 13%), rgb(73 233 255 / 8%));
}

html[data-study-theme="retro"] .layout-preview {
  border-color: #3e5e89;
  background: var(--retro-control);
}

html[data-study-theme="retro"] .layout-preview i {
  background: #395175;
}

html[data-study-theme="retro"] .layout-option[aria-checked="true"] .layout-preview {
  border-color: var(--retro-cyan);
}

html[data-study-theme="retro"] .layout-option[aria-checked="true"] .layout-preview i {
  background: linear-gradient(145deg, var(--retro-cyan), var(--retro-pink));
}

html[data-study-theme="retro"] .toast {
  border: 1px solid rgb(73 233 255 / 50%);
  background:
    linear-gradient(145deg, rgb(73 233 255 / 11%), rgb(255 79 163 / 10%)),
    var(--retro-control);
  color: #f8fbff;
  box-shadow:
    var(--shadow-lg),
    0 0 16px rgb(73 233 255 / 12%);
}

@keyframes retro-control-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 38%),
      0 0 14px rgb(73 233 255 / 22%);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 44%),
      0 0 22px rgb(255 79 163 / 35%),
      0 0 12px rgb(73 233 255 / 26%);
  }
}

@keyframes retro-deck-light {
  0%,
  100% {
    border-color: rgb(73 233 255 / 46%);
  }

  50% {
    border-color: rgb(255 79 163 / 72%);
  }
}

@keyframes retro-eq-meter {
  from {
    height: 22%;
    opacity: 0.68;
  }

  to {
    height: 100%;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html[data-study-theme="retro"] .music-play-button.is-playing,
  html[data-study-theme="retro"] .narration-dock.is-playing .narration-play-button {
    animation: retro-control-pulse 1.8s ease-in-out infinite;
  }

  html[data-study-theme="retro"] .narration-dock.is-playing .narration-dock-art {
    animation: retro-deck-light 2.4s ease-in-out infinite;
  }

  html[data-study-theme="retro"] .now-playing:has(.music-play-button.is-playing) .retro-eq i {
    animation: retro-eq-meter 0.72s ease-in-out infinite alternate;
  }

  html[data-study-theme="retro"] .now-playing:has(.music-play-button.is-playing) .retro-eq i:nth-child(2) {
    animation-delay: -0.42s;
  }

  html[data-study-theme="retro"] .now-playing:has(.music-play-button.is-playing) .retro-eq i:nth-child(3) {
    animation-delay: -0.18s;
  }

  html[data-study-theme="retro"] .now-playing:has(.music-play-button.is-playing) .retro-eq i:nth-child(4) {
    animation-delay: -0.58s;
  }

  html[data-study-theme="retro"] .now-playing:has(.music-play-button.is-playing) .retro-eq i:nth-child(5) {
    animation-delay: -0.28s;
  }
}

@media (max-width: 720px) {
  html[data-study-theme="retro"] .reader-page {
    border: 0;
    box-shadow: none;
  }

  html[data-study-theme="retro"] .reader-scroller,
  html[data-study-theme="retro"] .music-lyrics-panel {
    background-size: 30px 30px, 30px 30px, auto, auto;
  }

  html[data-study-theme="retro"] .library-drawer,
  html[data-study-theme="retro"] .music-drawer {
    box-shadow:
      12px 0 36px rgb(0 0 0 / 48%),
      1px 0 12px rgb(73 233 255 / 9%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-study-theme="retro"] .music-play-button.is-playing,
  html[data-study-theme="retro"] .narration-dock.is-playing .narration-play-button,
  html[data-study-theme="retro"] .narration-dock.is-playing .narration-dock-art,
  html[data-study-theme="retro"] .retro-eq i {
    animation: none;
  }

  html[data-study-theme="retro"] .tool-rail,
  html[data-study-theme="retro"] .workspace,
  html[data-study-theme="retro"] .reader-scroller,
  html[data-study-theme="retro"] .music-lyrics-panel {
    background-attachment: scroll;
  }
}

@media (prefers-contrast: more) {
  html[data-study-theme="retro"] {
    --muted: #c7d3e8;
    --line: #5f79a8;
    --line-strong: #8aa8d0;
    --purple-soft: #2d2050;
  }

  html[data-study-theme="retro"] .tool-rail,
  html[data-study-theme="retro"] .workspace,
  html[data-study-theme="retro"] .reader-scroller,
  html[data-study-theme="retro"] .library-drawer,
  html[data-study-theme="retro"] .music-drawer,
  html[data-study-theme="retro"] .music-lyrics-panel,
  html[data-study-theme="retro"] .now-playing,
  html[data-study-theme="retro"] .narration-dock,
  html[data-study-theme="retro"] .source-copy-popover,
  html[data-study-theme="retro"] .layout-menu {
    background-image: none;
  }

  html[data-study-theme="retro"] .rail-button:hover,
  html[data-study-theme="retro"] .rail-button:focus-visible,
  html[data-study-theme="retro"] .rail-button[aria-expanded="true"],
  html[data-study-theme="retro"] .document-tab[aria-selected="true"],
  html[data-study-theme="retro"] .music-mode-button[aria-pressed="true"],
  html[data-study-theme="retro"] .music-track-button.is-current {
    box-shadow: inset 0 0 0 2px var(--retro-cyan);
  }

  html[data-study-theme="retro"] .reader-page {
    border-color: var(--line-strong);
    box-shadow: none;
  }
}
