/* ==========================================================================
   eh.lucheestiy.com — «Ночь и свеча»
   Claude's vision layer, loaded after main.css.

   The idea: a candlelit literary salon. The chrome (header, hero, footer)
   is deep ink-violet night; the poems live on warm, lamplit paper sheets
   floating on it. Display type — Cormorant Garamond; reading type —
   Literata. Gold is reserved for the night zones; on paper the accent is
   a muted mulberry wine.
   ========================================================================== */

/* --- tokens (override main.css) ------------------------------------------ */

:root {
  /* paper world */
  --bg:           #f1e9d9;
  --bg-card:      #fbf6ea;
  --bg-cover:     #e6dac1;
  --ink:          #292219;
  --ink-soft:     #46392c;
  --muted:        #857459;
  --rule:         #d6c8a9;
  --rule-soft:    #e7dcc2;
  --accent:       #8c2f3f;
  --accent-soft:  #a84f5c;

  /* night world (new) */
  --night:        #1b1526;
  --night-soft:   #2a2138;
  --night-mist:   #3a2f4e;
  --gold:         #c9a05a;
  --gold-soft:    #e3ca92;
  --starlight:    #f2ecdf;
  --lavender:     #b3a8c9;

  --serif:        "Literata", "PT Serif", "Liberation Serif", Georgia, serif;
  --display:      "Cormorant Garamond", "PT Serif", Georgia, serif;
  --sans:         "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --measure:      36rem;
  --measure-wide: 58rem;

  --sheet-shadow: 0 1px 2px rgba(41, 34, 25, 0.08),
                  0 14px 40px -18px rgba(41, 34, 25, 0.35);
}

::selection { background: rgba(201, 160, 90, 0.4); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* visible only on keyboard focus */
.skip-link {
  position: absolute;
  left: 50%;
  top: -3rem;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--night);
  color: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 0 0 8px 8px;
  padding: 0.5rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: var(--starlight); }

/* --- base ------------------------------------------------------------------ */

html {
  background:
    radial-gradient(120rem 40rem at 50% -20rem, #f7f1e2, transparent 70%),
    var(--bg);
  color: var(--ink);
}

body {
  background:
    /* faint paper fibre */
    repeating-linear-gradient(  84deg, rgba(122, 96, 55, 0.016) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-52deg, rgba(122, 96, 55, 0.013) 0 1px, transparent 1px 5px);
}

a        { color: var(--accent); }
a:hover  { color: var(--accent-soft); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: 0.005em; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- header: the night begins ---------------------------------------------- */

.site-header {
  background:
    radial-gradient(60rem 16rem at 18% 130%, rgba(201, 160, 90, 0.14), transparent 65%),
    linear-gradient(175deg, var(--night) 60%, var(--night-soft));
  border-bottom: 1px solid rgba(201, 160, 90, 0.45);
  box-shadow: 0 10px 30px -18px rgba(27, 21, 38, 0.8);
  position: relative;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 30%, var(--gold-soft) 70%, transparent);
  opacity: 0.55;
  pointer-events: none;
}

/* Masthead: brand centered, nav centered beneath — like a literary journal's
   front page. Width-proof: no wrap juggling as nav items come and go. */
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding-top: 1.15rem;
  padding-bottom: 0.95rem;
  text-align: center;
}

.brand { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0.8rem; text-decoration: none; text-align: left; }
.brand:hover { text-decoration: none; }

.brand-orn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(201, 160, 90, 0.55);
  border-radius: 50%;
  color: var(--gold-soft);
  font-size: 1.1rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.5s ease, border-color 0.3s ease;
}
.brand:hover .brand-orn { transform: rotate(-14deg); border-color: var(--gold-soft); }

.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--starlight);
  letter-spacing: 0.02em;
}
.brand-tag {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.15rem;
}

.nav { display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; }
.site-header .nav-link {
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--lavender);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-header .nav-link:hover { color: var(--starlight); text-decoration: none; border-color: rgba(201, 160, 90, 0.5); }
.site-header .nav-link.active { color: var(--gold-soft); border-color: var(--gold); }

