/* Old Whistle, design v3: the illuminated book (research/DESIGN_V3.md).
   A book you are inside, and a fast clean tool. Vellum ground, iron-gall ink, lapis for action, verdigris for "known",
   gold only in the painting and a few hairlines, vermilion only for rubrics (section labels, the current tab's mark).
   EB Garamond for titles and tune names, Figtree for everything else (chosen 17 Nov from three pairings, design/review/fonts-3-options.jpg). Three text sizes per screen: display (34 or 28), title
   (17), body (15). Painted ornament (web/art, made by tools/illuminate.py) sits in heads, frames and section art,
   never behind body text. Two themes: Parchment (default) and Candlelight (html[data-theme="candlelight"|"dark"]). */
@font-face { font-family: 'EB Garamond'; src: url('fonts/ebgaramond.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Rubric Digits'; src: url('fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0030-0039; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
:root {
  /* parchment: every text colour is AA on --paper, --paper-2, --paper-3 and --page (DESIGN_V3 §3) */
  --paper: #f6f1e4; --paper-2: #efe7d3; --paper-3: #e6dcc4; --page: #fbf8ef; --white: #fbf8ef; --seg-on: #fbf8ef;
  --ink: #1f1a15; --ink-2: #4a4036; --muted: #6b5f50;
  --rule: rgba(31, 26, 21, .12); --rule-2: rgba(31, 26, 21, .24);
  --lapis: #2d4a8c; --lapis-d: #233b72; --on-lapis: #fbf3dc;
  --verd: #2f6a48; --madder: #8b2c48; --verm: #b0361d; --gold: #c9a040; --gold-l: #e9cf86; --gold-ink: #7a5a12;
  --act: var(--lapis); --act-d: var(--lapis-d); --on-act: var(--on-lapis);   /* the one action colour */
  --scrim: rgba(31, 26, 21, .38);
  --grain: url('art/vellum.webp');
  --display: 'EB Garamond', Garamond, Georgia, serif;
  --ui: 'Figtree', system-ui, sans-serif;
  --t-d1: 600 34px/40px var(--display); --t-d2: 600 28px/34px var(--display);
  --t-title: 600 17px/24px var(--ui); --t-body: 400 15px/22px var(--ui);
  --m: 20px; --nav: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --r: 10px;
  /* names the screens already use */
  --green: var(--lapis); --ok: var(--verd); --warn: #9a4a1c; --rec: var(--verm); --red-ink: var(--verm); --night: #2e3560; --gold-d: #b08a33;
  --text: var(--ink); --text-2: var(--ink-2); --brass: var(--gold); --brass-2: var(--gold-ink); --ember: var(--warn);
  --fg: var(--ink); --fg2: var(--ink-2); --mut: var(--muted); --dim: var(--muted); --line: var(--rule); --line2: var(--rule-2);
  /* the music */
  --note: #1f1a15; --note-2: #5d5246; --note-on: #b0361d;
  color-scheme: only light;   /* "only": Samsung Internet / Chrome must not force-darken the page (owner 18 Nov: always light) */
}
/* candlelight: the same book by a candle. Dark warm ground, vellum-coloured ink, the music in light ink. */
html[data-theme="candlelight"], html[data-theme="dark"] {
  --paper: #1d1a15; --paper-2: #27221b; --paper-3: #342d23; --page: #221e18; --white: #2b261e; --seg-on: #4a4033;
  --ink: #efe5cf; --ink-2: #cfc1a4; --muted: #a99a80;
  --rule: rgba(239, 229, 207, .12); --rule-2: rgba(239, 229, 207, .26);
  --lapis: #a3b8ec; --lapis-d: #8aa2da; --on-lapis: #1d1a15;
  --verd: #93c7a0; --madder: #e59ab0; --verm: #ef8466; --gold: #d8b45a; --gold-l: #e9cf86; --gold-ink: #dcb85e;
  --act: #d8b45a; --act-d: #c29d43; --on-act: #1d1a15;    /* by candlelight the action is gold */
  --scrim: rgba(0, 0, 0, .55);
  --warn: #e3a070;
  --note: #ece2cb; --note-2: #b9ab8f; --note-on: #f09a76;
  color-scheme: dark;
}
@media (min-width: 400px) { :root { --m: 24px; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); }
html::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, #fbf7ec 0%, #f6f1e4 55%, #efe7d4 100%); }
body { margin: 0; color: var(--ink); background: transparent; /* owner 18 Nov: no visible texture; the page colour sits on a fixed layer (html::before) so only the text scrolls */
  font: var(--t-body); font-variant-numeric: lining-nums proportional-nums; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[data-theme="candlelight"] body, html[data-theme="dark"] body { background-image: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; padding: 0; text-align: inherit; }
a { color: var(--lapis); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.btn { text-decoration: none; }
b, strong { font-weight: 600; }
p { margin: 0 0 12px; }
i, em { font-style: normal; }
h1, h2, h3, .fell { margin: 0; color: var(--ink); font-weight: 600; }
h1 { font: var(--t-d1); letter-spacing: -.005em; }
h2 { font: var(--t-d2); }
h3 { font: var(--t-title); }
.num, .tnum { font-variant-numeric: lining-nums tabular-nums; }
.mut { color: var(--ink-2); } .dim { color: var(--muted); } .gold { color: var(--gold-ink); }
.small, .tiny { font-size: 15px; line-height: 22px; }
.it { font-style: normal; }
.hide { display: none !important; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav) + var(--safe-b) + 24px); }
#view { padding: 0 var(--m) 32px; }
.screen { animation: fade .16s linear both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
/* one focus ring everywhere, for the keyboard and switch access */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lapis); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .play:focus-visible, .pm:focus-visible { outline-offset: 3px; }
/* inside things that clip (rows with content-visibility, scrolling chip rows, segments) the ring sits just inside */
.item:focus-visible, .chips.tops .chip:focus-visible, .segc button:focus-visible, .seg button:focus-visible, .libbar button:focus-visible, .mlist button:focus-visible, .rlist button:focus-visible { outline-offset: -2px; }
::selection { background: var(--gold-l); color: #1f1a15; }

/* ------------------------------------------------ the painted heads (art only: the title is below, on clean vellum) */
.art { display: block; height: 104px; margin: 0 calc(-1 * var(--m)); background: var(--art) center bottom / cover no-repeat; pointer-events: none; }
.art.short { height: 46px; background-image: url('art/head-tune.webp'); }
.art + .head, .art + .today { margin-top: 20px; }
/* the tune page: the bar with back and menu on clean paper, then the slim running border */
.art-bar { display: flex; flex-direction: column; height: auto; position: relative; }
.art-bar .top { order: -1; position: relative; }
.art-bar .art { position: static; margin: 0 calc(-1 * var(--m)); height: 46px; }
.art-bar .iconbtn { background: none; }

/* the title page while the library arrives: the logo in a painted garland */
#boot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 28px;
  background: url('art/wreath.webp') center calc(50% - 34px) / 300px 300px no-repeat, var(--paper); background-blend-mode: normal; transition: opacity .25s linear; }
html[data-theme="candlelight"] #boot, html[data-theme="dark"] #boot { background: url('art/wreath.webp') center calc(50% - 34px) / 300px 300px no-repeat var(--paper); }
#boot.gone { opacity: 0; pointer-events: none; }
#boot img { width: 168px; height: 168px; margin-top: 66px; }
#boot .bt { font: var(--t-d1); color: var(--ink); margin-top: 38px; }

/* ------------------------------------------------ top bar and page head */
.top { display: flex; align-items: center; gap: 4px; min-height: 52px; }
.top .rh { flex: 1; min-width: 0; font: var(--t-body); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top.bare { min-height: 0; }
.top.bare .rh { display: none; }
.head { margin: 28px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.head h1, .head h2 { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.top + .head { margin-top: 4px; }
.head .sub { flex: 1 0 100%; font: var(--t-body); color: var(--ink-2); margin-top: 4px; }
.head .no { flex: 1 0 100%; font: var(--t-body); color: var(--muted); }
.head .help { align-self: center; }
.iconbtn { min-width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); flex: none; border-radius: 50%; }
.iconbtn:active { background: var(--paper-3); }
.top > .iconbtn:first-child { margin-left: -10px; }
.top > .iconbtn:last-child { margin-right: -10px; }
.iconbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn.more svg { fill: currentColor; stroke: none; }
.iconbtn.on { color: var(--madder); }
/* the small round "?" and the lore mark: the explanation and the story wait behind them (44 px to tap, 28 drawn) */
.help, .lore { position: relative; width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-2); color: var(--ink-2); font: 600 15px/1 var(--ui); background: transparent; }
.help::after, .lore::after { content: ''; position: absolute; inset: -8px; }
.help:active, .lore:active { background: var(--paper-3); }
/* lore: a small gold-ringed fleuron, not a question */
.lore { width: 32px; height: 32px; border: 1.5px solid var(--gold); background: url('art/lore.webp') center / 26px 26px no-repeat; }
.lore::after { inset: -6px; }
.textbtn { min-height: 44px; padding: 0 2px; color: var(--lapis); font: var(--t-body); font-weight: 600; }
.textbtn.on { color: var(--madder); }
.lede, .purpose { font: var(--t-body); color: var(--ink-2); margin: 6px 0 0; display: flex; align-items: center; gap: 12px; }
.purpose span { flex: 1; }

/* ------------------------------------------------ bottom navigation: words, the current one in ink with a vermilion rubric mark */
nav#nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--nav) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--paper); border-top: 1px solid var(--rule); display: flex; justify-content: center; }
nav#nav::before { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 1px; background: var(--gold); opacity: .55; }
nav#nav .in { display: flex; width: 100%; max-width: 560px; padding: 0 4px; }
nav#nav button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 500 15px/20px var(--ui); color: var(--muted); text-align: center; min-height: 48px; }
nav#nav button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
nav#nav button.on { color: var(--ink); font-weight: 600; }
nav#nav button.on::before { content: ''; position: absolute; top: 9px; left: 50%; width: 6px; height: 6px; margin-left: -3px; background: var(--verm); transform: rotate(45deg); }
nav#nav button:has(svg).on::before { top: 4px; }
body.playing nav#nav { display: none; }

/* ------------------------------------------------ sections, rows, lists */
.card { margin: 32px 0 0; position: relative; }
.card h3 { margin-bottom: 4px; }
.card > :last-child { margin-bottom: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.list > * + * { border-top: 1px solid var(--rule); }
.item { display: flex; align-items: center; gap: 14px; padding: 10px 0; min-height: 60px; width: 100%; text-align: left; }
.item:active { background: var(--paper-2); }
.item .t { display: block; font: 500 17px/24px var(--ui); color: var(--ink); }
.item .s { display: block; font: var(--t-body); color: var(--ink-2); }
.item .s i { color: var(--muted); padding: 0 4px; }
.item .state, .pill { font: var(--t-body); color: var(--muted); text-align: right; flex: none; white-space: nowrap; }
.item .state.ok, .pill.ok { color: var(--verd); font-weight: 600; } .item .state.go, .pill.go { color: var(--madder); }
.item .bar { margin-top: 6px; }
.item.danger .t, .item.danger { color: var(--verm); }
.chev { color: var(--muted); font-size: 22px; line-height: 1; font-family: var(--display); }  /* an icon, not a text size */
.lvl { display: none; }
/* section labels are rubrics: small capitals in vermilion, as the scribes wrote them in red */
.sec { font: 600 15px/22px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--verm); margin: 32px 0 4px; }
.sec small { display: block; font: var(--t-body); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.foot { font: var(--t-body); color: var(--muted); margin: 24px 0 8px; }
/* the printer's leaf ends a long page, in gold */
.leaf { display: block; width: 28px; height: 20px; margin: 32px auto 8px; color: var(--gold); }

/* ------------------------------------------------ the illuminated initials (web/illum.js) */
/* real paint, after Bening's small initials (tools/initials_real.py); the square is the image's own painted edge */
.ini { display: block; flex: none; width: 44px; height: 44px; object-fit: contain; }
.ini-head { width: 76px; height: 76px; }
.ini-none { background: var(--paper-3); border-radius: 2px; }
.ini-wait { background: var(--paper-2); border-radius: 2px; opacity: .55; }
html[data-theme="candlelight"] .ini, html[data-theme="dark"] .ini { filter: brightness(.92) saturate(.95); }

/* ------------------------------------------------ buttons: lapis for the one action, outline for the rest, a word for quiet ones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r); font: var(--t-title);
  border: 1px solid var(--rule-2); color: var(--ink); background: transparent; transition: background-color .12s linear; }
.btn:active { background: var(--paper-3); }
.btn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; flex: none; }
.btn svg:not(.fill) { display: none; }
.btn.primary { background: var(--act); border-color: var(--act); color: var(--on-act); min-height: 52px; }
.btn.primary:active { background: var(--act-d); }
.btn.moss { border-color: var(--verd); color: var(--verd); }
.btn.danger { border-color: var(--verm); color: var(--verm); }
.btn.quiet { border: 0; background: none; padding: 0 4px; color: var(--lapis); min-height: 44px; }
.btn.block { width: 100%; }
.btn.small { min-height: 44px; padding: 0 16px; }
.btn:disabled { opacity: .45; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.btns .btn { flex: 1; }

/* ------------------------------------------------ choices: one segmented style everywhere */
.segc, .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--paper-3); }
.segc button, .seg button { min-height: 44px; padding: 0 8px; border-radius: 8px; font: 500 15px/20px var(--ui); color: var(--ink-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segc button.on, .seg button.on { background: var(--seg-on); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--rule), inset 0 -2px 0 var(--gold); }
.segc button.locked::after, .segc button[data-pro]::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; vertical-align: 1px; background: var(--gold); transform: rotate(45deg); }
.segc.multi button.on { background: var(--lapis); color: var(--on-lapis); box-shadow: none; }
.seg { min-width: 140px; }
.segc.mini { min-width: 150px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--rule-2); font: 500 15px/20px var(--ui); color: var(--ink-2); background: transparent; white-space: nowrap; }
.chip.on { background: var(--lapis); border-color: var(--lapis); color: var(--on-lapis); }
.setrow { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.setrow + .setrow { border-top: 1px solid var(--rule); }
.setrow .seg, .setrow .segc { flex: none; }
.grid3, .grid4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { grid-template-columns: repeat(4, 1fr); margin-top: 16px; }
.grid3 button, .grid4 button { min-height: 44px; border-radius: var(--r); background: transparent; border: 1px solid var(--rule-2); font: 500 15px/20px var(--ui); color: var(--ink-2); text-align: center; }
.grid3 button.on, .grid4 button.on { background: var(--lapis); border-color: var(--lapis); color: var(--on-lapis); }
.grid3 button:first-child { grid-column: span 3; }
/* switches (settings) */
.switch { position: relative; width: 48px; height: 28px; flex: none; border-radius: 14px; background: var(--paper-3); border: 1px solid var(--rule-2); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--page); box-shadow: 0 0 0 1px var(--rule-2); transition: transform .12s linear; }
.switch.on, .switch[aria-checked="true"] { background: var(--lapis); border-color: var(--lapis); }
.switch.on::after, .switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ------------------------------------------------ practice (and the daily session) */
.today { margin-top: 0; }
.today h1 { margin: 0; }
.today .say { font: var(--t-body); color: var(--ink-2); margin: 4px 0 0; }
.today .btn.primary { margin-top: 24px; }
.steps { margin: 20px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: center; min-height: 52px; }
.steps li + li { border-top: 1px solid var(--rule); }
.steps li .n { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-2); font: 600 15px/1 var(--ui); color: var(--ink-2); }
.steps li.done .n { background: var(--verd); border-color: var(--verd); color: var(--page); }
.steps li .tx { flex: 1; min-width: 0; font: 500 17px/24px var(--ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps li.done .tx { color: var(--muted); }
.steps li .m { font: var(--t-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.lenrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--ink-2); }
.lenrow .seg { min-width: 168px; }
.story p { font: var(--t-body); color: var(--ink-2); }
.figs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 0; }
.figs div, .kv div { font: var(--t-body); color: var(--ink-2); }
.figs b, .kv b { display: block; font: 600 34px/40px var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.card.daily { padding: 16px 0 0; border-top: 1px solid var(--rule); }
.sess-top { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.sess-top .iconbtn { margin-left: -10px; }
.dots { display: flex; gap: 4px; flex: 1; }
.dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--paper-3); }
.dots i.on { background: var(--verd); } .dots i.cur { background: var(--gold); }
.sess-head { margin-top: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sess-head h2 { flex: 1; min-width: 0; }
.timer { display: flex; align-items: baseline; gap: 8px; flex: none; }
.timer svg { display: none; }
.timer .num { font: 600 28px/34px var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.timer .num small { display: none; }
.timer.paused .num { color: var(--muted); }
.stepkind { font: var(--t-body); color: var(--muted); }
.bar { height: 4px; border-radius: 2px; background: var(--paper-3); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 2px; transition: width .3s linear; }
.bar.moss i, .bar.green i { background: var(--verd); }
.sticky-done { position: sticky; bottom: 0; z-index: 12; display: flex; gap: 8px; margin: 24px calc(-1 * var(--m)) 0; padding: 12px var(--m) calc(var(--safe-b) + 12px); background: var(--paper); border-top: 1px solid var(--rule); }
.sticky-done .btn.primary { flex: 2; min-height: 52px; } .sticky-done .btn { flex: 1; }
.in-session #body .btn.primary { background: transparent; color: var(--ink); border-color: var(--act); }
/* the practice log: a calendar of painted days */
.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; margin-top: 8px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--paper-3); }
.heat i.l1 { background: color-mix(in srgb, var(--verd) 30%, var(--paper-3)); } .heat i.l2 { background: color-mix(in srgb, var(--verd) 62%, var(--paper-3)); } .heat i.l3 { background: var(--verd); }
.heat i.today { box-shadow: 0 0 0 2px var(--gold); }

/* ------------------------------------------------ lessons */
.why { font: var(--t-body); color: var(--ink-2); margin: 12px 0 0; }
ol.how { padding-left: 20px; margin: 0; } ol.how li { margin: 6px 0; }
ol.how li::marker { color: var(--verm); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; min-height: 48px; width: 100%; text-align: left; }
.check + .check { border-top: 1px solid var(--rule); }
.check i { width: 22px; height: 22px; flex: none; border: 1.5px solid var(--rule-2); border-radius: 6px; background: var(--page); display: grid; place-items: center; }
.check.on i { background: var(--verd); border-color: var(--verd); }
.check.on i::after { content: ''; width: 10px; height: 5px; border: 2px solid var(--page); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.passed { color: var(--verd); font-weight: 600; }
details.more, details.how { margin: 16px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
details.more summary, details.how summary { list-style: none; min-height: 52px; display: flex; align-items: center; justify-content: space-between; font: var(--t-title); color: var(--lapis); cursor: pointer; }
details.more summary::-webkit-details-marker, details.how summary::-webkit-details-marker { display: none; }
details.more summary::after, details.how summary::after { content: ''; width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
details[open].more summary::after, details[open].how summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.howbody, .morebody { padding: 0 0 16px; font: var(--t-body); color: var(--ink-2); }
.howbody h4, .morebody h4 { font: var(--t-title); color: var(--ink); margin: 16px 0 4px; }
.howbody h4:first-child, .morebody h4:first-child { margin-top: 0; }
.howbody p, .morebody p { margin: 0 0 8px; }
.howbody ol, .howbody ul, .morebody ol, .morebody ul { margin: 0; padding-left: 20px; } .howbody li, .morebody li { margin: 4px 0; }
.howbody .dim { color: var(--muted); }
.stagebar { padding: 8px 0; }
.stagebar .bar { margin-top: 6px; }
/* a locked lesson or tool: the gold lozenge, one line, one button */
.locked { margin: 24px 0; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: 12px; justify-items: start; }
.locked p { margin: 0; color: var(--ink-2); }

/* ------------------------------------------------ the whistle drawings */
.fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 0; margin-top: 8px; }
.fcard { padding: 8px 0; text-align: center; border-radius: var(--r); }
.fcard:active { background: var(--paper-2); }
.fcard b { font: 600 34px/40px var(--display); display: block; }
.fcard small { color: var(--muted); font: var(--t-body); display: block; min-height: 22px; }
.fcard svg.wh { width: 34px; height: 118px; }
svg.wh .body { fill: var(--page); stroke: var(--ink-2); stroke-width: 1; }
svg.wh .head { fill: var(--lapis); stroke: var(--lapis); stroke-width: 1; }
svg.wh .hole { stroke: var(--ink-2); stroke-width: 1.1; fill: var(--page); }
svg.wh .hole.c { fill: var(--ink); stroke: var(--ink); }
svg.wh .half { fill: var(--ink); }
svg.wh .hole.lift { stroke: var(--verm); stroke-width: 2; fill: var(--page); }
svg.wh .hole.hit { stroke: var(--gold); stroke-width: 2.4; }
svg.wh .oct { fill: var(--verm); font: 600 14px var(--ui); }
.ornseq { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.ornseq .st { flex: none; text-align: center; font: var(--t-body); color: var(--ink-2); width: 56px; }
.ornseq .st svg.wh { width: 30px; height: 104px; }
.ornseq .arrow { flex: none; width: 10px; padding-top: 46px; color: var(--muted); }
.facts { font: var(--t-body); color: var(--ink-2); margin-top: 8px; }
.facts b { color: var(--ink); }

/* ------------------------------------------------ the sheet: clean vellum, the music in ink (light ink by candlelight) */
.sheetwrap { position: relative; margin: 12px calc(-1 * var(--m)) 0; background: var(--page); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sheetwrap::before, .sheetwrap::after { content: ''; position: absolute; left: var(--m); right: var(--m); height: 1px; background: var(--gold); opacity: .5; }
.sheetwrap::before { top: 3px; } .sheetwrap::after { bottom: 3px; }
.sheet { padding: 10px 4px 14px; color: var(--note); min-height: 140px; }
.sheet svg { display: block; }
.sheet svg path, .sheet svg text { fill: var(--note); }
.sheet svg path[stroke], .sheet svg .abcjs-staff path, .sheet svg .abcjs-bar path { stroke: var(--note); }
.sheet .loading { padding: 48px var(--m); color: var(--muted); }
.sheet .abcjs-annotation, .sheet .abcjs-decoration { fill: var(--note-2) !important; }
.sheet .abcjs-chord { fill: var(--note-2) !important; font-style: italic; }
.sheet .wh-on, .sheet .wh-on path { fill: var(--note-on) !important; }
.sheet .tab circle { stroke: var(--note); stroke-width: .8; fill: transparent; }
.sheet .tab circle.c { fill: var(--note); }
.sheet .tab .half { fill: var(--note); }
.sheet .tab text { fill: var(--note) !important; font: 9px var(--ui); }
.sheet .tab text.oct { fill: var(--note-on) !important; }
.veil { position: absolute; inset: 0; display: flex; align-items: flex-start; padding: 40px var(--m) 24px; background: var(--page); color: var(--ink); }
.veil h3 { font: var(--t-d2); }
.veil p { margin: 8px 0 16px; color: var(--ink-2); }
.sheetwrap.veiled .sheet { height: 220px !important; min-height: 0; overflow: hidden; padding-bottom: 0 !important; }
.sheetwrap.veiled .sheet > * { visibility: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font: var(--t-body); color: var(--ink-2); margin: 8px 0; }
.legend b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.credit { font: var(--t-body); color: var(--muted); margin: 8px 0; }

/* ------------------------------------------------ the tune page: the initial, the title, the version, the page */
.thead { position: relative; margin: 16px 0 0; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
.thead > :not(.ini) { grid-column: 2; }
.thead > .ini { grid-row: 1 / span 3; align-self: start; }
.thead:not(:has(.ini)) { display: block; }
.tune-screen { position: relative; isolation: auto; }
.thead .tno { display: none; }
.thead h1 { font: var(--t-d1); margin: 0; overflow-wrap: anywhere; }
.thead .tmeta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 2px; font: var(--t-body); color: var(--ink-2); }
.thead .tmeta .lv { color: var(--muted); flex: none; }
.lib > .strainhead + .item { border-top: 0; }
.thead .tstate { font: var(--t-body); font-weight: 600; color: var(--verd); }
.thead .tstate:empty { display: none; }
.vseg { margin: 20px 0 12px; }
#panel.tool { margin: 16px 0 0; padding: 4px 0 8px; border-top: 1px solid var(--rule); }
.phead { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.phead h3 { font: var(--t-title); }
.phead .iconbtn.x { margin-right: -10px; }
.phead .iconbtn.x svg { width: 18px; height: 18px; }
.note { font: var(--t-body); color: var(--ink-2); margin: 0 0 12px; }
.note.center { text-align: center; margin-top: 8px; }
.trio { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.trio > span { font: var(--t-title); text-align: center; color: var(--ink); min-width: 88px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
#panel .segc, #panel .kv { margin: 0 0 12px; }
#panel .btn.primary { margin-top: 4px; }

/* the player: Loop | − | Play | + | Tempo. Paper, a gold hairline, one lapis (candlelight: gold) disc. */
.player { position: sticky; bottom: calc(var(--nav) + var(--safe-b)); z-index: 10; display: grid; grid-template-columns: 1fr 48px 64px 48px 1fr; align-items: center; column-gap: 8px;
  margin: 24px calc(-1 * var(--m)) 0; padding: 10px var(--m); min-height: 84px; background: var(--paper); border-top: 1px solid var(--rule); }
.player::before { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 1px; background: var(--gold); opacity: .55; }
.in-session .player { bottom: calc(var(--safe-b) + 77px); }
.player .pbox { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border-radius: var(--r); text-align: center; }
.player .pbox:active, .player .pm:active { background: var(--paper-3); }
.player .pbox b { font: var(--t-title); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player .pbox small { font: var(--t-body); color: var(--muted); white-space: nowrap; }
.player .pbox.on b { color: var(--madder); }
.player .pm { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--rule-2); border-radius: 50%; color: var(--ink); background: transparent; }
.player .pm svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.play { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--act); color: var(--on-act); justify-self: center; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--gold); }
.play:active { background: var(--act-d); }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.player .info, .player .opts { display: none; }
.tempo { display: flex; align-items: center; }
.tempo button { width: 44px; height: 44px; font-size: 22px; line-height: 1; color: var(--ink); border-radius: 50%; }
.tempo button:active { background: var(--paper-3); }
.tempo .v { min-width: 56px; text-align: center; font: var(--t-title); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; height: 44px; margin: 8px 0 0; background: none; -webkit-appearance: none; appearance: none; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--rule-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -12px; background: var(--act); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--gold); }
input[type=range]::-moz-range-track { height: 2px; background: var(--rule-2); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--act); }

/* ------------------------------------------------ the library */
.search { position: relative; margin: 20px 0 0; }
.search input { width: 100%; height: 48px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--page); padding: 0 44px 0 16px; font: 400 17px/24px var(--ui); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--lapis); box-shadow: 0 0 0 1px var(--lapis); }
.search input::-webkit-search-cancel-button { display: none; }
.search svg { display: none; }
.search .clear { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; color: var(--ink-2); font-size: 22px; line-height: 1; text-align: center; }
.libbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 12px 0 0; }
.libbar button { min-height: 44px; border-radius: var(--r); font: 500 15px/20px var(--ui); color: var(--ink-2); background: var(--paper-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; text-align: center; }
.libbar button.set { background: var(--lapis); color: var(--on-lapis); }
.count { font: var(--t-body); color: var(--muted); margin: 12px 0 0; }
.count:empty { display: none; }
.lib { margin-top: 8px; }
.lib .item { content-visibility: auto; contain-intrinsic-size: auto 64px; min-height: 64px; }
/* the hairline between rows starts after the initial, as in a well-set index */
.lib.list > .item + .item, .lib.list > .item:has(.ini) + .item { border-top: 0; }
.lib .item:has(.ini) { position: relative; }
.lib .item + .item:has(.ini)::before { content: ''; position: absolute; top: 0; left: 54px; right: 0; height: 1px; background: var(--rule); }
.lib .item:not(:has(.ini)) + .item:not(:has(.ini)) { border-top: 1px solid var(--rule); }
.lib > .sec { margin: 28px 0 0; padding-bottom: 4px; }
.lib > .sec + .item { border-top: 0; }
.lib > .sec:first-child { margin-top: 12px; }
/* a strain's section: a small painted headpiece, then its rubric */
.lib > .strainhead { margin: 28px 0 0; position: relative; }
.lib > .strainhead .art { height: 30px; margin: 0; background: url('art/headpiece.webp') left center / auto 30px no-repeat; }
.lib > .strainhead .sec { margin: 6px 0 4px; }
html[data-theme="candlelight"] .lib > .strainhead .art, html[data-theme="dark"] .lib > .strainhead .art { background-image: url('art/headpiece-dark.webp'); }
html[data-theme="candlelight"] .sheetpanel .grab, html[data-theme="dark"] .sheetpanel .grab { background-image: url('art/headpiece-dark.webp'); }
.lib > .strainhead + .item::before { display: none; }
.mark { color: var(--madder); }
.empty { color: var(--ink-2); padding: 32px 0; }

/* ------------------------------------------------ sheets that rise from the bottom: a page with a painted headpiece */
.sheetpanel { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; background: var(--scrim); animation: fade .14s linear both; }
.sheetpanel .box { position: relative; background: var(--paper) var(--grain); background-size: 256px; background-blend-mode: multiply; border-radius: 16px 16px 0 0; padding: 8px var(--m) calc(var(--safe-b) + 20px); max-height: 88vh; overflow-y: auto; animation: up .2s cubic-bezier(.2, 0, 0, 1) both;
  border-top: 1px solid var(--rule-2); box-shadow: inset 0 3px 0 -1px var(--gold); }
html[data-theme="candlelight"] .sheetpanel .box, html[data-theme="dark"] .sheetpanel .box { background-image: none; background-color: var(--paper-2); }
.sheetpanel .grab { width: 220px; height: 36px; border-radius: 0; background: url('art/headpiece.webp') center / contain no-repeat; margin: 4px auto 12px; }
.sheetpanel .grp, .mgrp { font: 600 15px/22px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--verm); margin: 20px 0 8px; }
.sheetpanel .btn.block { margin-top: 24px; }
.sheetpanel h2 { margin: 4px 0 8px; }
.sheetpanel .note { margin-top: 12px; }
.sheetpanel .helptext p { font: var(--t-body); color: var(--ink-2); margin: 0 0 10px; }
.mlist { margin-top: 16px; border-top: 1px solid var(--rule); }
.mlist button { display: flex; flex-direction: column; justify-content: center; width: 100%; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.mlist button b { font: var(--t-title); color: var(--ink); }
.mlist button span { font: var(--t-body); color: var(--muted); }
.mlist button.on b { color: var(--madder); }
.rlist { border-top: 1px solid var(--rule); }
.rlist button { display: grid; grid-template-columns: 1fr 56px 132px; align-items: center; width: 100%; min-height: 52px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.rlist button b { font: var(--t-title); color: var(--ink); text-align: left; }
.rlist .pc { font: var(--t-body); color: var(--ink); text-align: right; }
.rlist .bpm { font: var(--t-body); color: var(--muted); text-align: right; }
.rlist button.on b, .rlist button.on .pc { color: var(--madder); }
/* lore: a short true note, set like a page with an illuminated initial */
.loretext p { font: var(--t-body); color: var(--ink-2); margin: 0 0 10px; }
.loretext .ini { float: left; margin: 4px 12px 0 0; }
.loretext .src { color: var(--muted); }

/* ------------------------------------------------ Pro: a small gold lozenge, never a shout */
.promark { display: inline-block; flex: none; width: 16px; height: 16px; overflow: hidden; text-indent: 40px; white-space: nowrap; vertical-align: -2px; color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f1d688'/%3E%3Cstop offset='.5' stop-color='%23c9a040'/%3E%3Cstop offset='1' stop-color='%2394701f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M8 .8 15.2 8 8 15.2 .8 8Z' fill='url(%23g)' stroke='%235a4330' stroke-width='.7'/%3E%3Cpath d='M8 4.6 11.4 8 8 11.4 4.6 8Z' fill='%238b2c48'/%3E%3C/svg%3E") center / contain no-repeat; }
.paywall h2 { margin: 0 0 8px; }
.paywall > p { color: var(--ink-2); }
.paywall .adds { list-style: none; margin: 12px 0 20px; padding: 0; }
.paywall .adds li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--rule); color: var(--ink); }
.paywall .adds li:last-child { border-bottom: 1px solid var(--rule); }
.paywall .adds li::before { content: ''; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.paywall .btn.block { margin-top: 12px; }
.paywall .btns { justify-content: space-between; }
.paywall .btns .btn { flex: none; }

/* ------------------------------------------------ the account: plain forms */
.form { display: grid; gap: 16px; margin-top: 20px; }
.form label { display: grid; gap: 6px; font: 600 15px/22px var(--ui); color: var(--ink); }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--page); font: 400 17px/24px var(--ui); color: var(--ink); -webkit-appearance: none; appearance: none; }
.form textarea { padding: 12px 14px; min-height: 96px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 1px var(--lapis); }
.form .note { margin: -8px 0 0; }
.form .note:empty, .formmsg:empty { display: none; }
.formmsg { font: var(--t-body); color: var(--verm); }
.gbtn { margin: 20px 0 4px; min-height: 44px; }
.purpose + .gbtn.hide + .segc, .purpose + .segc { margin-top: 20px; }
.acct-who { display: grid; gap: 2px; margin: 20px 0 8px; }
.acct-who b { font: var(--t-title); color: var(--ink); overflow-wrap: anywhere; }

/* ------------------------------------------------ coach */
.segc.tabs5 { margin: 20px 0 8px; }
.tuner { padding: 8px 0; }
.tuner .note { font: 600 88px/96px var(--display); color: var(--ink); min-height: 96px; text-align: center; }
.tuner .note.in { color: var(--verd); }
.tuner .note sub { font-size: 28px; color: var(--muted); vertical-align: baseline; }
.tuner .cents { font: var(--t-body); color: var(--ink-2); text-align: center; }
.gauge { width: 100%; max-width: 330px; height: 150px; display: block; margin: 0 auto; }
/* the gauge's colours come from the theme (CSS beats the SVG's presentation attributes) */
.gauge > path:first-child { stroke: var(--rule-2); }
.gauge line:not(#needle) { stroke: var(--muted); stroke-opacity: .6; }
.gauge line:not(#needle):nth-of-type(5n+1) { stroke-opacity: 1; }
.gauge path[stroke="#3b7550"] { stroke: var(--verd); }
.gauge text { fill: var(--muted); }
.gauge #needle { stroke: var(--madder); }
.gauge circle { fill: var(--madder); }
.meter { height: 4px; border-radius: 2px; background: var(--paper-3); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .15s linear; }
canvas.trail { width: 100%; height: 96px; display: block; background: transparent; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 8px; }
.big { font: 600 40px/44px var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 16px 0; }
.kv div { padding: 4px 0; }
.kv span, .figs span { display: block; }
.notepick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.notepick button { min-height: 52px; border-radius: var(--r); background: var(--page); border: 1px solid var(--rule-2); font: 600 34px/1 var(--display); text-align: center; }
.notepick button.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); color: var(--madder); }
.notepick button.right { background: var(--verd); border-color: var(--verd); color: var(--page); }
.notepick button.wrong { color: var(--verm); text-decoration: line-through; }
.hint { font: var(--t-body); color: var(--ink-2); min-height: 44px; margin-top: 8px; }
.metro { text-align: center; }
.metro .bpm { font: 600 80px/88px var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.metro .ctl { display: flex; justify-content: center; align-items: center; gap: 4px; }
.metro .ctl .iconbtn { margin: 0; font: 600 15px var(--ui); color: var(--ink-2); }
.beats { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; min-height: 24px; }
.beats i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--rule-2); }
.beats i.acc { width: 14px; height: 14px; }
.beats i.hit { background: var(--gold); border-color: var(--gold); }

/* ------------------------------------------------ you: progress, skills */
.orns { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.orns div { min-height: 44px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); }
.orns b { font-weight: 400; } .orns .stars { color: var(--gold); letter-spacing: 2px; }
.orns .stars .dim { color: var(--paper-3); }

/* notices and toasts */
.note-box { padding: 12px 16px; border-radius: var(--r); background: var(--paper-2); color: var(--ink); margin: 12px 0; border-left: 3px solid var(--gold); }
.warn-box { padding: 12px 16px; border-radius: var(--r); background: var(--paper-2); color: var(--ink); margin: 12px 0; border-left: 3px solid var(--verm); }
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav) + var(--safe-b) + 12px); z-index: 70; max-width: 536px; margin: 0 auto; background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 14px 16px; font: var(--t-body); animation: fade .14s linear both; }
body.playing .toast { bottom: calc(var(--safe-b) + 90px); }
.take { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.take + .take { border-top: 1px solid var(--rule); }
.take .btn { min-height: 44px; padding: 0 12px; }
ul.ornlist { padding-left: 20px; margin: 8px 0; } ul.ornlist li { margin: 6px 0; }
.beat { font-family: 'Noto Music', 'Segoe UI Symbol', system-ui, sans-serif; font-style: normal; }
.flags, .status { display: none; }
.tools { display: flex; gap: 20px; margin-top: 12px; }
.coach-long .stepkind { display: none; }
.item.one { min-height: 60px; padding: 8px 0; }
.item.one .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib .item { contain-intrinsic-size: auto 64px; }

/* ------------------------------------------------ the design's word on structures from the features block (higher specificity, so it wins) */
:root .promark { margin: 0 0 0 6px; padding: 0; border: 0; border-radius: 0; font: 400 15px/1 var(--ui); letter-spacing: 0; text-transform: none; color: transparent; vertical-align: -2px; }
:root .pro-dot { display: inline-block; width: 8px; height: 8px; margin: 0 0 1px 6px; font-size: 0; background: var(--gold); transform: rotate(45deg); }
:root .chip.on .promark { color: transparent; }
:root .locked { text-align: left; padding: 20px 0; }
:root .locked p { margin: 0; }
:root .paywall ul.adds { padding-left: 0; margin: 12px 0 20px; }
:root .paywall ul.adds li { margin: 0; }
:root .form { gap: 16px; margin: 20px 0; }
:root .form label { font: 600 15px/22px var(--ui); color: var(--ink); gap: 6px; }
:root .form input { background: var(--page); font: 400 17px/24px var(--ui); padding: 0 14px; }
:root .form input:focus, :root .notearea:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 1px var(--lapis); }
:root .notearea { background: var(--page); font: var(--t-body); color: var(--ink); }
:root .formmsg { color: var(--verm); }
:root .weekbars .wd span { font: 400 15px/20px var(--ui); }
:root .weekbars .wd i, :root .weekchart rect { background: var(--verd); fill: var(--verd); }
:root .spark { color: var(--verd); }
:root .star { color: var(--muted); }
:root .star.on { color: var(--gold); }
:root .star.on svg { stroke: var(--gold-ink); }
:root .stbtn { min-height: 44px; border-radius: 22px; color: var(--ink-2); }
:root .stbtn.on { background: var(--lapis); border-color: var(--lapis); color: var(--on-lapis); }
:root .ptime { color: var(--madder); }
:root .tnote { background: var(--page); border: 1px solid var(--rule); }
:root .card.daily { padding: 16px; border-radius: var(--r); background: var(--page); border: 1px solid var(--rule); box-shadow: inset 3px 0 0 var(--gold); }
:root .setbar { border-bottom-color: var(--rule); }
:root ol.setl .item { gap: 12px; }
/* two-line rows written as title <br> caption: the title is already a block, so the <br> would add a blank line */
.item .grow > .t + br { display: none; }
.item .grow > .t + br + .small { display: block; }
:root .paywall .btns .btn { margin-top: 0; }

