/* chant.css — the psalm-tone view (window.Chant, chant.js). Every class starts with "cv-" (modifiers is-*). */
.cv-view { font-family: var(--serif); color: var(--ink); line-height: 1.5; max-width: 44rem; margin: 0 auto; -webkit-text-size-adjust: 100%; }
.cv-view *, .cv-view *::before, .cv-view *::after { box-sizing: border-box; }
.cv-head { margin: 0 0 .6rem; }
.cv-title { font-size: 1.45rem; font-weight: 600; margin: 0; letter-spacing: .01em; line-height: 1.25; }
.cv-sub { color: var(--muted); font-size: .95rem; margin-top: .1rem; }
.cv-sub b { color: var(--rubric); font-weight: 600; }
.cv-controls { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin: .7rem 0 .8rem; }
.cv-select { position: relative; flex: 1 1 13rem; min-width: 0; }
.cv-select select { width: 100%; appearance: none; -webkit-appearance: none; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border-2); border-radius: .6rem; padding: .5rem 2rem .5rem .75rem; min-height: 2.5rem; }
.cv-select::after { content: ""; position: absolute; right: .85rem; top: 50%; width: .45rem; height: .45rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cv-seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: .6rem; overflow: hidden; background: var(--surface-2); flex: 0 0 auto; }
.cv-seg button { font: inherit; font-size: .9rem; border: 0; background: transparent; color: var(--ink-2); padding: .45rem .8rem; min-height: 2.5rem; cursor: pointer; }
.cv-seg button + button { border-left: 1px solid var(--border-2); }
.cv-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 -2px 0 var(--rubric); font-weight: 600; }
.cv-howto { border: 1px solid var(--border); border-radius: .8rem; background: var(--surface-2); margin: 0 0 .9rem; padding: 0 .95rem; }
.cv-howto summary { cursor: pointer; list-style: none; padding: .65rem 0; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.cv-howto summary::-webkit-details-marker { display: none; }
.cv-howto summary::before { content: ""; width: .5rem; height: .5rem; border-right: 1.5px solid var(--rubric); border-bottom: 1.5px solid var(--rubric); transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: .1rem; }
.cv-howto[open] summary::before { transform: rotate(45deg); }
.cv-howto .cv-char { font-weight: 400; color: var(--muted); font-style: italic; font-size: .9rem; margin-left: auto; text-align: right; }
.cv-howto ol { margin: 0 0 .8rem; padding-left: 1.25rem; font-size: .95rem; color: var(--ink-2); }
.cv-howto li { margin: .28rem 0; }
.cv-howto li::marker { color: var(--rubric); }
.cv-r { color: var(--rubric); font-weight: 600; }
.cv-staff { margin: 0 0 .9rem; padding: .55rem .6rem .35rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface); }
.cv-staff-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .85rem; color: var(--muted); padding: 0 .2rem; flex-wrap: wrap; }
.cv-staff-head b { color: var(--ink); font-weight: 600; }
.cv-svg { display: block; width: 100%; height: auto; max-height: 9.5rem; color: var(--ink); overflow: visible; }
.cv-svg .cv-sl { stroke: var(--muted); stroke-width: .7; opacity: .85; }
.cv-svg .cv-sp { stroke: var(--border-2); stroke-width: 1; stroke-dasharray: 2 2.5; }
.cv-svg .cv-bar { stroke: currentColor; stroke-width: 1; }
.cv-svg .cv-bar2 { stroke-width: 2.2; }
.cv-svg .cv-nf { fill: currentColor; }
.cv-svg .cv-nh { fill: none; stroke: currentColor; stroke-width: 1.2; }
.cv-svg .cv-nt { stroke-width: 1.4; }
.cv-svg .cv-ns { stroke: currentColor; stroke-width: 1.2; }
.cv-svg .cv-st { stroke: currentColor; }
.cv-svg .cv-fl { fill: none; stroke: currentColor; stroke-width: 1.1; }
.cv-svg .cv-am { stroke: var(--rubric); stroke-width: 1.3; stroke-linecap: round; }
.cv-svg .cv-rb { fill: var(--rubric); font-size: 11px; font-family: inherit; }
.cv-svg .cv-lb { fill: var(--muted); font-size: 7.6px; font-family: inherit; font-style: italic; letter-spacing: .02em; }
.cv-svg .cv-flexg { opacity: .9; }
.cv-legend { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .8rem; color: var(--muted); padding: .25rem .2rem 0; }
.cv-legend b, .cv-legend i { color: var(--ink); }
.cv-bar { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; padding: .55rem .6rem; margin: .4rem 0 .6rem;
  background: var(--bar-bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--border-2); border-radius: .8rem; font-family: var(--sans); }