.nav-player {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid rgba(201, 160, 90, 0.55);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-player:hover { background: rgba(201, 160, 90, 0.16); color: var(--starlight); }
.nav-player.is-open {
  background: rgba(201, 160, 90, 0.2);
  border-color: var(--gold-soft);
  color: var(--gold-soft);
  border-bottom-color: var(--gold-soft);
}

/* --- main spacing (kept in sync with the hero's negative pull) ------------- */

.site-main { padding-top: 2.75rem; padding-bottom: 5rem; }

/* --- full-bleed helper ------------------------------------------------------ */

.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* --- hero: night sky over the salon ---------------------------------------- */

.hero-night {
  margin-top: -2.75rem;   /* sit flush under the header */
  background:
    radial-gradient(1.5px 1.5px at 12% 24%, rgba(242, 236, 223, 0.8), transparent 100%),
    radial-gradient(1px 1px at 28% 68%, rgba(242, 236, 223, 0.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 44% 18%, rgba(242, 236, 223, 0.55), transparent 100%),
    radial-gradient(1px 1px at 63% 44%, rgba(242, 236, 223, 0.45), transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 22%, rgba(242, 236, 223, 0.65), transparent 100%),
    radial-gradient(1px 1px at 90% 60%, rgba(242, 236, 223, 0.4), transparent 100%),
    radial-gradient(70rem 30rem at 24% 110%, rgba(201, 160, 90, 0.2), transparent 60%),
    radial-gradient(60rem 34rem at 85% -30%, rgba(90, 70, 130, 0.35), transparent 65%),
    linear-gradient(168deg, var(--night) 30%, var(--night-soft) 75%, var(--night-mist));
  color: var(--starlight);
  border-bottom: 1px solid rgba(201, 160, 90, 0.35);
  box-shadow: inset 0 -24px 50px -40px rgba(0, 0, 0, 0.7);
}

/* One centered column at every width — portrait medallion above, words
   below — echoing the centered masthead. */
.hero-night-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 3.75rem) 1.5rem clamp(2.75rem, 6vw, 4.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1.5rem, 4vw, 2.25rem);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-frame {
  width: clamp(10.5rem, 24vw, 14rem);
  border-radius: 999px 999px 14px 14px;   /* arched, like a salon portrait */
  padding: 0.45rem;
  border: 1px solid rgba(201, 160, 90, 0.65);
  background: linear-gradient(160deg, rgba(201, 160, 90, 0.22), rgba(201, 160, 90, 0.04));
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.75);
}
.hero-frame img {
  width: 100%;
  border-radius: 995px 995px 10px 10px;
  filter: sepia(0.14) saturate(0.95);
}

.hero-over {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
}
.hero-name {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  color: var(--starlight);
  text-wrap: balance;
}
.hero-sub {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--lavender);
  margin: 0.3rem 0 0;
}

.hero-epigraph {
  margin: 1.7rem 0 0;
  padding: 1.1rem 0 0;
  position: relative;
  max-width: 34rem;
}
.hero-epigraph::before {
  /* a short gold rule instead of the old left border — reads centered */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-epigraph p {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  color: var(--gold-soft);
  margin: 0;
}
.hero-epigraph cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--lavender);
}
.hero-epigraph cite::before { content: "— "; }
.hero-epigraph cite a { color: var(--starlight); text-decoration: none; border-bottom: 1px solid rgba(242, 236, 223, 0.35); }
.hero-epigraph cite a:hover { color: var(--gold-soft); border-color: var(--gold); text-decoration: none; }

.hero-stats { display: flex; justify-content: center; gap: 2.4rem; margin-top: 1.9rem; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.hero-stat b {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold-soft);
  line-height: 1.1;
}
.hero-stat span {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-top: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}
.hero-stat:hover span { color: var(--starlight); }
.hero-stat:hover { text-decoration: none; }

/* --- poem of the day: a lamplit sheet --------------------------------------- */

.potd { margin: clamp(2.5rem, 6vw, 4rem) 0 1rem; }

.potd-sheet {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--sheet-shadow);
}
.potd-sheet::before {
  content: "";
  position: absolute;
  top: 0; left: 18%; right: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent);
  border-radius: 0 0 2px 2px;
}

.potd-label {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}
.potd-label .orn { color: var(--gold); letter-spacing: 0; margin: 0 0.5rem; }