/* === features: structural styles (design worker restyles) === */
/* the tabs, Practice, You, accounts, Pro, setlists, the tracker. Colours come from the theme variables only. */
.promark { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; border: 1px solid currentColor; font: 600 11px/16px var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); vertical-align: middle; }
.pro-dot { margin-left: 3px; font: 600 9px/1 var(--ui); color: var(--gold-ink); text-transform: uppercase; }
.locked { padding: 24px 0; text-align: center; }
.locked p { margin: 12px 0 16px; color: var(--ink-2); }
.paywall ul.adds { margin: 8px 0 16px; padding-left: 20px; } .paywall ul.adds li { margin: 4px 0; }
.paywall .btn + .btn { margin-top: 10px; }
.center { text-align: center; }
.hint1 { margin: 8px 0 0; color: var(--ink-2); }
.chips.tops { flex-wrap: nowrap; overflow-x: auto; margin: 14px 0 4px; scrollbar-width: none; }
.chips.tops .promark { margin-left: 4px; }
.chip.on .promark { color: inherit; }
.item.one[role="link"] { cursor: pointer; }
.star { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.star svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.star.on { color: var(--gold); } .star.on svg { fill: currentColor; }
.tracker { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; min-height: 44px; }
.stbtn { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--rule-2); font: 500 15px/20px var(--ui); white-space: nowrap; }
.ptime { color: var(--gold-ink); }
.tnote { display: block; width: 100%; text-align: left; padding: 10px 12px; margin: 4px 0 8px; border-radius: var(--r); background: var(--paper-2); }
.tnote .mgrp { display: block; margin: 0 0 2px; }
.tnote .tx { white-space: pre-wrap; overflow-wrap: anywhere; }
.notearea { width: 100%; min-height: 140px; padding: 12px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--white); resize: vertical; }
.earlier { white-space: pre-wrap; overflow-wrap: anywhere; }
.setbar { display: flex; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
ol.setl { list-style: none; padding: 0; margin: 12px 0; }
ol.setl .item { gap: 4px; }
ol.setl .item .t { text-align: left; min-height: 44px; }
ol.setl .iconbtn[disabled] { opacity: .3; }
.weekbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 72px; margin: 8px 0 4px; align-items: end; }
.weekbars .wd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.weekbars .wd i { display: block; width: 60%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--green); }
.weekbars .wd span { font: 400 12px/14px var(--ui); color: var(--muted); }
.weekbars .wd.today span { color: var(--ink); font-weight: 600; }
.weekchart { width: 100%; height: 110px; display: block; margin: 8px 0; }
.weekchart rect { fill: var(--green); }
.spark { color: var(--green); flex: none; }
.tempo-tr { display: flex; align-items: center; gap: 8px; }
.form { display: grid; gap: 12px; margin: 16px 0; }
.form label { display: grid; gap: 4px; font: 500 15px/20px var(--ui); color: var(--ink-2); }
.form input { min-height: 48px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--white); color: var(--ink); font: var(--t-body); }
.form input:focus, .notearea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.formmsg { min-height: 22px; color: var(--red-ink); }
.gbtn { display: flex; justify-content: center; margin: 16px 0; min-height: 44px; }
.acct-who { display: grid; gap: 2px; margin: 8px 0 12px; }
.item.danger .t, .btn.danger { color: var(--red-ink); }
.grid3 button.locked { opacity: .55; }
a.item { text-decoration: none; color: inherit; }
.card.daily { margin: 16px 0 8px; padding: 16px; border-radius: var(--r); background: var(--paper-2); }
.card.daily .btn { margin-top: 10px; }
.paywall .prices { margin: 4px 0 12px; }
.thead h1 .lore { vertical-align: middle; margin-left: 6px; }