.cv-btn { font: inherit; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--ink); border-radius: .55rem; padding: .4rem .7rem; min-height: 2.35rem; cursor: pointer; white-space: nowrap; }
.cv-btn:hover { border-color: var(--muted); }
.cv-btn svg { width: .8rem; height: .8rem; fill: currentColor; flex: none; }
.cv-btn svg.cv-ic-note { width: 1.05rem; height: 1.05rem; }
.cv-btn.is-pri { background: var(--rubric); border-color: var(--rubric); color: var(--on-rubric); }
.cv-step { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: .55rem; overflow: hidden; background: var(--surface-2); }
.cv-step button { font: inherit; border: 0; background: transparent; color: var(--ink); width: 2.1rem; min-height: 2.35rem; cursor: pointer; font-size: 1.05rem; }
.cv-step span { font-size: .82rem; color: var(--ink-2); min-width: 2.9rem; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cv-step span small { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .03em; text-transform: uppercase; }
.cv-spacer { flex: 1 1 auto; }
.cv-view:not(.cv-playing) [data-act="stop"] { display: none; }
.cv-view.cv-playing [data-act="all"] { display: none; }
.cv-verses { list-style: none; margin: 0; padding: 0; }
.cv-verse { display: grid; grid-template-columns: 2rem 1fr; column-gap: .35rem; padding: .42rem .3rem; border-radius: .55rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cv-verse:hover { background: var(--surface-2); }
.cv-verse.cv-now { background: color-mix(in srgb, var(--rubric) 7%, transparent); }
.cv-num { color: var(--rubric); font-size: .8rem; text-align: right; padding-top: .3rem; font-variant-numeric: oldstyle-nums; user-select: none; -webkit-user-select: none; }
.cv-heading { grid-column: 1 / -1; color: var(--rubric); font-variant: small-caps; letter-spacing: .08em; font-size: .95rem; margin: .6rem 0 .1rem 2.35rem; }
.cv-lines { min-width: 0; overflow-wrap: break-word; }
.cv-line { margin: 0; font-size: 1.08rem; }
.cv-line .cv-h { display: block; }
.cv-line .cv-h + .cv-h { padding-left: 1.1em; }
.cv-line.is-sub { color: var(--ink-2); font-size: .95rem; margin-top: .12rem; font-weight: 400; }
.cv-line.is-sub .is-acc { font-weight: 600; }
.cv-s.is-acc { font-weight: 700; }
.cv-s.is-prep { font-style: italic; }
.cv-s.is-int { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--rubric) 60%, transparent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.cv-s.is-on { background: color-mix(in srgb, var(--rubric) 22%, transparent); border-radius: .2em; box-shadow: 0 0 0 .08em color-mix(in srgb, var(--rubric) 22%, transparent); }
.cv-mk { color: var(--rubric); font-weight: 600; padding: 0 .12em; }
.cv-mk.is-auto { opacity: .6; }
.cv-gloria { margin-top: .6rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.cv-gloria-h { color: var(--rubric); font-variant: small-caps; letter-spacing: .08em; font-size: .95rem; margin: .2rem 0 .1rem 2.35rem; }
.cv-foot { font-size: .78rem; color: var(--muted); margin: .9rem 0 .4rem; text-align: center; font-family: var(--sans); }
@media (max-width: 480px) {
  .cv-title { font-size: 1.28rem; } .cv-line { font-size: 1.02rem; }
  .cv-verse { grid-template-columns: 1.55rem 1fr; padding: .4rem .15rem; }
  .cv-heading, .cv-gloria-h { margin-left: 1.9rem; }
  .cv-bar { gap: .4rem; padding: .45rem; } .cv-btn { padding: .38rem .55rem; } .cv-btn .cv-bt { display: none; } .cv-howto .cv-char { display: none; }
}
@media (max-width: 999px) { .cv-bar { bottom: calc(68px + env(safe-area-inset-bottom)); } }