.potd-title { text-align: center; margin: 0; }
.potd-title a {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.potd-title a:hover { color: var(--accent); }

.potd-meta {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
}

.potd-body { margin-top: 1.9rem; }
.potd-body .sec { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.potd-body .stanza {
  font-size: 1.05rem;
  line-height: 1.85;
}

.potd-more { text-align: center; margin: 2rem 0 0; }
.potd-more a {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.2rem;
}
.potd-more a:hover { border-color: var(--accent); text-decoration: none; }

/* --- home shelves ------------------------------------------------------------ */

.block { margin-top: clamp(3rem, 7vw, 4.5rem); }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.55rem;
  margin-bottom: 1.4rem;
}
.block-head h2 {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.block-orn { color: var(--gold); margin-right: 0.55rem; font-size: 1.1rem; }
.block-head .more {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.block-head .more:hover { color: var(--accent); text-decoration: none; }

/* --- cards: little bound volumes --------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(41, 34, 25, 0.06), 0 10px 26px -18px rgba(41, 34, 25, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 2px 4px rgba(41, 34, 25, 0.07), 0 22px 40px -20px rgba(41, 34, 25, 0.42);
}
.card-cover { transition: filter 0.3s ease; }
.card:hover .card-cover { filter: saturate(1.06) brightness(1.03); }

.card-type {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.25;
  color: var(--ink);
}
.card-year { color: var(--muted); font-size: 0.85rem; }

.card-play {
  background: rgba(27, 21, 38, 0.82);
  color: var(--gold-soft);
  border: 1px solid rgba(201, 160, 90, 0.6);
  backdrop-filter: blur(4px);
}
.card-play:hover { background: var(--night); color: var(--starlight); }

/* --- work detail: the manuscript sheet ---------------------------------------- */

.work {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--sheet-shadow);
  padding: clamp(1.5rem, 5vw, 3.25rem) clamp(1.1rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3rem);
  position: relative;
}
.work::before {
  content: "";
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent);
}

.work .crumbs { text-align: center; }

.work-head { text-align: center; margin-bottom: 1.6rem; }
.work-type {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
}
.work-head h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.18;
  margin: 0.5rem 0 0;
  color: var(--ink);
  text-wrap: balance;
}
.work-meta { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }

.work-cover { max-width: 21rem; margin: 1.75rem auto; }
.work-cover img {
  border-radius: 6px;
  border: 1px solid var(--rule);
  box-shadow: 0 16px 34px -18px rgba(41, 34, 25, 0.45);
}

.work-body { margin-top: 1.5rem; }
.work-body .sec { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.work-body .stanza {
  font-size: 1.07rem;
  line-height: 1.9;
}
.work > .work-body::after {
  content: "❦";
  display: block;
  text-align: center;
  color: var(--gold);
  font-size: 1.35rem;
  margin-top: 2.4rem;
}

/* section markers, re-tinted */
.sec-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.sec-chorus, .sec-bridge { border-left: 2px solid rgba(201, 160, 90, 0.55); }

/* reading progress through a book */
.poem-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2.4rem;
}
.poem-progress-track {
  width: min(16rem, 70%);
  height: 2px;
  background: var(--rule-soft);
  border-radius: 2px;
  overflow: hidden;
}
.poem-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 2px;
}
.poem-progress-text {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* share / copy row */
.work-share {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* poem prev/next */
.poem-nav { margin-top: 1.4rem; border-top: 1px solid var(--rule-soft); padding-top: 1.25rem; }
.poem-nav-link { text-decoration: none; }
.poem-nav-dir {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.poem-nav-title { font-family: var(--display); font-size: 1.1rem; color: var(--ink); }
.poem-nav-link:hover .poem-nav-title { color: var(--accent); }

/* related shelf inherits card styling; give its heading the shelf voice */
.related-head, .song-versions-head h2, .book-cycles h2 {
  font-family: var(--display);
  font-weight: 600;
}

/* --- song version blocks ------------------------------------------------------ */

/* Song recordings as a compact tracklist: with many Suno takes per text the
   old full-width blocks made a wall. Playback goes through the site player,
   so under JS the native <audio> is a duplicate control and is hidden. */
.song-versions { display: flex; flex-direction: column; gap: 0.55rem; margin: 1.75rem 0; }
.song-version {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 1rem;
  padding: 0.6rem 1rem;
  margin: 0;
}
.song-version-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0;
  flex: 1 1 12rem;
}
.song-version-meta { margin: 0; font-size: 0.8rem; color: var(--muted); flex: 1 1 100%; order: 3; }
.song-version-actions { display: flex; gap: 0.5rem; margin: 0; margin-left: auto; order: 2; }
.song-version .playlist-action { padding: 0.38rem 0.85rem; font-size: 0.68rem; }
html.js .song-version .player { display: none; }
.song-version .reactions { order: 4; flex: 1 1 100%; margin: 0.25rem 0 0; }
.song-version.is-playing {
  background: var(--bg-card);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.song-versions-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--rule-soft);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  vertical-align: 0.15rem;
}

/* --- buttons ------------------------------------------------------------------ */

.playlist-action {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--night);
  color: var(--gold-soft);
  border: 1px solid var(--night);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.playlist-action:hover { background: var(--night-soft); color: var(--starlight); }
.playlist-action.ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--rule);
}
.playlist-action.ghost:hover { border-color: var(--gold); color: var(--ink); background: transparent; }