/* ================================================ v4: real illumination (research/ART_SOURCES.md)
   The painting is real: borders cut from public-domain Flemish books of hours (Getty Open Content, CC0), cleaned
   and framed with their own gold-and-madder moulding. The controls borrow the book's construction, not its age:
   a ruled double frame (madder hairline outside, gold inside) for fields, lapis grounds with a gold inner fillet for
   the chosen thing, as an illuminator set a letter on its ground. */
:root { --frame: #7b3a26; --fillet: #c9a040; --fillet-l: #e4c879; }
html[data-theme="candlelight"], html[data-theme="dark"] { --frame: #8a5a3c; --fillet: #b8913c; --fillet-l: #d8b45a; }
.band { position: relative; margin: 0 calc(-1 * var(--m)); aspect-ratio: 4530 / 1392; pointer-events: none; background: #d9b27a; }
.band img { display: block; width: 100%; height: 100%; }
.band + .head { margin-top: 26px; }
.band + .head h1 { font-size: 38px; line-height: 44px; letter-spacing: -.01em; }
/* lore: a real painted pansy (pensée, a thought) in a fine gold ring */
.lore { width: 40px; height: 40px; border: 1px solid var(--fillet); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .35);
  background: url('art/pansy.webp') center / 28px 28px no-repeat; align-self: center; }
.lore::after { inset: -4px; }
/* the search: the primary action, ruled like a framed panel */
.search { margin: 22px 0 0; }
.search input { height: 52px; padding-left: 46px; border: 1px solid var(--frame); border-radius: 3px; background: var(--page);
  box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3px var(--fillet-l); font: 400 17px/24px var(--ui); }
.search input:focus { border-color: var(--lapis); box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3px var(--fillet), 0 0 0 1px var(--lapis); }
.search svg { display: block; position: absolute; left: 15px; top: 15px; width: 22px; height: 22px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; pointer-events: none; }
.search .clear { top: 4px; }
/* view chips: words on vellum; the chosen one set on lapis with a gold fillet, like a letter on its ground */
.chips.tops { margin-top: 16px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--m)); margin-right: calc(-1 * var(--m)); padding: 2px var(--m); }
.chips.tops::-webkit-scrollbar { display: none; }
.chips.tops .chip { min-height: 40px; padding: 0 14px; border-radius: 3px; border: 1px solid transparent; color: var(--ink-2); font: 500 15px/20px var(--ui); flex: none; }
.chips.tops .chip:active { background: var(--paper-2); }
.chips.tops .chip.on { background: var(--lapis); color: var(--on-lapis); border-color: var(--lapis-d); box-shadow: inset 0 0 0 2px var(--lapis), inset 0 0 0 3px var(--fillet-l); font-weight: 600; }
html[data-theme="candlelight"] .chips.tops .chip.on, html[data-theme="dark"] .chips.tops .chip.on { background: #2d4a8c; color: #fbf3dc; border-color: #233b72; box-shadow: inset 0 0 0 2px #2d4a8c, inset 0 0 0 3px var(--fillet-l); }
/* sort and filter: two quiet words with small drawn marks, under a single hairline */
.libbar { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--rule); }
.libbar button { min-height: 44px; background: none; border-radius: 0; padding: 0 2px; color: var(--ink-2); font: 500 15px/20px var(--ui); display: inline-flex; align-items: center; gap: 8px; }
.libbar button::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
#srt { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2.5v11M2.5 11 5 13.5 7.5 11M11 13.5v-11M8.5 5 11 2.5 13.5 5'/%3E%3C/svg%3E"); }
#flt { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M2 4h12M4.5 8h7M7 12h2'/%3E%3C/svg%3E"); }
.libbar button.set { background: none; color: var(--lapis); font-weight: 600; }
.libbar + .count { margin-top: 4px; }
.search input { border-color: rgba(123, 58, 38, .72); box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3px rgba(201, 160, 64, .5); }
.chips.tops .chip.on { border-radius: 2px; }
/* the bands keep their painted proportions (width/height on the img) */
.band { aspect-ratio: auto; background: none; }
.band img { height: auto; }
.band + .head, .band + .today { margin-top: 26px; }
.band + .head h1, .band + .today h1 { font-size: 38px; line-height: 44px; letter-spacing: -.01em; }
/* the tune page: the bar (back, menu) on clean vellum, then the slim running border */
.art-bar .band.slim { margin: 0 calc(-1 * var(--m)); }
.top + .band.slim { margin-top: 0; }