/* the same pill as a link («Читать подряд», «Начать чтение») */
a.playlist-action { display: inline-flex; align-items: center; text-decoration: none; }
a.playlist-action:hover { text-decoration: none; color: var(--starlight); }
.read-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  margin: 0.9rem 0 0.3rem;
}
.work-head .read-start { justify-content: center; }
.read-start-note {
  flex-basis: 100%;
  font-family: var(--serif);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
}
.read-restart {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-underline-offset: 0.2em;
}
.read-restart:hover { color: var(--ink); }

/* browser-local reading history, revealed only after a book has been opened */
.reading-shelf {
  position: relative;
  margin: clamp(2rem, 5vw, 3.5rem) 0;
  padding: clamp(1.2rem, 3vw, 1.7rem);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background:
    radial-gradient(30rem 12rem at 0 0, rgba(201, 160, 90, 0.1), transparent 70%),
    var(--bg-card);
  box-shadow: 0 12px 32px -26px rgba(41, 34, 25, 0.5);
}
.reading-shelf::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(var(--gold-soft), var(--gold));
}
.reading-shelf-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.reading-shelf-orn {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
}
.reading-shelf-kicker {
  margin: 0 0 0.1rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.reading-shelf-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.15;
}
.reading-shelf-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 0.7rem;
}
.reading-shelf-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: var(--bg-card);
  background: color-mix(in srgb, var(--bg-card) 82%, var(--rule-soft));
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}
.reading-shelf-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--ink);
  text-decoration: none;
}
.reading-shelf-book {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.reading-shelf-title {
  margin-top: 0.3rem;
  font-family: var(--display);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.2;
}
.reading-shelf-meta {
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--muted);
}
.reading-shelf-arrow {
  margin-top: 0.65rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Long indexes and poems need an easy way home without stealing page space. */
.back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--bg-card);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  color: var(--ink);
  box-shadow: 0 10px 28px -16px rgba(27, 21, 38, 0.7);
  backdrop-filter: blur(10px);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.back-to-top:hover { background: var(--night); color: var(--gold-soft); }
.back-to-top[hidden],
body.has-site-player .back-to-top { display: none; }

/* Secondary navigation is visually quiet but still finger-sized. */
.crumbs a,
.footer-nav a,
.block-head .more,
.potd-more a,
.hero-epigraph cite a,
.read-restart {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.playlist-action { min-height: 2.75rem; }

@media (max-width: 760px) {
  .site-header .nav-link,
  .site-header .nav-player,
  .site-header .nav-night {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .list-filter-tools { width: 100%; }
}

/* --- list pages ----------------------------------------------------------------- */

.list-head h1, .search-page h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 2.7rem);
}
.list-head h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-top: 0.6rem;
  background: linear-gradient(90deg, var(--gold), transparent);
}

#list-filter, .search-form input[type="search"] {
  font-family: var(--serif);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  color: var(--ink);
}
#list-filter:focus, .search-form input[type="search"]:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 160, 90, 0.22);
}
.list-filter-tools {
  position: relative;
  width: min(18rem, 100%);
}
.list-filter-tools #list-filter {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding-right: 3rem;
}
.list-filter-tools input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  -webkit-appearance: none;
}
.list-filter-tools input[type="search"]::-ms-clear { display: none; }
.list-filter-clear {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: 1.2rem/1 var(--sans);
  cursor: pointer;
}
.list-filter-clear:hover { background: var(--rule-soft); color: var(--ink); }
.list-filter-clear[hidden] { display: none; }
.list-filter-status {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0.8rem;
  min-height: 1rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* --- search hints + not found -------------------------------------------------- */

.search-hints {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin-top: 1.4rem;
}
.search-hints-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.3rem;
}
.search-hint {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.search-hint:hover { border-color: var(--gold); color: var(--ink); text-decoration: none; }

.notfound { display: flex; justify-content: center; padding: 2.5rem 0; }
.notfound-sheet {
  position: relative;
  max-width: 30rem;
  width: 100%;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--sheet-shadow);
  padding: 2.75rem 2rem 2.5rem;
}
.notfound-sheet::before {
  content: "";
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent);
}
.notfound-orn { color: var(--gold); font-size: 1.5rem; margin: 0 0 0.6rem; }
.notfound h1 { font-family: var(--display); font-weight: 600; font-size: 1.9rem; margin: 0 0 0.5rem; }
.notfound-sub { color: var(--muted); margin: 0 0 1.5rem; }
.notfound-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.7rem; }

/* «Ничего не найдено» row injected by the list filter */
.filter-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 2rem 0;
}

/* --- tags ------------------------------------------------------------------------ */

.tag-cloud-link, .tag-row a {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tag-cloud-link:hover, .tag-row a:hover {
  border-color: var(--gold);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}
.tag-cloud-count { color: var(--gold); font-family: var(--display); font-weight: 600; }

/* weight buckets: frequent themes read larger, like a real word cloud
   settled into type. Sizes stay modest — this is a book, not a poster. */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem 0.7rem; align-items: baseline; }
.tag-cloud-link { display: inline-flex; align-items: baseline; gap: 0.45rem; padding: 0.35rem 0.9rem; }
.tag-w1 .tag-cloud-name { font-size: 0.9rem; }
.tag-w2 .tag-cloud-name { font-size: 1rem; }
.tag-w3 .tag-cloud-name { font-size: 1.15rem; }
.tag-w4 .tag-cloud-name { font-size: 1.3rem; font-family: var(--display); font-weight: 600; }
.tag-w5 .tag-cloud-name { font-size: 1.5rem; font-family: var(--display); font-weight: 600; }

/* --- about ------------------------------------------------------------------------ */

.about-portrait img {
  border-radius: 999px 999px 12px 12px;
  border: 1px solid var(--rule);
  padding: 0.4rem;
  background: var(--bg-card);
  box-shadow: var(--sheet-shadow);
}
.about-name { font-family: var(--display); font-weight: 600; }
.about-tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.about-lead p {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.about-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 1.75rem 0;
}

/* --- book foreword: illuminated first letter ---------------------------------------- */

.book-foreword p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--accent);
}
.book-foreword-head { font-family: var(--display); }

/* --- footer: goodnight ---------------------------------------------------------------- */

.site-footer {
  margin-top: 4rem;
  background:
    radial-gradient(50rem 14rem at 50% -6rem, rgba(201, 160, 90, 0.12), transparent 70%),
    linear-gradient(0deg, var(--night) 55%, var(--night-soft));
  border-top: 1px solid rgba(201, 160, 90, 0.45);
  color: var(--lavender);
}
.footer-inner { text-align: center; padding-top: 2.75rem; padding-bottom: 2.75rem; }
.footer-orn { color: var(--gold); font-size: 1.4rem; margin: 0; }
.footer-line {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--starlight);
  margin: 0.6rem 0 0.4rem;
}
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0.9rem 0 1.1rem;
}
.footer-nav a {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lavender);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover { color: var(--gold-soft); border-color: rgba(201, 160, 90, 0.5); text-decoration: none; }
.footer-copy { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.06em; margin: 0; }

/* --- player re-tint (structure stays in main.css) -------------------------------------- */

/* One visual voice for the player. main.css runs every active state, fill
   and status color through --accent, so re-scoping that single token swaps
   the wine for the site's gold across all player states coherently. The
   deep day value keeps ~4.5:1 contrast under the hardcoded #fff labels. */