/* ------------------------------------------------ v4 Practice: today's three tunes in a ruled panel, one Start */
.todaybox { margin-top: 24px; padding: 6px 16px 14px; background: var(--page); border: 1px solid rgba(123, 58, 38, .72); border-radius: 3px;
  box-shadow: inset 0 0 0 3px var(--page), inset 0 0 0 4px rgba(201, 160, 64, .55); }
html[data-theme="candlelight"] .todaybox, html[data-theme="dark"] .todaybox { border-color: var(--frame); }
.todaybox .sec { margin: 14px 0 2px; }
.todaybox .list .item { min-height: 68px; }
.todaybox .item .dim { font: var(--t-body); }
.todaybox .item.did .t { color: var(--ink-2); }
.todaybox .item.did .dim:first-of-type { color: var(--verd); }
.btn.big { min-height: 56px; font: 600 17px/24px var(--ui); color: var(--on-act); margin-top: 14px; }
.btn.big svg { width: 20px; height: 20px; }
.textbtn.centre { display: block; margin: 6px auto 0; }
.weekmarks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0 0; max-width: 360px; }
.weekmarks .wk { display: grid; justify-items: center; gap: 8px; }
.weekmarks .wk i { width: 14px; height: 14px; transform: rotate(45deg); border: 1.5px solid var(--fillet); background: transparent; }
.weekmarks .wk.on i { background: linear-gradient(135deg, #f0d88e, #c9a040 55%, #a07a26); border-color: #9a7524; }
.weekmarks .wk span { font: var(--t-body); color: var(--muted); }
.weekmarks .wk.today span { color: var(--verm); font-weight: 600; }
.weekline { margin-top: 10px; }
/* the session */
.todayhead { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.todayhead .ini { flex: none; }
.todayhead h2 { overflow-wrap: anywhere; }
.todayhead p { margin: 2px 0 0; }
.clock { flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  border: 1px solid var(--fillet); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(201, 160, 64, .45); }
.clock span { font: 600 30px/32px var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.clock small { font: 400 13px/16px var(--ui); color: var(--muted); }
.clock.paused span { color: var(--muted); }
.clock.up { border-color: var(--verd); } .clock.up small { color: var(--verd); }
.todayhow { margin: 14px 0 0; }
.ok-mark { color: var(--verd); display: grid; place-items: center; width: 28px; }
.ok-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.say { font: var(--t-body); color: var(--ink-2); margin: 8px 0 18px; }

/* ------------------------------------------------ v4 Lessons: the next lesson, then the path */
.nextbox h2 { margin: 2px 0 6px; }
.nextbox .stageline { font: var(--t-body); color: var(--muted); margin: 0 0 4px; }
.nextbox .mut { margin: 0; }
.btnmeta { margin-left: auto; padding-left: 12px; font-weight: 400; opacity: .85; }
.btn.big:has(.btnmeta) { justify-content: flex-start; padding: 0 20px; }
.path { margin-top: 6px; }
.stage { border-top: 1px solid var(--rule); }
.stage:last-child { border-bottom: 1px solid var(--rule); }
.stage > summary { list-style: none; display: flex; align-items: center; gap: 14px; min-height: 68px; cursor: pointer; padding: 6px 0; }
.stage > summary::-webkit-details-marker { display: none; }
.stage .num { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font: 600 19px/1 var(--display); font-variant-numeric: lining-nums; color: var(--ink-2);
  border: 1px solid var(--fillet); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .35); }
.stage.cur .num { background: var(--lapis); color: var(--on-lapis); border-color: var(--lapis-d); box-shadow: inset 0 0 0 2px var(--lapis), inset 0 0 0 3px var(--fillet-l); }
.stage.full .num { background: linear-gradient(135deg, #f0d88e, #c9a040 55%, #a07a26); color: #3a2a08; border-color: #9a7524; box-shadow: none; }
html[data-theme="candlelight"] .stage.cur .num, html[data-theme="dark"] .stage.cur .num { background: #2d4a8c; color: #fbf3dc; }
.stage .list { margin: 0 0 10px 54px; }
.stage .list .item { min-height: 52px; }
.pill.go { background: var(--lapis); color: var(--on-lapis); }
.nextmark { font: 600 15px/20px var(--ui); color: var(--verm); letter-spacing: .04em; }
/* a lesson: four numbered steps */
.lstep { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; }
.lstep h3 { font: var(--t-title); color: var(--ink); }
.stepn { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font: 600 17px/1 var(--display); font-variant-numeric: lining-nums; color: var(--on-lapis); background: var(--lapis);
  border-radius: 50%; box-shadow: inset 0 0 0 2px var(--lapis), inset 0 0 0 3px var(--fillet-l); }
html[data-theme="candlelight"] .stepn, html[data-theme="dark"] .stepn { background: #2d4a8c; color: #fbf3dc; box-shadow: inset 0 0 0 2px #2d4a8c, inset 0 0 0 3px var(--fillet-l); }
.howlist { margin: 0; padding-left: 22px; color: var(--ink); }
.howlist li { margin: 0 0 10px; padding-left: 4px; }
.howlist li::marker { color: var(--verm); font-weight: 600; }
.drill { color: var(--ink); margin: 0 0 6px; }
#test .btn.primary { margin-top: 4px; }
/* v4 headpiece: the real painted pansy between two fine gold rules (replaces the drawn vine) */
.sheetpanel .grab, html[data-theme="candlelight"] .sheetpanel .grab, html[data-theme="dark"] .sheetpanel .grab {
  width: 220px; height: 34px; margin: 4px auto 12px; border-radius: 0;
  background: url('art/pansy.webp') center / 30px 30px no-repeat,
    linear-gradient(var(--fillet), var(--fillet)) left 16.5px / 88px 1px no-repeat,
    linear-gradient(var(--fillet), var(--fillet)) right 16.5px / 88px 1px no-repeat; }
.lib > .strainhead .art, html[data-theme="candlelight"] .lib > .strainhead .art, html[data-theme="dark"] .lib > .strainhead .art {
  height: 30px; background: url('art/pansy.webp') 0 center / 26px 26px no-repeat, linear-gradient(var(--fillet), var(--fillet)) 36px center / 120px 1px no-repeat; }
#boot { background: var(--grain) 0 0 / 256px repeat var(--paper); background-blend-mode: multiply; }
html[data-theme="candlelight"] #boot, html[data-theme="dark"] #boot { background: var(--paper); }

/* ================================================ v5 (17 Nov, request #530): type, controls and rhythm
   TYPE  EB Garamond (titles, tune names, numbers, rubrics in true small capitals) + Figtree (everything you operate).
         Per screen: display 34, tune name 19 (serif), UI 16, small 14.
   SPACE a 4 px base; 8 / 12 / 16 / 24 / 32 / 48 between things; margins 20 (24 from 400 px).
   CONTROLS are painted with the paint of the initials (art/paint-*.webp, sampled from the same Getty page):
     primary   56 px, real lapis with a gold fillet inside (the one action of a screen)
     secondary 48 px, a ruled double frame: madder-brown hairline outside, gold hairline inside, ink words
     quiet     a word in lapis, 44 px to tap
     round     48 px discs with the same double rule; Play is a 68 px lapis disc in a shell-gold ring
   Chosen things (chips, segments, switches) are set on lapis with the gold fillet, as a letter on its ground. */
:root {
  --t-d1: 500 34px/40px var(--display); --t-d2: 500 28px/34px var(--display);
  --t-name: 500 19px/24px var(--display);
  --t-title: 600 16px/22px var(--ui); --t-body: 400 15px/22px var(--ui); --t-small: 400 14px/20px var(--ui);
  --paint-lapis: url('art/paint-lapis.webp'); --paint-gold: url('art/paint-gold.webp'); --paint-madder: url('art/paint-madder.webp');
  --rim: rgba(123, 58, 38, .62);           /* the madder-brown outer hairline */
  --fil: rgba(201, 160, 64, .78);          /* the gold inner hairline */
  --r: 4px;
}
html[data-theme="candlelight"], html[data-theme="dark"] { --rim: rgba(216, 180, 90, .40); --fil: rgba(216, 180, 90, .55); }
h1 { letter-spacing: 0; }
.band + .head h1, .band + .today h1 { font: 500 38px/44px var(--display); letter-spacing: -.005em; }
.thead h1 { font: 500 32px/38px var(--display); }
.head .sub, .lede, .purpose { font: var(--t-body); color: var(--ink-2); }
/* rubrics: true small capitals in vermilion */
.sec { font: 600 17px/22px 'Rubric Digits', var(--display); font-variant: all-small-caps lining-nums; letter-spacing: .09em; text-transform: none; color: var(--verm); margin: 32px 0 6px; }
.nextmark { font: 600 16px/20px var(--display); font-variant: all-small-caps; letter-spacing: .08em; }

/* ---- buttons */
.btn { min-height: 48px; padding: 0 22px; border-radius: var(--r); font: var(--t-title); letter-spacing: .005em; color: var(--ink);
  border: 1px solid var(--rim); background: transparent; box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--fil); }
.btn:active { background: var(--paper-2); }
.btn.primary, .btn.big { min-height: 56px; color: #fbf3dc; border: 1px solid #1c2f5e;
  background: #2d4a8c var(--paint-lapis) center / 192px repeat;
  box-shadow: inset 0 0 0 2px rgba(45, 74, 140, .0), inset 0 0 0 3px rgba(233, 207, 134, .9), 0 1px 0 rgba(31, 26, 21, .10); text-shadow: 0 1px 0 rgba(10, 20, 50, .35); }
.btn.primary:active, .btn.big:active { filter: brightness(.9); }
html[data-theme="candlelight"] .btn.primary, html[data-theme="dark"] .btn.primary, html[data-theme="candlelight"] .btn.big, html[data-theme="dark"] .btn.big { color: #fbf3dc; }
.btn.quiet { border: 0; box-shadow: none; background: none; color: var(--lapis); padding: 0 4px; min-height: 44px; }
.btn.small { min-height: 40px; padding: 0 16px; font: 600 15px/20px var(--ui); }
.btn.danger { color: var(--verm); border-color: rgba(176, 54, 29, .6); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(176, 54, 29, .35); }
.btn.moss { color: var(--verd); }
.textbtn { font: 600 16px/22px var(--ui); }
/* the tracker's status: a small framed tag you can tap */
.stbtn, :root .stbtn { min-height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--rim); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--fil);
  font: 600 15px/20px var(--ui); color: var(--ink); background: transparent; }
:root .stbtn.on { color: #fbf3dc; background: #2d4a8c var(--paint-lapis) center / 192px; border-color: #1c2f5e; box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px rgba(233, 207, 134, .9); }

/* ---- chips (the library's views) */
.chips.tops { gap: 4px; margin-top: 18px; }
.chips.tops .chip { min-height: 40px; padding: 0 14px; border-radius: var(--r); font: 500 15px/20px var(--ui); color: var(--ink-2); border: 1px solid transparent; }
.chips.tops .chip.on, html[data-theme="candlelight"] .chips.tops .chip.on, html[data-theme="dark"] .chips.tops .chip.on {
  color: #fbf3dc; font-weight: 600; background: #2d4a8c var(--paint-lapis) center / 192px; border-color: #1c2f5e; border-radius: var(--r);
  box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px rgba(233, 207, 134, .85); }
.chip { border-radius: var(--r); border-color: var(--rim); }
.chip.on { color: #fbf3dc; background: #2d4a8c var(--paint-lapis) center / 192px; border-color: #1c2f5e; box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px rgba(233, 207, 134, .85); }

/* ---- segments: a ruled frame; the chosen one set on lapis */
.segc, .seg { gap: 0; padding: 3px; border-radius: var(--r); background: rgba(251, 248, 239, .5); border: 1px solid var(--rim); box-shadow: none; }
html[data-theme="candlelight"] .segc, html[data-theme="dark"] .segc, html[data-theme="candlelight"] .seg, html[data-theme="dark"] .seg { background: transparent; }
.segc button, .seg button { min-height: 42px; border-radius: 2px; font: 500 15px/20px var(--ui); color: var(--ink-2); }
.segc button.on, .seg button.on, .segc.multi button.on { color: #fbf3dc; font-weight: 600; background: #2d4a8c var(--paint-lapis) center / 192px;
  box-shadow: inset 0 0 0 1px #1c2f5e, inset 0 0 0 3px rgba(233, 207, 134, .8); }
.vseg { margin: 24px 0 16px; }
.segc button.locked::after, .segc button[data-pro]::after { background: var(--gold); }

/* ---- grids of choices and switches */
.grid3 button, .grid4 button, .notepick button { border-radius: var(--r); border: 1px solid var(--rim); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .4); }
.grid3 button.on, .grid4 button.on { color: #fbf3dc; background: #2d4a8c var(--paint-lapis) center / 192px; border-color: #1c2f5e; box-shadow: inset 0 0 0 3px rgba(233, 207, 134, .8); }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--paper-2); border: 1px solid var(--rim); }
.switch::after { top: 4px; left: 4px; width: 20px; height: 20px; background: var(--page); box-shadow: 0 0 0 1px var(--fil), 0 1px 1px rgba(31, 26, 21, .2); }
.switch.on, .switch[aria-checked="true"] { background: #2d4a8c var(--paint-lapis) center / 96px; border-color: #1c2f5e; }
.switch.on::after, .switch[aria-checked="true"]::after { background: #f3e2ae; box-shadow: 0 0 0 1px #9a7524, 0 1px 1px rgba(0, 0, 0, .3); }
.check i { border-radius: 3px; border-color: var(--rim); }
.check.on i { background: #2f6a48; border-color: #24533a; }

/* ---- the player: double-ruled discs, and Play in lapis within a ring of shell gold */
.player { min-height: 88px; }
.player .pm { width: 48px; height: 48px; border: 1px solid var(--rim); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .45); }
.play { width: 68px; height: 68px; background: #2d4a8c var(--paint-lapis) center / 136px; color: #fbf3dc;
  box-shadow: inset 0 0 0 1px #1c2f5e, inset 0 0 0 3px rgba(233, 207, 134, .85), 0 0 0 2px var(--paper), 0 0 0 5px #c9a040, 0 0 0 6px rgba(123, 58, 38, .55); }
.play:active { filter: brightness(.9); background-color: #2d4a8c; }
html[data-theme="candlelight"] .play, html[data-theme="dark"] .play { background-color: #2d4a8c; color: #fbf3dc; }
.player .pbox b { font: 600 16px/22px var(--ui); }
.player .pbox small { font: var(--t-small); }
input[type=range]::-webkit-slider-thumb { background: #2d4a8c var(--paint-lapis) center / 64px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px #c9a040; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(var(--fil), var(--fil)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--rim), var(--rim)) 0 2px / 100% 1px no-repeat; }

/* ---- the library rows: initial, the name in the book face, state, star */
.item.one { min-height: 64px; padding: 10px 0; gap: 16px; }
.item.one .t, .lib .item .t { font: var(--t-name); color: var(--ink); }
.item .state { font: var(--t-small); }
.lib .item + .item:has(.ini)::before { left: 60px; }
.star svg { stroke-width: 1.4; }
.search input { font: 400 17px/24px var(--ui); }
.libbar button { font: 500 15px/20px var(--ui); }
.count { font: var(--t-small); }

/* ---- the tune page head */
.thead { column-gap: 18px; margin-top: 20px; }
.thead > .ini { grid-row: 1 / span 3; align-self: start; }
.thead .tmeta { font: var(--t-body); margin-top: 4px; }
.tracker { margin-top: 16px; }
/* names of things you learn (tunes, lessons) are set in the book face; settings and actions stay in Figtree */
.stage .list .item .t, .nextbox h2, .todaybox .item .t { font: var(--t-name); }
.nextbox h2 { font: var(--t-d2); }
/* sheet group labels are rubrics too */
.sheetpanel .grp, .mgrp { font: 600 17px/22px 'Rubric Digits', var(--display); font-variant: all-small-caps lining-nums; letter-spacing: .09em; text-transform: none; color: var(--verm); }
/* many choices at once (the filter): one fine rule each, so a page of them stays light */
.sheetpanel .chip, .chips:not(.tops) .chip { min-height: 44px; border: 1px solid var(--rule-2); box-shadow: none; color: var(--ink); font: 500 15px/20px var(--ui); }
/* empty states: a painted flower, one line in the book face, a quiet way out */
.empty { padding: 40px 12px 24px; text-align: center; color: var(--ink-2); font: 400 19px/26px var(--display); }
.empty::before { content: ''; display: block; width: 44px; height: 44px; margin: 0 auto 14px; background: url('art/pansy.webp') center / contain no-repeat; opacity: .9; }
.sheetpanel .chip.on, .chips:not(.tops) .chip.on { color: #fbf3dc; border-color: #1c2f5e; background: #2d4a8c var(--paint-lapis) center / 192px; box-shadow: inset 0 0 0 3px rgba(233, 207, 134, .8); }
/* the lore flower ends the meta line (form, level, flower), so a long title never pushes it onto a line of its own */
.thead .tmeta { align-items: center; }
.thead .tmeta > span:first-child { flex: 1; min-width: 0; }
.thead .tmeta .lore { width: 36px; height: 36px; background-size: 24px 24px; margin-left: 4px; flex: none; }
/* the drawn icons: a pen chevron (thick at the turn, fine at the ends) and the rubric lozenge for "more" */
.iconbtn svg.pen, svg.pen { fill: currentColor; stroke: none; }
.star.on svg { fill: #d9b04f; stroke: #7a5a12; }
/* guided practice: two or three plain steps per tune; the current one set on vellum with a gold rule, done ones in verdigris */
.gsteps { list-style: none; margin: 18px 0 4px; padding: 0; }
.gsteps li { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r); cursor: pointer; }
.gsteps li + li { border-top: 1px solid var(--rule); }
.gsteps li .n { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font: 600 17px/1 'Rubric Digits', var(--display);
  color: var(--ink-2); border: 1px solid var(--rim); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .45); }
.gsteps li b { display: block; font: var(--t-name); color: var(--ink); }
.gsteps li .grow > span { display: block; font: var(--t-small); color: var(--ink-2); }
.gsteps li .btn.small { flex: none; min-height: 40px; padding: 0 12px; gap: 6px; }
.gsteps li .btn.small svg { display: block; width: 14px; height: 14px; }
.gsteps li.cur { background: var(--page); box-shadow: inset 3px 0 0 #c9a040; }
.gsteps li.cur + li { border-top-color: transparent; }
.gsteps li.cur .n { color: #fbf3dc; border-color: #1c2f5e; background: #2d4a8c var(--paint-lapis) center / 96px; box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px rgba(233, 207, 134, .85); }
.gsteps li.done .n { color: #fbf3dc; background: #2f6a48; border-color: #24533a; box-shadow: none; }
.gsteps li.done b { color: var(--ink-2); }
html[data-theme="candlelight"] .gsteps li.cur, html[data-theme="dark"] .gsteps li.cur { background: var(--paper-2); }
.todayhead .clock { width: 80px; height: 80px; } .todayhead .clock span { font-size: 26px; line-height: 28px; }
/* ---- v5 flora: real painted plants from the Book of Flower Studies (Master of Claude de France, c. 1510-15; The Met,
   public domain), only in empty margins, never under words. They grow out of the frame: the cut end fades. */
.todaybox { position: relative; }
/* (18 Nov: the plant that grew over the corner of the Today card is gone: nothing is laid over a frame or a title) */
.empty::before { width: 96px; height: 114px; background-image: url('art/flora-violet.webp');
  -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
html[data-theme="candlelight"] .empty::before, html[data-theme="dark"] .empty::before { filter: brightness(.9); }
.flora-wd { float: right; width: 112px; height: 160px; margin: -64px -6px 0 12px; background: url('art/flora-cornflower.webp') right top / contain no-repeat;
  -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); pointer-events: none; }
/* ---- Settings (settings.js): one calm page. Rubric heads, ruled rows, the control at the right edge. */
.setcard { margin: 0; }
.setcard .setrow { padding: 8px 0; }
.setcard .setrow .t, .setrow > .grow { font: var(--t-title); color: var(--ink); }
.setrow .grow .dim { font: var(--t-body); }
.setrow .grow { min-width: 0; }
.setsub { margin-top: 20px; font-size: 13px; color: var(--ink-2); }
.setrow .val { font: 600 20px/24px var(--display); color: var(--lapis); min-width: 44px; text-align: center; }
.setrow .pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px 0 12px; font: 500 15px/20px var(--ui); color: var(--lapis); }
.setrow .segc.mini { min-width: 0; max-width: 62%; }
.setrow .segc.mini button { padding: 0 10px; }
.setrow input[type=time] { min-height: 44px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--page); color: var(--ink); font: 500 17px/24px var(--ui); font-variant-numeric: tabular-nums; }
.setcard .formmsg { margin: 4px 0 8px; color: var(--ink-2); }
.chev.ext { font: 400 17px/1 var(--ui); }
.colophon { margin: 40px 0 8px; text-align: center; font: italic 400 15px/22px var(--display); color: var(--muted); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 0; font: var(--t-title); color: var(--ink); cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; margin-left: auto; flex: none; width: 8px; height: 8px; border-right: 1.6px solid var(--lapis); border-bottom: 1.6px solid var(--lapis); transform: rotate(45deg) translate(-2px, -2px); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq p { margin: 0 0 14px; font: var(--t-body); color: var(--ink-2); }
html[data-motion="less"] *, html[data-motion="less"] *::before, html[data-motion="less"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.setrow.stack { flex-wrap: wrap; row-gap: 4px; }
.setrow.stack > .grow { flex-basis: 100%; }
.setrow.stack .segc.mini { flex: 1 1 100%; max-width: none; margin-bottom: 4px; }
.setrow .grow .dim, .item .dim.small { text-wrap: pretty; }

/* ================================================ v6 Practice (18 Nov): the day's dial and one Start; in the session
   one instruction and one button at a time; after the last step, how it went. */
.todaybox.v6 { padding: 18px 16px 14px; }
.dialrow { display: flex; align-items: center; gap: 18px; min-height: 112px; padding-right: 62px; }
.dialrow .sec { margin: 0 0 2px; }
.dialsay { font: 500 24px/28px var(--display); color: var(--ink); margin: 0; }
.dialrow .dim { margin: 2px 0 0; }
.dial { position: relative; flex: none; width: 112px; height: 112px; }
.dial svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dial .tr { fill: none; stroke: rgba(201, 160, 64, .15); stroke-width: 7.6; }
.dial .rim { fill: none; stroke: var(--rim); stroke-width: .9; }
.dial .rim.in { stroke: var(--fil); }
.dial .tk line { stroke: var(--rim); stroke-width: 1; stroke-linecap: round; }
.dial .arc { fill: none; stroke-width: 6.2; stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2, .7, .2, 1); }
.dial .dc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial .dc b { font: 500 40px/38px var(--display); color: var(--ink); }
.dial .dc small { font: var(--t-small); color: var(--muted); margin-top: 1px; }
.dial.full .dc b { color: var(--gold-ink); }
.todaybox.v6 .list { margin-top: 12px; border-top: 1px solid var(--rule); }
.todaybox.v6 .item .ok-mark { flex: none; }
.todaybox.v6 .btn.big { margin-top: 12px; }
.todaybox.wd .list .item { min-height: 60px; }
/* the session's top: the day's tunes as lozenges (vermilion: this one; gold: done), and the clock */
.loz { display: flex; gap: 12px; align-items: center; margin-left: 8px; }
.loz i { width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid var(--fil); }
.loz i.cur { border-color: var(--verm); background: var(--verm); }
.loz i.on { background: linear-gradient(135deg, #f0d88e, #c9a040 55%, #a07a26); border-color: #9a7524; }
.sclock { font: 500 20px/24px var(--display); color: var(--ink-2); padding-right: 2px; }
.in-session .todayhead { margin-top: 4px; }
.in-session .todayhead h2 { font: 500 26px/30px var(--display); }
/* what to do now: one ruled card */
.stepcard { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; padding: 14px 8px 14px 16px; min-height: 104px; background: var(--page); border: 1px solid var(--rim); border-radius: 3px;
  box-shadow: inset 0 0 0 3px var(--page), inset 0 0 0 4px rgba(201, 160, 64, .5); }
.stepcard .sec { margin: 0 0 2px; font-size: 15px; line-height: 20px; }
.stepcard h3 { font: 500 26px/30px var(--display); color: var(--ink); }
.stepcard p { margin: 4px 0 0; font: var(--t-body); color: var(--ink-2); text-wrap: pretty; }
.stepcard .pace { flex: none; }
.stepcard .pace .v { min-width: 46px; font: 600 16px/22px var(--ui); }
.stepcard .pace button { display: grid; place-items: center; border: 1px solid var(--rim); box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3px rgba(201, 160, 64, .45); width: 40px; height: 40px; }
.stepcard .pace button svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; }
html[data-theme="candlelight"] .stepcard, html[data-theme="dark"] .stepcard { background: var(--paper-2); box-shadow: inset 0 0 0 3px var(--paper-2), inset 0 0 0 4px rgba(216, 180, 90, .4); }
html[data-theme="candlelight"] .stepcard .pace button, html[data-theme="dark"] .stepcard .pace button { box-shadow: none; }
#tp.bare .vseg, #tp.bare .player, #tp.bare details.how { display: none; }
#tp.bare .sheetwrap { margin-top: 16px; }
.sess-act { gap: 10px; align-items: stretch; }
.sess-act .btn { min-height: 56px; flex: 1; padding: 0 12px; }
.sess-act .btn.primary { flex: 2.2; }
.sess-act .btn.quiet { flex: 0 0 auto; padding: 0 16px 0 6px; min-height: 56px; }
.sess-act .btn svg { width: 18px; height: 18px; }
.sess-act .btn:disabled { opacity: .55; }
.search.slim { margin-top: 16px; }
.search.slim input { padding-left: 16px; height: 48px; }
/* the version: a ruled slider with three stops (Plain, Ornamented, Full), their names under it, and the ~ button
   that opens the kinds of ornament */
.vslide { margin: 20px 0 14px; }
.vslide .vrow { display: flex; align-items: center; gap: 12px; }
.vslide .vtrack { position: relative; flex: 1; min-width: 0; height: 44px; }
.vslide .vtrack input[type=range] { position: relative; z-index: 1; display: block; width: 100%; height: 44px; margin: 0; }
.vslide .vtrack i { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; transform: rotate(45deg); background: var(--paper); border: 1.2px solid var(--fillet); }
.vslide .vtrack i:nth-child(1) { left: 14px; } .vslide .vtrack i:nth-child(2) { left: 50%; } .vslide .vtrack i:nth-child(3) { left: calc(100% - 14px); }
.vslide input[type=range]::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -12.5px; }
.vslide input[type=range]::-moz-range-thumb { width: 28px; height: 28px; }
.vslide .vlab { display: grid; grid-template-columns: 1fr auto 1fr; margin: -4px 56px 0 0; }
.vslide .vlab button { min-height: 32px; padding: 0 2px; font: 500 15px/20px var(--ui); color: var(--muted); white-space: nowrap; }
.vslide .vlab button:nth-child(1) { text-align: left; } .vslide .vlab button:nth-child(2) { text-align: center; } .vslide .vlab button:nth-child(3) { text-align: right; }
.vslide .vlab button.on { color: var(--ink); font-weight: 600; }
.ornbtn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); border: 1px solid var(--rim);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .45); }
.ornbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.ornbtn:active { background: var(--paper-2); }
.ornbtn.off { opacity: .35; }
#tp.bare .vslide { display: none; }
/* the collections: small ruled cards, each with a miniature cut from the painted borders; the chosen one set on lapis */
/* You: where you stand, three figures in the book face between two fine rules */
.youkv { margin: 20px 0 8px; padding: 14px 0 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); position: relative; }
.youkv::before { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 1px; background: var(--gold); opacity: .5; }
.youkv b { font: 500 34px/38px var(--display); }
.youkv span { font: var(--t-small); color: var(--ink-2); }
/* the tabs: a drawn book, whistle and figure over the words */
nav#nav button { gap: 3px; font: 500 14px/18px var(--ui); padding-top: 6px; }
nav#nav button svg { width: 23px; height: 23px; stroke-width: 1.5; }
nav#nav button svg .f { fill: currentColor; stroke: none; }
nav#nav button.on::before, nav#nav button:has(svg).on::before { top: 3px; width: 5px; height: 5px; margin-left: -2.5px; }
/* the band: small ruled roundels with a drawn instrument each. Above the player they show who is playing (and stir
   with each stroke: --lv, 0 to 1); in the mixer each has its level and its switch. */
.roundel { --lv: 0; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--page); border: 1px solid var(--rim);
  box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3px rgba(201, 160, 64, .5), 0 0 0 calc(var(--lv) * 3.5px) rgba(201, 160, 64, calc(.18 + var(--lv) * .3)); }
.roundel svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.roundel svg .f { fill: currentColor; stroke: none; } .roundel svg .k { stroke-width: 2.5; stroke-linecap: butt; }
html[data-theme="candlelight"] .roundel, html[data-theme="dark"] .roundel { background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--paper-2), inset 0 0 0 3px rgba(216, 180, 90, .4), 0 0 0 calc(var(--lv) * 3.5px) rgba(216, 180, 90, calc(.18 + var(--lv) * .3)); }
.player .bandstrip { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 2px 4px; text-align: left; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.player .bandstrip .bl { font: var(--t-small); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 4px; }
.player .bandstrip .chev { padding: 0 2px; }
.player .bandstrip:active { background: var(--paper-2); }
.bandlist { margin: 4px 0 6px; }
.bandrow { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.bandrow + .bandrow { border-top: 1px solid var(--rule); }
.bandrow .roundel { width: 40px; height: 40px; opacity: .55; } .bandrow .roundel svg { width: 23px; height: 23px; }
.bandrow.on .roundel { opacity: 1; color: #fbf3dc; background: #2d4a8c var(--paint-lapis) center / 96px; border-color: #1c2f5e; box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px rgba(233, 207, 134, .85); }
.bandrow .bn { flex: 0 0 78px; font: var(--t-title); color: var(--ink-2); } .bandrow.on .bn { color: var(--ink); }
.bandrow input[type=range] { flex: 1; min-width: 0; margin: 0; height: 44px; opacity: .45; } .bandrow.on input[type=range] { opacity: 1; }
.bandrow .switch { flex: none; }
.sheetpanel .btns .btn.primary { flex: 1.4; }
@media (max-width: 380px) {
  .dial { width: 92px; height: 92px; } .dial .dc b { font-size: 34px; line-height: 32px; }
  .dialrow { gap: 14px; padding-right: 40px; min-height: 96px; } .dialsay { font-size: 22px; line-height: 26px; }
  .todaybox.v6::after { width: 86px; height: 100px; top: -40px; right: -8px; }
}

/* ---- story initials (illum.js, tools/apply_initials.py): each tune's historiated initial, painted after real manuscripts.
   The placeholder colour shows while the painting loads; the head initial is a button that opens its story. */
.ini.story { object-fit: cover; border-radius: 2px; }
.thead > .ini-head.story { width: 104px; height: 104px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
.thead > .ini-head.story:active { transform: scale(.97); }
.ini-head.story:focus-visible { outline: 2px solid var(--lapis); outline-offset: 3px; }
@media (max-width: 380px) { .thead > .ini-head.story { width: 92px; height: 92px; } }
.inibig { display: flex; justify-content: center; margin: 8px 0 18px; }
.inibig img { width: min(300px, 76vw); height: auto; aspect-ratio: 1; border-radius: 3px; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.inistory { font: var(--t-title); font-weight: 500; color: var(--ink); margin: 0 0 8px; }
html[data-theme="candlelight"] .ini.story, html[data-theme="dark"] .ini.story { filter: brightness(.94); }
@media (prefers-reduced-motion: reduce) { .thead > .ini-head.story { transition: none; } }
/* the tune's ornamented title band (illum.js W.titleBand) in place of the running border: inside the margins */
.art-bar .band.slim.titleband { margin: 6px 0 0; aspect-ratio: 6 / 1; }
.band.titleband img { width: 100%; height: auto; }
/* You: your tunes (the rows of the library, with their initials) */
.mgrp.yourtunes { margin: 28px 0 4px; }
#mine.lib { margin-bottom: 8px; }
#mine.folded > .item:nth-child(n + 7) { display: none; }
.allmine { display: block; margin: 4px 0 16px; min-height: 44px; }
.yourempty { margin: 6px 0 22px; }
.seeold { margin: 18px 0 8px; }
/* the status button opens a choice: a small chevron says so */
#stb::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 2px 4px 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .65; vertical-align: middle; }

/* the logo (tools/apply_logo_v4.py): the round picture at the head of a screen is the app's logo */
.head > .lore { background: url('art/logo-round.webp') center / cover no-repeat; }

/* narrow phones: "Reel in E minor" never breaks inside itself; the level and the lore flower share the line below */
/* a longer line ("Early music in E dorian") takes the row for itself, at any width, and the same pair goes below */
.thead .tmeta > span:first-child { white-space: nowrap; flex: 1 0 auto; }
.thead .tmeta { flex-wrap: wrap; row-gap: 0; }
@media (max-width: 380px) {
  .thead .tmeta > span:first-child { flex: 1 0 100%; }
}

/* ---- the music as a thing to touch (tune.js): tap a note to play from there, hold to loop, drag the two handles ---- */
.sheet { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.sheet:focus-visible { outline: 2px solid var(--lapis); outline-offset: -4px; }
/* ornament signs: drawn with a pen in the blue of the initials; red with their note as the tune passes */
.ornsym path { fill: var(--lapis); stroke: none; }
.ornsym path.ln { fill: none; stroke: var(--lapis); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sheet svg .ornsym path { fill: var(--lapis); }
.sheet svg .ornsym path.ln { fill: none; stroke: var(--lapis); }
.sheet svg .ornsym .hit, .sheet svg .selh .hit { fill: transparent !important; stroke: none; }
.sheet svg .ornsym.wh-on path { fill: var(--note-on) !important; }
.sheet svg .ornsym.wh-on path.ln { fill: none !important; stroke: var(--note-on); }
.sheet svg .abcjs-decoration, .sheet svg [data-name^="scripts"] { fill: var(--lapis) !important; }
.sheet svg .wh-on.abcjs-decoration, .sheet svg .wh-on [data-name^="scripts"] { fill: var(--note-on) !important; }
svg.ornsym { width: 22px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.legend span { display: inline-flex; align-items: center; }
/* the keyboard's place on the music */
.sheet svg .wh-key, .sheet svg .wh-key path { fill: var(--lapis) !important; }
/* the loop on the music: a ground of thin gold under its bars, a blue rule with a gilded bead at either end */
.sheet svg .selhl rect { fill: rgba(201, 160, 64, .17); stroke: rgba(176, 138, 51, .5); stroke-width: .8; }
.sheet svg .selh { cursor: ew-resize; touch-action: none; outline: none; }
.sheet svg .selh .stem { fill: none; stroke: var(--lapis); stroke-width: 1.6; stroke-linecap: round; }
.sheet svg .selh .bead { fill: var(--lapis) !important; stroke: var(--gold); stroke-width: 1.8; transition: r .12s; }
.sheet svg .selh .pip { fill: var(--gold-l) !important; stroke: none; }
.sheet svg .selh.drag .bead, .sheet svg .selh:focus-visible .bead { r: 9px; }
.sheet svg .selh:focus-visible .stem { stroke-width: 2.6; }
/* the strip over the player: the section between its two steps, or the offer to loop from a tapped note */
.player .loopstrip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 48px; padding: 2px 0 4px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.player .loopstrip.hide { display: none; }
.loopstrip button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); border-radius: var(--r); }
.loopstrip button:active { background: var(--paper-3); }
.loopstrip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.loopstrip .ls-step, .loopstrip .ls-x { width: 44px; color: var(--ink-2); }
.loopstrip .ls-step:disabled { opacity: .28; }
.loopstrip .ls-x { margin-left: auto; }
.loopstrip .ls-x svg { width: 18px; height: 18px; }
.loopstrip .ls-step:first-child { margin-left: 44px; }      /* the name stays in the middle: the clear button's width on the other side */
.loopstrip .ls-name { flex: 1 1 auto; min-width: 0; gap: 8px; padding: 0 8px; }
.loopstrip .ls-name svg, .loopstrip .ls-chip svg { color: var(--madder); width: 18px; height: 18px; }
.loopstrip .ls-name b { font: 600 16px/22px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.loopstrip .ls-chip { gap: 8px; padding: 0 16px; min-height: 40px; font: 500 15px/20px var(--ui); border: 1px solid var(--rim); border-radius: 22px; box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .4); animation: lschip .22s ease-out; }
@keyframes lschip { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .loopstrip .ls-chip { animation: none; } .sheet svg .selh .bead { transition: none; } }
.toast.top { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 12px); }
body.playing .toast.top { bottom: auto; }

/* ---- the welcome (welcome.js): a short story a page at a time, then one calm page about Pro; once. All of the
   welcome's and the About page's rules are in this section (to its end mark). ---- */
.welcome { position: fixed; inset: 0; z-index: 80; background: var(--paper) var(--grain) repeat; background-size: 256px; background-blend-mode: multiply; color: var(--ink); animation: fade .2s linear both; transition: opacity .24s linear; }
.welcome.gone { opacity: 0; pointer-events: none; }
.wl-in { height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
/* the pages side by side: the finger drags the strip, and it settles on a page */
.wl-track { flex: 1 1 auto; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.wl-track::-webkit-scrollbar { display: none; }
.wl-page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; display: flex; flex-direction: column; }
.wl-page::-webkit-scrollbar { display: none; }
/* a page's head: a painted border of the book, edge to edge */
.wl-art { flex: none; background: #d9b27a; }
.wl-art img { display: block; width: 100%; height: 100%; }
/* the first page's picture, closed above and below by the borders' own moulding */
.wl-pic { flex: none; position: relative; background: #b9a983; padding: calc(min(100vw, 560px) * .022) 0; }
.wl-pic::before, .wl-pic::after { content: ''; position: absolute; left: 0; right: 0; height: calc(min(100vw, 560px) * .022); background: #7a3a22 url('art/moulding.webp') center / 100% 100% no-repeat; }
.wl-pic::before { top: 0; } .wl-pic::after { bottom: 0; transform: scaleY(-1); }
.wl-pic img { display: block; width: 100%; height: auto; aspect-ratio: 1431 / 1025; max-height: 38vh; object-fit: cover; object-position: 50% 14%; }
.wl-text { flex: 1 0 auto; padding: 26px var(--m) 10px; display: flex; flex-direction: column; }
.wl-text h1 { font: 500 34px/40px var(--display); letter-spacing: -.005em; margin: 0 0 12px; text-wrap: balance; outline: none; }
.wl-text > p { font: 400 17px/26px var(--ui); color: var(--ink-2); margin: 0; text-wrap: pretty; }
.wl-text > p + p { margin-top: 12px; }
.wl-text > p.dp-eye { margin: 0 0 4px; animation: none; font: 600 17px/22px 'Rubric Digits', var(--display); font-variant: all-small-caps lining-nums; letter-spacing: .09em; color: var(--verm); }
.wl-text > p.wl-note { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule); font: italic 400 16px/22px var(--display); color: var(--muted); }
.wl-foot { flex: none; padding: 4px var(--m) calc(var(--safe-b) + 10px); display: grid; gap: 2px; }
.wl-dots { display: flex; justify-content: center; gap: 12px; padding: 8px 0 14px; }
.wl-dots i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold-d); background: transparent; transition: background .2s; }
.wl-dots i.on { background: var(--gold); }
.wl-foot .btn.quiet { min-height: 48px; }
.wl-foot .btn.quiet.away { visibility: hidden; }
/* page two: hear it Plain, then Full */
.wl-hear { margin: 22px 0 0; padding: 14px; border: 1px solid var(--rim); border-radius: var(--r); background: rgba(251, 248, 239, .7); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .4); }
.wl-htune { display: flex; align-items: center; gap: 14px; }
.wl-htune .ini { width: 72px; height: 72px; }
.wl-htune span { display: grid; gap: 2px; min-width: 0; }
.wl-htune b { font: 500 22px/26px var(--display); color: var(--ink); }
.wl-htune small { font: 400 14px/20px var(--ui); color: var(--ink-2); }
.wl-hrow { display: grid; gap: 8px; margin-top: 14px; }
.wl-hb { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 12px 10px 10px; text-align: left; border: 1px solid var(--rim); border-radius: var(--r); background: var(--page); }
.wl-hb:active { background: var(--paper-2); }
.wl-hb .ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fbf3dc; background: #2d4a8c var(--paint-lapis, none) center / 96px; border: 1px solid #1c2f5e; box-shadow: inset 0 0 0 1.5px rgba(233, 207, 134, .85); }
.wl-hb .ic svg { width: 20px; height: 20px; fill: currentColor; }
.wl-hb .ic .sq, .wl-hb.on .ic .pl { display: none; } .wl-hb.on .ic .sq { display: block; }
.wl-hb.wait .ic { opacity: .6; }
.wl-hb .lb { display: grid; min-width: 0; }
.wl-hb .lb b { font: 600 16px/22px var(--ui); color: var(--ink); }
.wl-hb .lb small { font: 400 14px/18px var(--ui); color: var(--ink-2); }
.wl-hb .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }
.wl-hb.on { border-color: var(--gold-d); }
/* page three: the small demonstration, and the band's button as it looks over the player */
.wl-demo { display: block; width: 100%; max-width: 420px; margin: 14px auto 0; overflow: visible; }
.wl-demo .staff path { fill: none; stroke: var(--note); stroke-width: 1; }
.wl-demo .dn ellipse, .wl-demo .beam { fill: var(--note); transition: fill .08s; }
.wl-demo .dn path { fill: none; stroke: var(--note); stroke-width: 1.3; transition: stroke .08s; }
.wl-demo .dn.on ellipse { fill: var(--note-on); } .wl-demo .dn.on path { stroke: var(--note-on); }
.wl-demo .tabs circle { fill: none; stroke: var(--note); stroke-width: .8; } .wl-demo .tabs circle.c { fill: var(--note); }
.wl-demo .lp { fill: rgba(201, 160, 64, .18); stroke: rgba(176, 138, 51, .5); stroke-width: .8; opacity: 0; transition: opacity .3s; }
.wl-demo .hd { opacity: 0; transition: opacity .3s; }
.wl-demo .hd path { fill: none; stroke: var(--lapis); stroke-width: 1.6; stroke-linecap: round; } .wl-demo .hd circle { fill: var(--lapis); stroke: var(--gold); stroke-width: 1.8; }
.wl-demo.loop .lp, .wl-demo.loop .hd { opacity: 1; }
.wl-demo .fing { fill: rgba(45, 74, 140, .16); stroke: var(--lapis); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.wl-demo .fing.tap { animation: wltap .55s ease-out both; }
.wl-demo .fing.hold { animation: wlhold .8s ease-out both; }
@keyframes wltap { 0% { opacity: 0; transform: scale(.5); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes wlhold { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 1; transform: scale(1.12); } }
.wl-cap { text-align: center; font: 500 15px/22px var(--ui); color: var(--madder); margin: 8px 0 0; min-height: 22px; }
.wl-bandshow { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.wl-bandshow .mgrp { display: block; margin: 0 0 8px; }
.wl-bstrip { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--rim); border-radius: var(--r); background: var(--page); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .4); }
.wl-bstrip .roundel + .roundel { margin-left: -12px; }
.wl-bstrip .bl { flex: 1; min-width: 0; margin-left: 8px; display: grid; font: 400 14px/20px var(--ui); }
.wl-bstrip .bl b { font: 600 16px/22px var(--ui); color: var(--ink); }
.wl-bstrip .bl i { font-style: normal; color: var(--ink-2); }
/* page four: who makes it, set like a colophon */
.wl-page.about .wl-text { align-items: center; text-align: center; padding-top: 30px; }
.wl-page.about .wl-text > p:not(.dp-eye) { max-width: 21em; }
.wl-logo { width: 112px; height: 112px; margin: 0 0 20px; }
/* page five: where you are, and your whistle */
.wl-pick { display: grid; gap: 12px; margin: 10px 0 0; }
.wl-pick button { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 10px 14px 10px 10px; text-align: left; border: 1px solid var(--rim); border-radius: var(--r); background: rgba(251, 248, 239, .7); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px rgba(201, 160, 64, .4); }
.wl-pick button img { width: 64px; height: 64px; border-radius: 3px; flex: none; }
.wl-pick button span { flex: 1; display: grid; gap: 2px; }
.wl-pick button b { font: 500 20px/24px var(--display); color: var(--ink); }
.wl-pick button small { font: 400 14px/20px var(--ui); color: var(--ink-2); }
.wl-pick button i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--rim); flex: none; display: grid; place-items: center; }
.wl-pick button.on { border-color: var(--lapis); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3.5px var(--lapis); }
.wl-pick button.on i { border-color: var(--lapis); }
.wl-pick button.on i::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--lapis); box-shadow: 0 0 0 1.5px var(--gold); }
.wl-key { margin-top: 20px; }
.wl-key .mgrp { display: block; margin: 0 0 8px; }
.wl-key > div { display: flex; align-items: center; gap: 14px; }
.wl-key small { font: 400 14px/20px var(--ui); color: var(--ink-2); }
.wl-d { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 600 22px/1 var(--display); color: #fbf3dc; background: #2d4a8c var(--paint-lapis, none) center / 192px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--gold); }
/* the last page: Pro */
.wl-text > p.wl-free { font: 400 16px/24px var(--ui); color: var(--ink-2); margin: 0 0 10px; }
.welcome .wl-gives li { min-height: 48px; padding: 5px 0; gap: 12px; animation: none; }
.welcome .wl-gives li > img { width: 36px; height: 36px; }
.welcome .wl-gives li:last-child { border-bottom: 1px solid var(--rule); }
.welcome .wl-gives b { font: 600 15px/20px var(--ui); }
.wl-text > p.wl-price { margin: 14px 0 0; font: 400 15px/22px var(--ui); color: var(--ink); }
.wl-price b { font-weight: 600; } .wl-price span { color: var(--ink-2); }
/* short phones: a lower picture and tighter spacing, so each page sits above the buttons */
@media (max-height: 760px) {
  .wl-pic img { max-height: 31vh; }
  .wl-text { padding-top: 16px; }
  .wl-text h1 { font: 500 29px/34px var(--display); margin-bottom: 8px; }
  .wl-text > p { font: 400 16px/24px var(--ui); }
  .wl-text > p + p { margin-top: 8px; }
  .wl-text > p.wl-note { margin-top: 12px; padding-top: 8px; font: italic 400 15px/20px var(--display); }
  .wl-hear { margin-top: 14px; padding: 10px; } .wl-htune .ini { width: 60px; height: 60px; } .wl-hrow { margin-top: 10px; }
  .wl-demo { margin-top: 6px; max-width: 290px; } .wl-bandshow { margin-top: 10px; padding-top: 10px; }
  .wl-page.about .wl-text { padding-top: 18px; } .wl-logo { width: 80px; height: 80px; margin-bottom: 12px; }
  .wl-pick { gap: 8px; margin-top: 6px; } .wl-pick button { min-height: 72px; padding: 8px 12px 8px 8px; } .wl-pick button img { width: 52px; height: 52px; }
  .wl-key { margin-top: 12px; }
  .wl-page.offer .wl-art { max-height: 84px; overflow: hidden; }
  .welcome .wl-gives li { min-height: 42px; padding: 4px 0; } .welcome .wl-gives li > img { width: 32px; height: 32px; }
  .wl-text > p.wl-price { margin-top: 8px; }
  .wl-dots { padding: 4px 0 8px; } .wl-foot .btn.primary { min-height: 50px; } .wl-foot .btn.quiet { min-height: 44px; }
}
html[data-motion="less"] .welcome { animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .welcome { animation: none; transition: none; } }
/* About Old Whistle (#about, welcome.js): the same story as a calm page under You */
.aboutpage { padding-bottom: 24px; }
.aboutpage .wl-pic { margin: 4px calc(-1 * var(--m)) 0; }
.aboutpage .wl-pic img { max-height: 34vh; }
.aboutpage .dp-eye { margin: 24px 0 2px; animation: none; }
.aboutpage h1 { font: 500 38px/44px var(--display); letter-spacing: -.005em; margin: 0 0 10px; }
.aboutpage p:not(.dp-eye):not(.colophon) { font: 400 16px/25px var(--ui); color: var(--ink-2); margin: 0 0 10px; text-wrap: pretty; max-width: 34em; }
.aboutpage p.lead:not(.dp-eye) { font: 400 17px/26px var(--ui); color: var(--ink); }
.aboutpage .mgrp { display: block; margin: 24px 0 6px; }
.aboutpage .maker { display: flex; align-items: center; gap: 16px; }
.aboutpage .maker img { flex: none; width: 72px; height: 72px; }
.aboutpage .maker p:not(.dp-eye) { margin: 0; }
.aboutpage .list { margin-top: 24px; }
.aboutpage .colophon { margin-top: 28px; }
/* ---- end of the welcome and the About page ---- */

/* ---- what Pro gives you (#pro) and the paywall's parts ---- */
.propage { padding-bottom: 24px; }
.prohead { text-align: center; margin: 4px 0 8px; }
.prohead img { width: 96px; height: 96px; }
.prohead h1 { font: var(--t-d1); margin: 8px 0 6px; }
.prohead .purpose { display: block; text-align: center; margin: 0 auto; max-width: 30em; }
.gives { list-style: none; margin: 0 0 8px; padding: 0; }
.gives li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--rule); display: grid; gap: 2px; }
.gives li:last-child { border-bottom: 1px solid var(--rule); }
.gives li::before { content: ''; position: absolute; left: 5px; top: 19px; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }
.gives.free li::before { background: transparent; border: 1px solid var(--gold-d); }
.gives li b { font: var(--t-title); color: var(--ink); }
.gives li span { font: var(--t-body); color: var(--ink-2); }
.gives.free li { padding-top: 10px; padding-bottom: 10px; } .gives.free li span { color: var(--ink); }
.prohead img { border-radius: 50%; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--gold); }

/* ------------------------------------------------------------------ Discover Pro (web/billing.js): the window that rises when a Pro
   feature is tapped. A painted head from the squirrel border, a line about what was tapped, four benefits with their
   miniatures, the two prices (no free week: the 14 free days are the app's own), "Not now" always in view. The light crosses the gold once. */
.sheetpanel .box.dpbox { padding: 0; overflow: hidden; display: flex; max-height: 94vh; max-height: min(94dvh, 860px); border-radius: 18px 18px 0 0;
  animation: dprise .5s cubic-bezier(.16, .84, .3, 1) both; }
.box.dpbox > .grab { display: none; }
@keyframes dprise { from { transform: translateY(64px); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.dpro { display: flex; flex-direction: column; min-height: 0; width: 100%; }
.dp-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.dp-scroll::-webkit-scrollbar { display: none; }
.dp-art { position: relative; overflow: hidden; aspect-ratio: 1170 / 383; background: #d9b56a; }
.dp-art img { display: block; width: 100%; height: 100%; object-fit: cover; animation: dpart 1.4s cubic-bezier(.2, .6, .2, 1) both; }
@keyframes dpart { from { transform: scale(1.07); } to { transform: none; } }
.dp-shine { position: absolute; inset: -10% -40%; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(104deg, rgba(255, 244, 204, 0) 40%, rgba(255, 244, 204, .16) 46%, rgba(255, 246, 214, .62) 50%, rgba(255, 244, 204, .16) 54%, rgba(255, 244, 204, 0) 60%);
  animation: dpshine 1.7s .38s cubic-bezier(.35, .1, .3, 1) both; }
@keyframes dpshine { from { transform: translateX(-62%); opacity: 1; } to { transform: translateX(62%); opacity: 1; } }
.dp-body { padding: 18px var(--m) 4px; }
.dp-eye { margin: 0; font: 600 17px/22px 'Rubric Digits', var(--display); font-variant: all-small-caps lining-nums; letter-spacing: .09em; color: var(--verm); }
.sheetpanel .dp-body h2 { margin: 2px 0 6px; font: 500 30px/34px var(--display); letter-spacing: -.005em; color: var(--ink); text-wrap: balance; }
.dp-line { margin: 0 0 14px; font: var(--t-body); color: var(--ink-2); text-wrap: pretty; }
.dp-gives { list-style: none; margin: 0; padding: 0; }
.dp-gives li { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 7px 0; border-top: 1px solid var(--rule); }
.dp-gives li > img { flex: none; width: 44px; height: 44px; border-radius: 2px; background: #d9b56a; box-shadow: 0 0 0 1px rgba(123, 58, 38, .65), 0 0 0 2.5px var(--paper), 0 0 0 3.5px rgba(201, 160, 64, .7); }
.dp-gives li > span { flex: 1; min-width: 0; }
.dp-gives b { display: block; font: 600 16px/22px var(--ui); color: var(--ink); }
.dp-gives small { display: block; font: var(--t-small); color: var(--ink-2); }
.dp-hear { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #1c2f5e;
  background: #2d4a8c var(--paint-lapis) center / 192px; box-shadow: inset 0 0 0 2px rgba(233, 207, 134, .9); transition: opacity .15s linear; }
.dp-hear svg { width: 20px; height: 20px; fill: #fbf3dc; stroke: none; }
.dp-hear.wait { opacity: .55; }
.dp-hear:active { filter: brightness(.9); }
.dp-hear.on { animation: dphear 1.1s ease-in-out infinite alternate; }
@keyframes dphear { from { box-shadow: inset 0 0 0 2px rgba(233, 207, 134, .9), 0 0 0 0 rgba(201, 160, 64, .55); } to { box-shadow: inset 0 0 0 2px rgba(233, 207, 134, .9), 0 0 0 6px rgba(201, 160, 64, 0); } }
.dp-free { margin: 0; padding: 12px 0; border-top: 1px solid var(--rule); font: var(--t-small); color: var(--ink-2); animation: dpin .5s .52s cubic-bezier(.2, .7, .2, 1) both; }
.dp-free b { font-weight: 600; color: var(--ink); }
.sheetpanel .btn.dp-all { display: flex; justify-content: flex-start; width: 100%; margin: 0; padding: 0; min-height: 44px; border-top: 1px solid var(--rule); border-radius: 0; font: 500 15px/20px var(--ui); }
.dp-all::after { content: '›'; margin-left: 6px; font-size: 18px; line-height: 1; }
.dp-foot { flex: none; padding: 14px var(--m) calc(var(--safe-b) + 4px); background: var(--page); border-top: 1px solid var(--fil); box-shadow: 0 -10px 18px -14px rgba(31, 26, 21, .35); }
/* the buying part (also on the Pro page) */
.pwact { display: block; }
#proact .pwact { margin-top: 24px; }
.sheetpanel .pwact .btn.block, .pwact .btn.block { margin-top: 0; }
.pw-then { margin: 9px 0 0; text-align: center; font: var(--t-small); color: var(--ink-2); }
.pw-then b { font-weight: 600; color: var(--ink); }
.sheetpanel .pwact .btn.pw-life, .pwact .btn.pw-life { margin-top: 2px; min-height: 44px; font: 600 15px/20px var(--ui); }
.pw-fine { margin: 0; text-align: center; font: 400 12.5px/17px var(--ui); color: var(--muted); text-wrap: pretty; }
.pwmsg { display: none; }
.pwmsg.on { display: block; margin: 10px 0 0; padding: 9px 12px; border-radius: var(--r); background: var(--paper-2); font: var(--t-small); color: var(--ink); text-align: center; }
.pw-last { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; border-top: 1px solid var(--rule); padding-top: 2px; }
.pw-last .btn.quiet { font: 500 15px/20px var(--ui); }
.pw-last .btn.quiet:only-child { margin: 0 auto; }
/* ---- the 14 free days of Pro (web/billing.js, W.trial): the small calm mark on You, Settings and the Pro page [trial:begin] */
.pill.trial { color: var(--gold-ink); font: 600 14px/20px var(--ui); letter-spacing: .01em; }
/* the list with miniatures is a list, not a painted head: the general .art rule (104px high, a background, no taps) must not reach it */
.gives.art { height: auto; margin: 0 0 8px; background: none; pointer-events: auto; }
/* [trial:end] */
/* one thing after another, quietly */
.dp-eye, .dp-body h2, .dp-line, .dp-gives li, .dp-all, .dp-foot { animation: dpin .5s cubic-bezier(.2, .7, .2, 1) both; }
.dp-eye { animation-delay: .14s; } .dp-body h2 { animation-delay: .19s; } .dp-line { animation-delay: .24s; }
.dp-gives li:nth-child(1) { animation-delay: .3s; } .dp-gives li:nth-child(2) { animation-delay: .36s; } .dp-gives li:nth-child(3) { animation-delay: .42s; } .dp-gives li:nth-child(4) { animation-delay: .48s; }
.dp-all { animation-delay: .54s; } .dp-foot { animation-delay: .3s; }
@keyframes dpin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-height: 700px) { .dp-gives li { min-height: 56px; padding: 6px 0; } .sheetpanel .dp-body h2 { font-size: 27px; line-height: 31px; } .dp-body { padding-top: 14px; } .dp-line { margin-bottom: 10px; } }
@media (max-height: 700px) { .dp-art { aspect-ratio: auto; height: 96px; } }
/* the Pro page and the welcome's offer, in the same hand */
.gives.art li { padding: 12px 0 12px 60px; min-height: 68px; align-content: center; }
.gives.art li::before { content: none; }
.gives.art li > img { position: absolute; left: 2px; top: 12px; width: 44px; height: 44px; border-radius: 2px; background: #d9b56a; box-shadow: 0 0 0 1px rgba(123, 58, 38, .65), 0 0 0 2.5px var(--paper), 0 0 0 3.5px rgba(201, 160, 64, .7); }
.prohead .dp-eye { margin-top: 14px; }
.prohead h1 { margin-top: 0; }

/* ------------------------------------------------------------------ New & collections (web/tune.js) */
.item .state.new { color: var(--verm); font: 600 15px/20px 'Rubric Digits', var(--display); font-variant: all-small-caps; letter-spacing: .08em; }
.colllist { margin: 0 0 24px; }
.item.collrow { gap: 16px; min-height: 84px; padding: 10px 0; }
.item.collrow img { flex: none; width: 64px; height: 64px; border-radius: 2px; background: #d9b56a; box-shadow: 0 0 0 1px rgba(123, 58, 38, .65); }
.item.collrow b { display: block; font: 500 20px/24px var(--display); color: var(--ink); }
.item.collrow small { display: block; margin-top: 2px; font: var(--t-small); color: var(--ink-2); }
.item.collrow .state { font: var(--t-small); color: var(--muted); }
.item.collrow .chev { flex: none; color: var(--muted); font-size: 20px; }
.newline { margin: 0 0 4px; }
.collhero { display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; }
.collhero img { flex: none; width: 96px; height: 96px; border-radius: 3px; background: #d9b56a; box-shadow: 0 0 0 1px rgba(123, 58, 38, .7), 0 0 0 3px var(--paper), 0 0 0 4.5px rgba(201, 160, 64, .8); }
.collhero h1 { font: 500 30px/34px var(--display); margin: 0; text-wrap: balance; }
.collhero .dp-eye { animation: none; }
.collhero .count { margin: 4px 0 0; font: var(--t-small); color: var(--muted); }
.colldesc { margin: 0 0 8px; }
.thead .tby { margin: 4px 0 0; font: italic 400 17px/22px var(--display); color: var(--ink-2); }

/* ------------------------------------------------------------------ polish, 18 Nov: nothing orphaned, nothing colliding */
/* the tune menu: the Pro mark sits at the end of its line, not under the words */
.mlist button:has(> .promark) { flex-direction: row; align-items: center; justify-content: space-between; }
.mlist button > .promark { margin: 0 2px 0 12px; }
/* the tune's head: its line and level share a row when they fit and stack when they don't; the lore flower keeps the right edge */
.thead .tmeta { flex-wrap: nowrap; align-items: center; }
.thead .tmeta .tl { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; column-gap: 12px; }
.thead .tmeta .tl > span:first-child { flex: 0 1 auto; white-space: nowrap; }
/* a Pro thing met on a page of its own: a small framed card that says what it is */
.locked.card { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; row-gap: 4px; align-items: center; justify-items: start; margin: 20px 0; padding: 16px; text-align: left;
  background: var(--page); border: 1px solid var(--rim); border-radius: 3px; box-shadow: inset 0 0 0 2px var(--page), inset 0 0 0 3px var(--fil); }
.locked.card > img { grid-row: 1 / span 2; width: 64px; height: 64px; border-radius: 2px; background: #d9b56a; box-shadow: 0 0 0 1px rgba(123, 58, 38, .65); }
.locked.card .dp-eye { animation: none; align-self: end; }
.locked.card h2 { margin: 0; font: 500 22px/26px var(--display); color: var(--ink); align-self: start; text-wrap: balance; }
.locked.card p.why { grid-column: 1 / -1; margin: 10px 0 0; font: var(--t-body); color: var(--ink-2); }
.locked.card .btn { grid-column: 1 / -1; margin-top: 12px; }

/* ------------------------------------------------------------------ the band, in sight on the player (18 Nov) */
.player .bandstrip.off .roundel { opacity: .5; }
.player .bandstrip.off .roundel + .roundel { margin-left: -14px; }
.player .bandstrip .bl b { font: 600 15px/20px var(--ui); color: var(--ink); margin-right: 8px; }
.player .bandstrip .bl i { font-style: normal; color: var(--muted); }
.player .bandstrip .promark { margin: 0 4px 0 0; }
.bandhead { margin: 0 0 6px; }
.bandhead .mgrp { margin: 4px 0 0; }
.sheetpanel .bandhead h2 { margin: 2px 0 4px; font: 500 26px/30px var(--display); text-wrap: balance; }
.bandhead p { margin: 0; font: var(--t-small); }
.bandrow .roundel { transition: box-shadow .08s linear; }
.bandrow.on .roundel { box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px rgba(233, 207, 134, .85), 0 0 0 calc(var(--lv) * 5px) rgba(201, 160, 64, calc(.2 + var(--lv) * .35)); }

/* ------------------------------------------------------------------ the news leaf (web/scroll.js; art cut by tools/news_art.py)
   News is a leaf of the book lying under the right edge of the head of Tunes. Its corner shows: the end of Simon
   Bening's border (a wild strawberry and its flower), the manuscript's own paint, 3 px to the pixel. A small vermilion
   dot while something is unread, and then the corner lies a little further in. Nothing is lit, curled or rolled. */
.head > .nlc { position: relative; flex: none; align-self: center; width: 72px; height: 76px; margin: -16px calc(-1 * var(--m)) -16px 0; padding: 0; overflow: hidden; border-radius: 0; }
.head > .nlc:focus-visible { outline: none; }
.head > .nlc:focus-visible .nlc-leaf { outline: 2px solid var(--lapis); outline-offset: 2px; }
.nlc-leaf { position: absolute; left: 12px; top: 10px; width: 80px; height: 56px; background: #c9a040 url('art/news-corner.webp') 0 0 / 80px 56px no-repeat;
  box-shadow: 0 0 0 .5px rgba(74, 34, 20, .55), 0 1px 1.5px rgba(60, 38, 14, .42), 0 3px 9px rgba(60, 38, 14, .2);
  transform: translate3d(18px, 0, 0); transition: transform .28s cubic-bezier(.2, 0, 0, 1); }
.nlc.unread .nlc-leaf { transform: none; }
.nlc:active .nlc-leaf { transform: translate3d(14px, 0, 0); transition-duration: .08s; }
.nlc.unread:active .nlc-leaf { transform: translate3d(-3px, 0, 0); }
/* unread: a rubric dot at the leaf's corner (also beside an unread article) */
.seal { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; background: var(--verm); box-shadow: inset 0 0 0 1px rgba(110, 24, 10, .45); }
.nlc > .seal { position: absolute; left: 6px; top: 4px; width: 12px; height: 12px; box-shadow: inset 0 0 0 1px rgba(110, 24, 10, .45), 0 0 0 1.5px var(--paper); animation: sealin .3s .25s cubic-bezier(.2, 0, 0, 1) both; }
@keyframes sealin { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* open: the leaf comes in from the side, a slide and a fade; it goes the same way, a little quicker */
.nl { position: fixed; inset: 0; z-index: 45; overflow: hidden; }
.nl-dim { position: absolute; inset: 0; background: rgba(38, 28, 18, .5); opacity: 0; transition: opacity .2s linear; }
.nl.open .nl-dim { opacity: 1; }
.nl-leaf { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: min(100%, 560px); margin: 0 auto; outline: none; color: #1f1a15;
  background: radial-gradient(130% 80% at 50% 0%, #fbf7ec 0%, #f6f0e1 60%, #efe6d2 100%); box-shadow: 0 0 0 1px rgba(60, 38, 14, .16), -6px 0 28px rgba(38, 28, 18, .22);
  transform: translate3d(36px, 0, 0); opacity: 0; transition: transform .2s cubic-bezier(.4, 0, 1, 1), opacity .18s linear; will-change: transform, opacity; }
.nl.open .nl-leaf { transform: none; opacity: 1; transition: transform .26s cubic-bezier(.2, 0, 0, 1), opacity .2s linear; }
.nl-in { height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: env(safe-area-inset-top, 0px) 24px calc(28px + env(safe-area-inset-bottom, 0px)); scrollbar-width: none; }
.nl-in::-webkit-scrollbar { display: none; }
.nl-in > .top { min-height: 56px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* on the leaf: clean text, three sizes; the border above is Simon Bening's, with its own rules */
.ns-head { display: block; width: 100%; height: auto; aspect-ratio: 1290 / 350; margin: 0 0 22px; background: #c9a040; box-shadow: 0 0 0 .5px rgba(74, 34, 20, .5), 0 1px 2px rgba(60, 38, 14, .3), 0 4px 12px rgba(60, 38, 14, .16); }
.ns-eye { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font: 600 17px/22px 'Rubric Digits', var(--display); font-variant: all-small-caps lining-nums; letter-spacing: .14em; color: #b0361d; }
.ns-eye::before, .ns-eye::after { content: ''; flex: 1; height: 3px; border-top: 1px solid rgba(160, 120, 40, .75); border-bottom: 1px solid rgba(160, 120, 40, .35); }
.ns-art { padding: 6px 0 6px; }
.ns-date { margin: 0 0 4px; font: 500 13px/20px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: #62574a; }
.ns-date .seal { width: 8px; height: 8px; margin-left: 6px; vertical-align: 0; }
.ns-art h3 { margin: 0 0 14px; font: 500 30px/34px var(--display); letter-spacing: -.01em; color: #1f1a15; text-wrap: balance; }
.ns-art p { margin: 0 0 12px; font: 400 16px/25px var(--ui); color: #3d342b; text-wrap: pretty; }
.ns-art p.ns-lead { color: #2a231c; }
.ns-art p.ns-lead.capped { min-height: 56px; }
.ns-cap { float: left; width: 54px; height: 54px; margin: 4px 11px 0 0; border-radius: 1px; box-shadow: 0 1px 2px rgba(60, 38, 14, .3); }
.ns-pic { display: block; width: 100%; height: auto; margin: 4px 0 14px; border-radius: 1px; box-shadow: 0 0 0 1px #6e3520, 0 0 0 2.5px #d9b65e, 0 0 0 3.5px #7b3a26; }
.ns-tunes { margin: 16px 0 4px; border-top: 1px solid rgba(160, 120, 40, .55); clear: both; }
.ns-tune { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 8px 2px; text-align: left; border-bottom: 1px solid rgba(160, 120, 40, .55); }
.ns-tune:active { background: rgba(160, 120, 40, .13); }
.ns-tune .grow { flex: 1; min-width: 0; }
.ns-tune b { display: block; font: 500 19px/23px var(--display); color: #1f1a15; }
.ns-tune small { display: block; font: var(--t-small); color: #62574a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-tune .chev { flex: none; font-size: 20px; color: #7a5a12; }
.ns-go { display: inline-flex; align-items: center; min-height: 44px; clear: both; }
.ns-rule { height: 22px; margin: 14px 0 12px; background: url('art/pansy.webp') center / 20px 20px no-repeat, linear-gradient(rgba(160, 120, 40, .6), rgba(160, 120, 40, .6)) left center / calc(50% - 22px) 1px no-repeat,
  linear-gradient(rgba(160, 120, 40, .6), rgba(160, 120, 40, .6)) right center / calc(50% - 22px) 1px no-repeat; }
.ns-none { margin: 14px 0; font: var(--t-body); color: #3d342b; text-align: center; }
.ns-foot { display: flex; justify-content: center; margin: 22px 0 8px; }
.ns-foot .btn { min-width: 132px; }

/* The tune page begins at the music (review P0-1): the status sits in the head beside the initial, the gaps are
   tight, a long title is set smaller, so two lines of music show above the player on a 390x844 phone. */
.thead { margin-top: 10px; align-items: start; }
.thead > .ini { grid-row: 1 / span 4; }
.thead .tracker { margin: 6px 0 0; min-height: 40px; flex-wrap: wrap; row-gap: 2px; }
.thead .tracker .stbtn { min-height: 36px; }
.thead.long h1 { font: 500 25px/29px var(--display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vslide { margin: 10px 0 6px; }
.sheetwrap { margin-top: 8px; }
.sheet { padding-top: 6px; }

/* Review P0-4: everything in the Pro window fits a 390x844 phone (the link to the whole list was under the buttons). */
.sheetpanel .box.dpbox { max-height: 97vh; max-height: min(97dvh, 860px); }
.dp-gives li { min-height: 52px; padding: 4px 0; }
/* Review P1-10: a toast in the book's own dress, not a black slab. */
.toast { background: var(--page); color: var(--ink); border: 1px solid var(--rim, var(--rule-2)); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--fil), 0 10px 26px -10px rgba(31, 26, 21, .45); border-radius: 12px; padding: 13px 16px; animation: fade .2s ease both; }

/* Pro in plain sight at the head of You (request 646): a framed card with the squirrel, the free days or the offer. */
.procard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 20px 0 4px; padding: 14px 12px 14px 14px; border: 1px solid var(--rim); border-radius: var(--r); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--fil); background: var(--page); color: var(--ink); -webkit-tap-highlight-color: transparent; }
.procard:active { background: var(--paper); }
.procard > img { flex: none; width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 1px var(--rim), 0 0 0 3px var(--paper), 0 0 0 4px var(--fil); }
.procard .grow { flex: 1; min-width: 0; }
.procard .dp-eye { display: block; margin: 0 0 2px; animation: none; }
.procard b { display: block; font: 500 23px/27px var(--display); }
.procard small { display: block; margin-top: 2px; font: 400 15px/20px var(--ui); color: var(--ink-2); }
.procard .chev { flex: none; color: var(--muted); font-size: 20px; }