.site-player,
.player-help-overlay {
  --accent: #8a6a28;
  --accent-soft: #a58540;
}
.site-player {
  background: rgba(251, 246, 234, 0.96);
  border-top: 1px solid var(--gold);
}
.site-player-title { font-family: var(--display); font-weight: 600; }
.site-player-status { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
/* one shape language: everything is a pill/circle */
.site-player .site-player-btn,
.site-player .site-player-play,
.site-player .site-player-tool,
.site-player .site-player-close,
.site-player .site-player-fs-close,
.site-player .queue-actions button,
.site-player .list-actions button,
.site-player .library-actions button { border-radius: 999px; }
.site-player .site-player-play {
  background: var(--night);
  border-color: var(--night);
  color: var(--gold-soft);
}
.site-player .site-player-play:hover:not(:disabled) {
  background: var(--night-soft);
  border-color: var(--night-soft);
  color: var(--starlight);
}

/* --- small screens ----------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero-frame { width: min(11rem, 55vw); }
  .hero-stats { gap: 1.6rem; }
  .nav { gap: 0.9rem 1.1rem; }
}

@media (max-width: 640px) {
  .site-main { padding-top: 2rem; }
  .hero-night { margin-top: -2rem; }
  .potd-sheet { border-left: 0; border-right: 0; border-radius: 0; }
  .work { border-left: 0; border-right: 0; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transform: none; transition: none; }
  .brand-orn, .brand:hover .brand-orn { transform: none; transition: none; }
}

/* ==========================================================================
   Print: a poem prints like a book page — ink on paper, no chrome.
   ========================================================================== */

@media print {
  .site-header, .site-footer, .site-player, .player-help-overlay, .back-to-top,
  .nav, .crumbs, .work-share, .poem-nav, .poem-progress,
  .related, .song-version-actions, .reactions, .work-cover,
  .index-alphabet, #list-filter, .read-start, .reading-shelf { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; }

  .work {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .work::before { display: none !important; }

  /* the typographic cover is hidden above; print the real text title instead */
  .work-head h1 {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0.5rem 0 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    color: #000 !important;
  }
  .work-type, .work-meta { color: #444 !important; }
  .work-body .stanza { font-size: 12pt; line-height: 1.7; color: #000 !important; }
  .work > .work-body::after { color: #000; }
}

/* ==========================================================================
   Night reading mode — the paper world after dark. The chrome was already
   night; flipping the shared tokens re-dresses everything token-driven,
   including the player and its overlay.
   ========================================================================== */

html.night {
  --bg:           #14101d;
  --bg-card:      #201933;
  --bg-cover:     #2a2144;
  --ink:          #e9e2d1;
  --ink-soft:     #cfc3ac;
  --muted:        #9c8fb2;
  --rule:         #3d3158;
  --rule-soft:    #2c2344;
  --accent:       #d9ab5f;
  --accent-soft:  #e5c384;
  --sheet-shadow: 0 1px 2px rgba(0, 0, 0, 0.5),
                  0 18px 44px -18px rgba(0, 0, 0, 0.85);

  background:
    radial-gradient(120rem 40rem at 50% -20rem, #1d1630, transparent 70%),
    var(--bg);
}
html.night body { background: none; }   /* paper fibre off in the dark */

html.night .site-header,
html.night .hero-night,
html.night .site-footer { border-color: rgba(201, 160, 90, 0.28); }

html.night .potd-sheet,
html.night .work {
  background:
    radial-gradient(42rem 20rem at 50% -8rem, rgba(201, 160, 90, 0.07), transparent 70%),
    var(--bg-card);
}
html.night .card-cover,
html.night .work-cover img { filter: brightness(0.92); }
html.night ::selection { background: rgba(201, 160, 90, 0.35); }

/* Night player: follows the theme (tokens flip via html.night on :root);
   what remains is overriding main.css's hardcoded light colors. Inside the
   player, --accent goes to the brighter gold that reads on dark. */
html.night .site-player,
html.night .player-help-overlay {
  --accent: var(--gold);
  --accent-soft: var(--gold-soft);
}
html.night .site-player {
  background: rgba(26, 20, 38, 0.96);
  border-top-color: rgba(201, 160, 90, 0.55);
  box-shadow: 0 -14px 44px -18px rgba(0, 0, 0, 0.9);
}
html.night .site-player.is-minimized { background: rgba(26, 20, 38, 0.85); }
/* hardcoded #fff labels sit on gold active states at night — flip to dark */
html.night .site-player .site-player-play { background: var(--gold); border-color: var(--gold); color: #1b1526; }
html.night .site-player .site-player-play:hover:not(:disabled) { background: var(--gold-soft); border-color: var(--gold-soft); color: #1b1526; }
html.night .site-player-tool:hover:not(:disabled):not(.on),
html.night .site-player-fs-close:hover { color: #1b1526; }
html.night .site-player-fs-close { background: rgba(32, 25, 48, 0.85); }
html.night .site-player.is-fullscreen .site-player-stage::after {
  background: linear-gradient(180deg, rgba(20, 16, 29, 0.75) 0%, rgba(20, 16, 29, 0.92) 100%);
}
html.night .site-player-cover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset; }
html.night .site-player-lyrics-head,
html.night .site-player-lists-head,
html.night .site-player-library-head { background: rgba(26, 20, 38, 0.96); }
html.night .list-cover-empty,
html.night .library-cover-empty,
html.night .queue-cover-empty {
  background: linear-gradient(160deg, var(--night-soft) 0%, var(--bg-cover) 100%);
}
html.night .site-player-progress input[type="range"]::-webkit-slider-thumb { border-color: var(--bg-card); }
html.night .site-player-progress input[type="range"]::-moz-range-thumb { border-color: var(--bg-card); }
@media (max-width: 640px) {
  html.night .site-player.is-fullscreen .site-player-more {
    background: rgba(32, 25, 48, 0.98);
    box-shadow: 0 16px 30px -24px rgba(0, 0, 0, 0.9);
  }
}

/* night leaks outside the player: hardcoded whites in main.css */
html.night .playlist-row-cover-empty {
  background: linear-gradient(160deg, var(--night-soft) 0%, var(--bg-cover) 100%);
}
html.night .reaction-like.is-active { color: #1b1526; }
html.night .hero-portrait,
html.night .about-portrait,
html.night .award-figure img {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset,
              0 18px 40px -22px rgba(0, 0, 0, 0.85);
}

/* --- night toggle button ---------------------------------------------------- */

.nav-night {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(201, 160, 90, 0.55);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-soft);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.4s ease;
}
.nav-night:hover { background: rgba(201, 160, 90, 0.16); }
.nav-night .nav-night-sun { display: none; }
html.night .nav-night .nav-night-moon { display: none; }
html.night .nav-night .nav-night-sun { display: inline; }
html.night .nav-night { transform: rotate(180deg); }

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

/* --- poems index: the book's оглавление -------------------------------------- */

.list-count { margin: 0.2rem 0 0.9rem; font-family: var(--sans); font-size: 0.85rem; }

.index-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0.75rem 0 1.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.index-alphabet a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  min-width: 1.9rem;
  min-height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.index-alphabet a:hover { color: var(--accent); background: var(--rule-soft); text-decoration: none; }

.index-group { margin-bottom: 1.9rem; }
.index-letter {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2rem;
  color: var(--gold);
  margin: 0 0 0.4rem;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.15rem;
  scroll-margin-top: 1rem;
}
.index-rows {
  column-width: 24rem;
  column-gap: 3.5rem;
}

/* an index row is still a .card for main.js's filter, but looks like a TOC line */
.card.index-row {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  break-inside: avoid;
}
.card.index-row:hover { transform: none; box-shadow: none; border: 0; }
.card.index-row .card-link {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.28rem 0;
  min-height: 0;
  height: auto;
  text-decoration: none;
}
.card.index-row .card-link .card-title {
  /* undo main.css's sr-only treatment of covered-card titles */
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.45;
  margin: 0;
  color: var(--ink);
  transition: color 0.15s ease;
}
.card.index-row:hover .card-title { color: var(--accent); }
.index-dots {
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--rule);
  transform: translateY(-0.25em);
}
.index-year {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 2.6rem;
  text-align: right;
}

@media (max-width: 640px) {
  .index-rows { column-width: auto; columns: 1; }
}

/* ==========================================================================
   Codex audit round (CSS-AUDIT.md) — specificity fixes, remaining night
   leaks, and player-day harmonization.
   ========================================================================== */

/* -- specificity traps: base two-class rules beating one-class overlay -- */

.sec-chorus .sec-label { color: var(--gold); }

.tag-row li a:hover {
  background: var(--bg-card);
  border-color: var(--gold);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}
.tag-cloud-link:hover .tag-cloud-count {
  background: var(--rule-soft);
  color: var(--gold);
}

.card.card-has-play.is-playing {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.card.card-has-play.is-playing .card-play { border-color: var(--gold); }

/* -- night: playing states, page playlist, decor shadows, native chrome -- */

html.night {
  color-scheme: dark;
  scrollbar-color: var(--muted) var(--bg);
}
html.night .playlist-row.is-playing { background: var(--rule-soft); }
html.night .playlist-row-play,
html.night .playlist-row-add {
  background: var(--night-soft);
  border-color: var(--rule);
  color: var(--starlight);
}
html.night .playlist-row-play:hover,
html.night .playlist-row-add:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--night);
}
html.night .card-has-play.is-playing .card-play {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--night);
}
html.night .card:not(.index-row),
html.night .card:not(.index-row):hover,
html.night .work-cover img,
html.night .award-figure img {
  box-shadow: 0 0 0 1px var(--rule-soft);
}
html.night .about-portrait { box-shadow: none; }
html.night .card:hover .card-cover { filter: saturate(1.06) brightness(0.92); }
html.night .book-cycles > h2,
html.night .cycle-nav { border-color: var(--rule-soft); }

/* -- player day: one filled primary, quiet actives, ink hierarchy -- */

.site-player .site-player-tool.on,
.site-player .site-player-tool[data-player-shuffle].on {
  background: var(--rule-soft);
  border-color: var(--gold);
  color: var(--ink);
}
.site-player .site-player-status { color: var(--muted); }
.site-player .site-player-queue li.on .queue-title,
.site-player .site-player-list-tracks li.is-current .list-title,
.site-player .site-player-library-list li.is-in-queue .library-title {
  color: var(--ink);
}
.site-player .site-player-queue li.on .queue-cover { border-color: var(--gold); }

/* panel controls join the pill language; row actions go quiet */
.site-player .site-player-list-tabs button,
.site-player .site-player-list-form input,
.site-player .site-player-library-search { border-radius: 999px; }
.site-player .queue-actions button,
.site-player .list-actions button,
.site-player .library-actions button {
  background: transparent;
  border-color: var(--rule-soft);
  color: var(--muted);
}
.site-player .queue-actions button:hover:not(:disabled),
.site-player .list-actions button:hover:not(:disabled),
.site-player .library-actions button:hover:not(:disabled) {
  background: var(--rule-soft);
  border-color: var(--rule);
  color: var(--ink);
}
.site-player .queue-actions button.is-saved,
.site-player .queue-actions button.is-saved:hover:not(:disabled),
.site-player .library-actions button.is-saved,
.site-player .library-actions button.is-saved:hover:not(:disabled) {
  background: var(--rule-soft);
  border-color: var(--gold);
  color: var(--ink);
}
.site-player .list-actions button:first-child,
.site-player .library-actions button:first-child {
  background: var(--night);
  border-color: var(--night);
  color: var(--gold-soft);
}

/* -- one slider system for progress and volume -- */

.site-player-progress input[type="range"],
.site-player-volume input[type="range"] {
  appearance: none;
  background: transparent;
  accent-color: var(--night);
}
.site-player-progress input[type="range"]::-webkit-slider-runnable-track,
.site-player-volume input[type="range"]::-webkit-slider-runnable-track {
  height: 0.3rem;
  border-radius: 999px;
  background: var(--rule);
}
.site-player-progress input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right,
    var(--night) 0 var(--fill, 0%),
    var(--rule) var(--fill, 0%) 100%);
}
.site-player-progress input[type="range"]::-moz-range-track,
.site-player-volume input[type="range"]::-moz-range-track {
  height: 0.3rem;
  border-radius: 999px;
  background: var(--rule);
}
.site-player-progress input[type="range"]::-moz-range-progress {
  height: 0.3rem;
  background: var(--night);
}
.site-player-progress input[type="range"]::-webkit-slider-thumb,
.site-player-volume input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: -0.3rem;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: none;
}
.site-player-progress input[type="range"]::-moz-range-thumb,
.site-player-volume input[type="range"]::-moz-range-thumb {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--bg-card);
}
/* at night the ink fill vanishes on the dark rail — fill with gold */
html.night .site-player-progress input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right,
    var(--gold) 0 var(--fill, 0%),
    var(--rule) var(--fill, 0%) 100%);
}
html.night .site-player-progress input[type="range"]::-moz-range-progress { background: var(--gold); }
html.night .site-player-progress input[type="range"]::-webkit-slider-thumb,
html.night .site-player-volume input[type="range"]::-webkit-slider-thumb,
html.night .site-player-progress input[type="range"]::-moz-range-thumb,
html.night .site-player-volume input[type="range"]::-moz-range-thumb {
  border-color: var(--gold);
}
html.night .site-player-progress input[type="range"],
html.night .site-player-volume input[type="range"] { accent-color: var(--gold); }

/* -- fullscreen type hierarchy: manuscript voice -- */

.site-player.is-fullscreen .site-player-title {
  max-width: 22ch;
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}
.site-player.is-fullscreen .site-player-subtitle {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.site-player.is-fullscreen .site-player-status {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-player.is-fullscreen .site-player-lyrics-head strong,
.site-player.is-fullscreen .site-player-lists-head strong,
.site-player.is-fullscreen .site-player-library-head strong {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
}
