/* Walnut is the default palette; Settings has four more and your own (js/palette.js), which set these
   same tokens on :root. */
/* Walnut: Irish Bouzouki Chords' Bog Oak layout in new colours (Chan, 2026-11-08: "reuse most of the
   bousouki app but change the colours"). A dark walnut ground like a resonator, calfskin cream
   text, a copper accent, and a patina green that only ever means the short 5th string. Colours are
   tokens; the rules below only say var(--...). */
/* Android's serif draws ♭ and ♯ from a CJK font: thin, full width, with a gap ("B ♭"). They
   come first from a 1 KB cut of Noto Sans Symbols instead (Pocket Theory's fix; OFL, see
   styles/pt-accidentals-OFL.txt). unicode-range keeps it to those five characters. */
@font-face {
  font-family: "PT Accidentals";
  src: url("pt-accidentals.woff2") format("woff2");
  unicode-range: U+266D-266F, U+1D12A-1D12B;
  font-display: block;
}
:root {
  --bg: #1a1310; --surface: #271c17; --surface-2: #33261f; --line: #4b392e;
  --text: #f6ecdc; --text-2: #c5b4a0; --text-3: #ab9a86;
  --accent: #ef8a3c; --accent-soft: rgba(239, 138, 60, .15); --accent-line: rgba(239, 138, 60, .4); --on-accent: #1c0f07;
  --dot: #f6ecdc; --dot-text: #1a1310; --root: #ef8a3c; --root-text: #1c0f07;
  --wire: #8a7362; --nut: #f6ecdc; --string: #d4c4ae;
  --tabs-bg: rgba(26, 19, 16, .96); --fifth: #7fc7ae; --accent-hover: rgba(239, 138, 60, .24);
  /* what's sounding now (a loop, a cell, the pill): the text colour, never --fifth, which only means the 5th string */
  --live: var(--text);
  --serif: "PT Accidentals", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "PT Accidentals", -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* No double-tap zoom anywhere (quick taps on the finder's frets zoomed the iPhone app, which
   allows no pinch to undo it; 2026-11-06). Pinch still zooms in browsers. */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 var(--sans); -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#page { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-top)) calc(16px + var(--safe-right)) calc(84px + var(--safe-bottom)) calc(16px + var(--safe-left)); }

/* ---------------------------------------------------------------- chord box */
.bx { display: block; overflow: visible; }
/* A tapped box takes focus (it is a button for the keyboard), and iOS drew its own blue focus
   ring round it, clipped by the scroller (Chan, 2026-11-07). The box never draws an outline;
   keyboard focus rings its card instead, and only where there is a mouse. */
.bx:focus, .bx:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) { .shape:has(.bx:focus-visible) { box-shadow: 0 0 0 2px var(--accent); } }
.bx text { font-family: var(--sans); text-anchor: middle; dominant-baseline: middle; }
.bx-fret { stroke: var(--wire); stroke-width: 1.2; }
.bx-nut { stroke: var(--nut); stroke-width: 4; stroke-linecap: round; }
.bx-str { stroke: var(--string); stroke-width: 1; }
.bx-open { fill: none; stroke: var(--text-2); stroke-width: 1.4; }
.bx-mute { stroke: var(--text-3); stroke-width: 1.4; }
/* the short 5th string: a green line that starts at its pip; a solid ring when its note is in the
   chord, a dashed one when it's only a drone */
.bx-fifth { stroke: var(--fifth); stroke-width: 1.3; }
.bx-pip { fill: none; stroke: var(--fifth); stroke-width: 1.4; stroke-dasharray: 1.8 1.6; }
.bx-pip.in-chord { stroke-dasharray: none; fill: var(--fifth); }
.bx-note5 { fill: var(--fifth); font-weight: 700; }
.bx-note5.is-drone { font-weight: 400; opacity: .75; }
.bx-dot { fill: var(--dot); }
.bx-dot.is-root { fill: var(--root); }
.bx-fn { fill: var(--dot-text); font-size: 10px; font-weight: 700; }
.bx-fn.is-root { fill: var(--root-text); }
.bx-barre { fill: var(--dot); opacity: .55; }
.bx-note { fill: var(--text-2); font-size: 10px; }
.bx .bx-pos { fill: var(--accent); font-size: 12px; font-weight: 700; text-anchor: end; }
.bx-mini .bx-pos { font-size: 11px; }
.bx-note.is-root { fill: var(--accent); font-weight: 700; }
.tap { cursor: pointer; transition: transform .12s; }
.tap.ringing { transform: scale(1.06); }
.tap.ringing .bx-dot { fill: var(--accent); }

/* ---------------------------------------------------------------- top, chip, search */
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px 0 14px; }
.brand { font-family: var(--serif); font-size: 15px; line-height: 1.1; color: var(--text-2); }
.brand b { display: block; font-size: 21px; color: var(--text); font-weight: 600; }
.chip { min-height: 40px; display: inline-flex; align-items: center; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 999px;
        padding: 7px 12px; font: 600 13px var(--sans); white-space: nowrap; gap: 5px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
          border-radius: 14px; padding: 0 14px; margin: 0; }
.search svg { width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px 0; font-size: 16px; outline: none; }
.search input::placeholder { color: var(--text-3); }
.search:focus-within { border-color: var(--accent); }
.results:not(:empty) { margin-top: 8px; }
.results .first { background: var(--accent-soft); }
.nomatch { color: var(--text-2); margin: 10px 2px; font: italic 15px var(--serif); }

/* ---------------------------------------------------------------- headings, cards, lists */
.h { font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
     margin: 26px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.h a { color: var(--accent); letter-spacing: .04em; text-transform: none; font-size: 13px; display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px 0 12px; margin: -12px 0; }
.card { background: var(--surface); border-radius: 18px; padding: 16px; }
.card h3 { font: 400 20px/1.2 var(--serif); margin: 0 0 12px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -4px; }
.keys::-webkit-scrollbar { display: none; }
.keys button { flex: none; min-width: 40px; height: 46px; padding: 0 6px; border: 0; background: transparent; color: var(--text-2);
               font: 400 22px var(--serif); border-radius: 10px; }
.keys button.on { background: var(--accent); color: var(--on-accent); }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-radius: 10px; padding: 3px; margin-top: 10px; }
.modes button { border: 0; background: transparent; color: var(--text-2); font: 500 13px var(--sans); min-height: 40px; border-radius: 8px; }
.modes button.on { background: var(--surface-2); color: var(--text); }
.go { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 12px 14px;
      border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.list { background: var(--surface); border-radius: 18px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); min-height: 48px; }
.li:first-child { border-top: 0; }
.li > span:not(.thumb):not(.r) { min-width: 0; }
.li .thumb { min-width: 44px; display: grid; place-items: center; flex: none; }
.li .t { display: block; font: 400 19px/1.2 var(--serif); }
.li .t i { color: var(--text-2); }
.li .s { display: block; font-size: 12px; color: var(--text-3); }
.li .r { margin-left: auto; color: var(--text-3); flex: none; }
.num { font: 600 13px var(--sans); color: var(--accent) !important; background: var(--accent-soft); border-radius: 8px; padding: 3px 8px; }
.keyico { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent);
          display: grid; place-items: center; font: 400 16px var(--serif); }
.roots { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -4px 10px; }
.roots button, .roots a { min-width: 40px; height: 46px; padding: 0 6px; border: 0; background: transparent; border-radius: 10px;
                          color: var(--text-2); font: 400 22px var(--serif); display: grid; place-items: center; }
.roots .on { background: var(--accent); color: var(--on-accent); }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.types a { background: var(--surface); border-radius: 12px; padding: 10px 6px; text-align: center; min-width: 0; }
.types b { display: block; font: 400 18px var(--serif); overflow-wrap: anywhere; }
.types span { font-size: 11px; color: var(--text-3); }
.foot { color: var(--text-3); font-size: 12.5px; margin: 28px 2px 0; line-height: 1.6; }
.foot a { color: var(--accent); }

/* ---------------------------------------------------------------- chord page */
.bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 6px; color: var(--text-2); gap: 8px; }
.back { border: 0; background: transparent; color: var(--text-2); min-height: 44px; padding: 0 12px 0 0; font-size: 15px; }
a.back { display: inline-flex; align-items: center; }
.hero { display: flex; gap: 16px; align-items: center; margin: 8px 0 4px; min-width: 0; }
.hero > div:last-child { min-width: 0; }
/* what the heading is: a chord, a root's chords, or a key (Chan, 2026-11-12: G major the key and the chord looked alike) */
.hero .kind { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.sym { font: 400 64px/0.95 var(--serif); color: var(--text); overflow-wrap: anywhere; max-width: 60%; }
.name { font: italic 400 21px var(--serif); }
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.notes span { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; display: grid; place-items: center;
              background: var(--surface-2); font-size: 13px; font-weight: 600; }
.notes span.root { background: var(--accent); color: var(--on-accent); }
.form { font-size: 12px; color: var(--text-3); letter-spacing: .1em; }
.swipe { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; }
.swipe::-webkit-scrollbar { display: none; }
.swipe > * { scroll-snap-align: start; flex: none; }
.shape { background: var(--surface); border-radius: 16px; padding: 12px 6px 10px; width: 142px; text-align: center; }
.shape .lab { font: 400 17px var(--serif); margin-bottom: 4px; color: var(--accent); }
.shape .lab a { display: inline-block; min-height: 36px; padding: 6px 12px; }
.shape .bx { margin: 0 auto; }
.shape .pos { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.tag { display: inline-block; font-size: 10.5px; color: var(--accent); border: 1px solid var(--accent-line);
       border-radius: 6px; padding: 0 5px; margin-top: 4px; white-space: nowrap; }
.trad { margin-top: 22px; border-left: 3px solid var(--accent); padding-left: 12px; }
.trad .h { margin-top: 0; color: var(--accent); }
.trad p { margin: -4px 0 10px; font: italic 15px var(--serif); color: var(--text-2); }
.trad .swipe { margin-left: -15px; padding-left: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; font: 400 15px var(--serif); }
.none { color: var(--text-2); font: italic 15px/1.5 var(--serif); margin: 8px 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.cell { background: var(--surface); border-radius: 14px; padding: 8px 4px; text-align: center; border: 1.5px solid transparent; min-width: 0; }
.cell .c { display: block; font: 400 17px/1.2 var(--serif); overflow-wrap: anywhere; }
.cell .bx { margin: 4px auto 0; }
.more summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 12px 2px; min-height: 44px; list-style: none; }
.more summary::before { content: "▸ "; }
.more[open] summary::before { content: "▾ "; }
.nobox { display: block; font-size: 11px; color: var(--text-3); margin-top: 8px; }

/* ---------------------------------------------------------------- key page */
.drone { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; margin-top: 14px; flex-wrap: wrap; }
.drone .courses { display: flex; gap: 5px; flex: none; }
.drone .courses span:first-child { font-style: italic; }
.drone .courses span { min-width: 26px; height: 26px; padding: 0 3px; border-radius: 13px; border: 1.5px solid var(--line); color: var(--text-3);
                       display: grid; place-items: center; font: 13px var(--serif); }
.drone .courses span.ring { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.drone .courses span.fit { border-color: var(--accent); color: var(--accent); }
.fifth-line { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.fifth-line b { color: var(--fifth); font: 400 20px/1 var(--serif); flex: none; }
.fifth-line p { margin: 0; min-width: 0; }
.drone p { margin: 0; font-size: 13px; color: var(--text-2); flex: 1; min-width: 140px; }
.mini-btn { border: 1px solid var(--line); background: transparent; color: var(--text-2); border-radius: 999px; min-height: 40px; padding: 0 14px; font-size: 13px; }
.mini-btn.on { border-color: var(--accent); color: var(--accent); }
.seven { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seven .cell.main { border-color: var(--accent); }
.seven .cell a { display: block; min-height: 40px; padding: 2px 0; }
.seven .n { display: block; font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: .04em; }
.mainline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--text-2); font-size: 14px; }
.mainline > span { margin-right: 4px; }
.mainline a { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 400 18px var(--serif); }
.mainline small { font: 600 11px var(--sans); color: var(--text-2); }
.prog { background: var(--surface); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.prog > div { flex: 1; min-width: 0; }
.prog .nums { font-size: 12px; color: var(--text-3); letter-spacing: .06em; }
.prog .names { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; font: 400 20px var(--serif); }
.prog .names a { display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; justify-content: center; padding: 0 8px; border-radius: 10px; background: var(--surface-2); }
.prog .pnote { font-size: 12px; color: var(--text-3); font-style: italic; }
.play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font-size: 14px; }
.draft { font: 600 10px var(--sans); letter-spacing: .1em; color: var(--text-3); border: 1px dashed var(--text-3); border-radius: 5px; padding: 1px 5px; }
.source { font-size: 11.5px; color: var(--text-3); margin: 4px 2px 0; line-height: 1.5; }

/* ---------------------------------------------------------------- finder */
.neck { background: var(--surface); border-radius: 16px; padding: 6px 8px 8px; }
.neck .row { display: grid; grid-template-columns: 22px repeat(5, 1fr); gap: 4px; align-items: center; }
.neck .row + .row { border-top: 1px solid var(--wire); }
.neck .row.nut { border-bottom: 3px solid var(--nut); }
.neck .head span { text-align: center; font: 600 14px var(--serif); color: var(--accent); padding: 4px 0 2px; }
.neck .fn { font-size: 11px; color: var(--text-3); text-align: center; }
.neck button { height: 36px; margin: 2px 0; border: 0; border-radius: 15px; background: transparent; position: relative; font-size: 12px; font-weight: 700; }
.neck button::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid var(--string); transform: translateX(-50%); opacity: .7; }
/* above its pip the 5th string doesn't exist; from there down it's green */
.neck .no5 { display: block; height: 36px; margin: 2px 0; }
.neck button.s5::before { border-left-color: var(--fifth); }
.neck button.s5.pip::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; border: 1.5px solid var(--fifth); }
.neck button.s5.on { background: var(--fifth); color: var(--bg); }
.neck button.s5.on::after { display: none; }
.neck .head span.h5 { color: var(--fifth); }
.neck .fn.dot { color: var(--accent); font-weight: 700; }
.neck button.on { background: var(--accent); color: var(--on-accent); }
.neck button.on::before { display: none; }
.more-frets { display: block; width: 100%; min-height: 44px; margin-top: 6px; border: 0; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.btn { flex: 1; border: 0; border-radius: 12px; padding: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.btn:disabled { opacity: .4; }
.tapped { margin: 14px 2px 0; color: var(--text-2); font-size: 13px; letter-spacing: .06em; }

/* ---------------------------------------------------------------- settings */
.opts { background: var(--surface); border-radius: 16px; overflow: hidden; }
.opts.two { display: grid; grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; min-height: 48px; }
.opts.two .opt { border-top: 0; justify-content: center; text-align: center; }
.opts.two .opt + .opt { border-left: 1px solid var(--line); }
.opt:first-child { border-top: 0; }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.opts.two .opt input { position: absolute; opacity: 0; pointer-events: none; }
.opts.two .opt.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.opt small { display: block; color: var(--text-3); font-size: 12px; }
.opt span { min-width: 0; }
.custom { display: grid; gap: 6px; margin-top: 8px; }
.course { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 12px; padding: 8px 12px; }
.course span { flex: 1; color: var(--text-2); font-size: 13px; }
.course select { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.help { color: var(--text-3); font-size: 12.5px; margin: -4px 2px 8px; }
.octs { display: grid; gap: 6px; }
.tog { display: flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 12px; padding: 8px 8px 8px 14px; }
.tog > span { flex: 1; font: 400 18px var(--serif); min-width: 0; }
.tog small { font: 12px var(--sans); color: var(--text-3); }
.seg { border: 1px solid var(--line); background: transparent; color: var(--text-2); border-radius: 8px; min-height: 40px; padding: 0 12px; font-size: 13px; }
.seg.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------- tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr);
        background: var(--tabs-bg); border-top: 1px solid var(--line); padding: 8px var(--safe-right) calc(10px + var(--safe-bottom)) var(--safe-left);
        -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tabs a { text-align: center; font-size: 11px; color: var(--text-3); padding: 2px 0; }
.tabs a.on { color: var(--accent); }
.tabs i { display: block; font-style: normal; font-size: 19px; line-height: 1.2; }

/* ---------------------------------------------------------------- R7 UX pass (2026-11-06), every width */
/* The new markup (UX-PASS.md): each page's big name is its h1; .lead and .cols are plain blocks
   on a phone and only become a layout from 960 px. */
h1.brand, h1.sym { margin: 0; font-weight: 400; }
h1.lost { font: 400 28px var(--serif); margin: 12px 0 4px; }
.tabs .home-link { display: none; }
.w-click { display: none; }
#page:focus { outline: none; }
/* Recent: one 80 px slot (a mini box's width) for boxes and key circles, so the titles line up;
   the circle sits under where a box's strings are (finding 10) */
.li .thumb { width: 80px; justify-items: end; }
.li .thumb .keyico { margin-right: 10px; }
/* the drone card on a narrow phone: courses and the button on one line, the sentence under (11) */
@media (max-width: 479px) {
  .drone p { order: 3; flex-basis: 100%; }
  .drone .mini-btn { margin-left: auto; }
}

/* ---------------------------------------------------------------- get the app (phone browsers) */
.getapp { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabs-h, 62px) + 8px); z-index: 6; max-width: 544px; margin: 0 auto;
          display: flex; align-items: center; gap: 10px; padding: 10px 4px 10px 12px; border-radius: 16px;
          background: var(--surface-2); border: 1px solid var(--accent-line); box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
          animation: ga-in .28s ease-out; }
.getapp img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.getapp .ga-txt { flex: 1; min-width: 0; }
.getapp .ga-t { font: 400 17px/1.2 var(--serif); }
.getapp .ga-s { font-size: 12.5px; line-height: 1.35; color: var(--text-2); margin-top: 2px; }
.getapp .ga-s b { color: var(--text); font-weight: 600; white-space: nowrap; }
.getapp .ga-s svg { width: 15px; height: 15px; vertical-align: -3px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.getapp .ga-soon { display: block; color: var(--accent); font-size: 12px; margin-top: 2px; }
.getapp .ga-go { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
                 background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; }
.getapp .ga-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 24px; line-height: 1; }
body.has-getapp #page { padding-bottom: calc(96px + var(--getapp-h, 72px) + var(--safe-bottom)); }
/* a narrow phone: no icon, so the strip stays two or three lines */
@media (max-width: 360px) { .getapp img { display: none; } .getapp { gap: 6px; } .getapp .ga-go { padding: 0 12px; } }
@keyframes ga-in { from { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .getapp { animation: none; } .tap { transition: none; } }

/* ---------------------------------------------------------------- a mouse (any width) */
@media (hover: hover) and (pointer: fine) {
  .w-tap { display: none; } .w-click { display: inline; }
  .li:hover, a.cell:hover, .types a:hover, .opt:hover, .shape:hover, .prog .names a:hover { background: var(--surface-2); }
  .opts.two .opt.on:hover { background: var(--accent-soft); }
  .chips a:hover, .mini-btn:hover, .seg:not(.on):hover, .btn.ghost:hover { border-color: var(--accent-line); color: var(--text); }
  .chip:hover, .play:hover { background: var(--accent-soft); }
  .go:hover, .mainline a:hover { background: var(--accent-hover); }
  .keys button:not(.on):hover, .roots :not(.on):hover, .modes button:not(.on):hover, .neck button:not(.on):hover { background: var(--surface-2); color: var(--text); }
  .back:hover, .tabs a:not(.on):hover { color: var(--text); }
  .h a:hover, .foot a:hover, .more summary:hover, .more-frets:hover, .shape .lab a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .seven .cell a:hover .c { color: var(--accent); }
  .btn:not(.ghost):not(:disabled):hover { filter: brightness(1.08); }
  svg.tap:not(.nostrum):hover { transform: scale(1.03); }
}
/* a mouse on a narrower window: the shape rows still scroll, so they show a scrollbar (finding 1) */
@media (hover: hover) and (pointer: fine) and (max-width: 959px) {
  .swipe { scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-bottom: 10px; }
  .swipe::-webkit-scrollbar { display: block; height: 8px; }
  .swipe::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
}

/* ---------------------------------------------------------------- desktop (960 px and wider) */
/* Phones and both native apps never see this: phones are narrower, and the iPhone app and the APK
   only run on phones. A 1120 px page, the tabs as a top bar, two columns where a page has two
   jobs, and shape rows that wrap instead of scrolling (UX-PASS.md findings 1-3, 14). */
@media (min-width: 960px) {
  :root { --top-h: 64px; }
  #page { max-width: 1200px; padding: calc(var(--top-h) + 4px) 40px 72px; }
  .tabs { top: 0; bottom: auto; display: flex; align-items: center; gap: 6px; height: var(--top-h);
          padding: 0 max(40px, calc((100% - 1120px) / 2)); border-top: 0; border-bottom: 1px solid var(--line); }
  .tabs .home-link { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-right: auto; padding: 0;
                     font: 400 17px var(--serif); color: var(--text-2); }
  .tabs .home-link b { color: var(--text); font-weight: 600; }
  .tabs .home-link img { border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
  .tabs a:not(.home-link) { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
                            font-size: 14px; font-weight: 600; color: var(--text-2); }
  .tabs a.on { background: var(--accent-soft); color: var(--accent); }
  .tabs i { display: inline; font-size: 15px; line-height: 1; }

  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
  .chord-cols, .key-cols { grid-template-columns: minmax(0, 1fr) 340px; }
  .finder-cols { grid-template-columns: 440px minmax(0, 1fr); }

  /* home: the app's name is in the top bar, so the search and the tuning chip share a row */
  .lead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; align-items: center; padding-top: 24px; }
  .lead .top { display: contents; }
  .lead .brand { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lead .search { grid-row: 1; grid-column: 1; }
  .lead .chip { grid-row: 1; grid-column: 2; }
  .lead .results { grid-column: 1 / -1; }
  .col .keys, .col .roots { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; margin: 0 -2px 10px; }
  .col .keys button, .col .roots button { min-width: 0; padding: 0; }

  /* chord pages: every shape shows, a little larger */
  .sym { font-size: 84px; }
  .swipe { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 12px; scroll-snap-type: none; }
  .trad .swipe { margin-left: 0; padding-left: 0; }
  .shape { width: auto; padding: 14px 10px 12px; }
  .shape .bx { width: 134px; height: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }

  /* key page: the seven chords in one row */
  .seven { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
  .drone { margin-top: 18px; }

  /* finder: the answer beside the neck */
  .found > :first-child { margin-top: 0; }
}

/* Save and Share beside the tuning chip (Pocket Theory's R32/R37 pair), and the toast they answer with. */
.bar-end { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); padding: 0; cursor: pointer; }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.star.on { color: var(--accent); }
.icon-btn.star.on svg { fill: currentColor; }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .icon-btn:hover { background: var(--surface); color: var(--text); } .icon-btn.star.on:hover { color: var(--accent); } }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); opacity: 0;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
  font-size: 14px; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 32px; } }
/* The bar holds Back, Save, Share and the tuning chip: on a narrow phone with a long custom
   tuning name the chip gives way (ellipsis) rather than pushing the page sideways. */
.bar-end { min-width: 0; }
.bar-end .icon-btn { flex: none; }
.bar .chip { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 38px; }
@media (max-width: 359px) { .bar-end { gap: 0; } .bar-end .icon-btn { width: 38px; } .bar .back { padding-right: 4px; } }

/* The capo (research 2026-11-06): a brass bar where the nut was, a 0-7 row in Settings, and the
   hint on key pages. */
.bx .bx-capo, .bx-mini .bx-capo { stroke: var(--accent); stroke-width: 5; }
.capo-row { display: flex; flex-wrap: wrap; gap: 6px; }
.capo-row .seg { min-width: 44px; }
.capo-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; padding: 10px 12px 10px 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 12px; }
.capo-hint p { margin: 0; flex: 1; min-width: 160px; font-size: 14px; color: var(--text); }

/* The tuner (research 2026-11-06 §4.1), Pocket Theory's meter in Bog Oak tokens. */
.tuner { text-align: center; margin-top: 8px; }
.tuner .help { margin-top: 10px; }
.tn-courses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tn-course { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--surface); border-radius: 12px; padding: 8px 4px; }
.tn-num { font-size: 11px; color: var(--text-3); }
.tn-course:first-child .tn-str { border-color: var(--fifth); }
.tn-str { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text);
  font: 400 20px var(--serif); padding: 0 6px; }
.tn-str sub { font: 11px var(--sans); color: var(--text-3); }
.tn-str.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tn-plus { font-size: 11px; color: var(--text-3); line-height: 1; }
.tn-note { font-family: var(--serif); line-height: 1; min-height: 88px; margin-top: 18px; }
.tn-note b { font-size: 80px; font-weight: 400; }
.tn-note sub { font-size: 22px; color: var(--text-2); margin-left: 2px; }
.tn-meter { position: relative; height: 44px; margin: 16px 8px 4px; border-radius: 999px; background: var(--surface-2); }
.tn-zone { position: absolute; top: 0; bottom: 0; left: 45%; width: 10%; background: var(--accent-soft); }
.tn-mid { position: absolute; top: 6px; bottom: 6px; left: 50%; width: 2px; margin-left: -1px; background: var(--text-3); }
.tn-needle { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text-2); transition: left 90ms linear; opacity: .35; }
.tuner.is-heard .tn-needle { opacity: 1; background: var(--text); }
.tuner.is-in-tune .tn-needle { background: var(--accent); }
.tuner.is-in-tune .tn-note b { color: var(--accent); }
.tn-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin: 0 8px; }
.tn-read { font-size: 13px; color: var(--text-2); margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.tn-status { font-weight: 600; margin: 8px 0 14px; min-height: 1.4em; }
.tn-start { flex: none; min-width: 200px; min-height: 48px; }
.tuner.is-on .tn-start { display: none; }
.tn-ref { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); margin-top: 16px; }
.tn-ref .mini-btn { min-width: 44px; min-height: 44px; font-size: 18px; }
@media (min-width: 960px) { .tuner { max-width: 560px; margin: 8px auto 0; } }

/* Picking patterns: one bar as a strip of eight slots, lit as it plays. */
.pick { background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pick-head b { font: 400 20px/1.2 var(--serif); }
.pick-sub { font-size: 12px; color: var(--text-3); text-align: right; }
.pick .pnote { font-size: 12.5px; line-height: 1.45; color: var(--text-2); margin: 10px 0 0; }
.strip { display: grid; gap: 3px; margin-top: 10px; }
.st { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border-radius: 8px; background: var(--surface-2); }
.st b { font: 400 19px/1.1 var(--serif); white-space: nowrap; }
.st.tight b { font-size: 15px; word-spacing: -.05em; }   /* "3 2 1" in one narrow slot stays on one line */
.st i { font: 700 10.5px var(--sans); font-style: normal; color: var(--text-3); margin-top: 2px; }
.st.s5 b { color: var(--fifth); }
.st.lit { background: var(--accent); }
.st.lit b, .st.lit i { color: var(--on-accent); }
.tempo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--text-2); }
.tempo b { font: 400 24px var(--serif); color: var(--text); }
.tempo .mini-btn { min-width: 44px; min-height: 44px; font-size: 18px; }
.pick .actions { flex-wrap: wrap; }
.pick .actions .btn { flex: 1 1 130px; min-height: 44px; line-height: 1.2; }
.roll-stop { display: none; width: 100%; margin-top: 8px; min-height: 44px; }
body.rolling .roll-stop { display: block; }
.btn.is-playing, .play.is-playing { box-shadow: 0 0 0 2px var(--live); }
.chipbtn { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; background: transparent; font: 400 15px var(--serif); }
.chipbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chipbtn.sounding { box-shadow: 0 0 0 2px var(--live); }
.rollrow { width: 100%; border: 0; background: transparent; text-align: left; border-top: 1px solid var(--line); }
.list .rollrow:first-child { border-top: 0; }
.rollrow.first { background: var(--accent-soft); }
@media (min-width: 960px) { .rolls-cols { grid-template-columns: minmax(0, 1fr) 380px; } }

/* More modes: the same look as the four buttons, opened under them. */
.more-modes { display: block; width: 100%; min-height: 40px; margin-top: 6px; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; }
.modes-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--bg); border-radius: 10px; padding: 3px; margin-top: 6px; }
.modes-more button { border: 0; background: transparent; color: var(--text-2); font: 500 13px var(--sans); min-height: 40px; border-radius: 8px; }
.modes-more button.on { background: var(--surface-2); color: var(--text); }
.modes-more button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.colour-line { margin: 10px 2px 0; font: italic 15px/1.45 var(--serif); color: var(--text-2); }
@media (hover: hover) and (pointer: fine) {
  .modes-more button:not(.on):hover { background: var(--surface-2); color: var(--text); }
  .more-modes:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* Previewing a progression: what to play it with, and which chord is sounding. */
.play-with { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; color: var(--text-2); font-size: 13px; }
.play-with label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.play-with select { min-height: 40px; max-width: 190px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.play-with .tempo { margin: 0; gap: 8px; }
.play-with .tempo b { font-size: 18px; }
.play-with .tempo .mini-btn { min-width: 40px; min-height: 40px; }
.prog .names a.sounding { box-shadow: 0 0 0 2px var(--live); }
/* a play button that's playing is a stop button */
.play.is-playing { font-size: 0; }
.play.is-playing::after { content: "■"; font-size: 14px; }

/* ---------------------------------------------------------------- the UX pass (UX-PASS.md) */
:root { --control-line: #8a7362; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 60; min-height: 44px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 10px; background: var(--surface-2); transform: translateY(-200%); }
.skip:focus { transform: none; }
h1:focus { outline: none; }
html { scroll-padding-bottom: 96px; }
html:has(body.has-getapp) { scroll-padding-bottom: 190px; }
html:has(.player) { scroll-padding-top: 230px; }
@media (min-width: 960px) { html, html:has(.player) { scroll-padding: 80px 0 0; } }
html.kbd .shape:has(.bx:focus-visible), html.kbd .cell:has(.bx:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.list .li:focus-visible { outline-offset: -3px; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.more summary::before { content: "▸ " / ""; }
.more[open] summary::before { content: "▾ " / ""; }

/* list wrappers that leave the layout alone */
.lr { display: contents; }
.li:first-child { border-top: 1px solid var(--line); }
.lr:first-child .li, .list > .li:first-child { border-top: 0; }

/* the selected tab and mode are more than a colour */
.tabs a { min-height: 44px; }
.tabs a[aria-current] { box-shadow: inset 0 2px 0 var(--accent); }
.modes button, .modes-more button, .more-modes, .seg, .mini-btn { min-height: 44px; }
.modes button.on, .modes-more button.on { background: var(--accent); color: var(--on-accent); }

/* controls a person has to find have a visible edge */
.search, .play-with select, .course select { border-color: var(--control-line); }

/* 44 px targets */
.keys button, .roots button, .roots a { min-width: 44px; }
.chips a { min-width: 44px; min-height: 44px; justify-content: center; }
.chipbtn { min-width: 44px; min-height: 44px; justify-content: center; }
.h a { min-height: 44px; min-width: 44px; justify-content: flex-end; margin: -14px 0; gap: 4px; }
.seven .cell a { min-height: 44px; }
.shape .lab a { min-height: 44px; padding: 10px 12px; }
.course select, .play-with select { min-height: 44px; }
.play { width: 44px; height: 44px; }
.getapp .ga-x { width: 44px; height: 44px; }
.getapp .ga-go { min-height: 44px; }
.mini-btn { min-width: 44px; }
.chip { min-height: 44px; }
.bar .chip { display: block; height: 44px; min-height: 44px; line-height: 42px; padding: 0 12px; }
.bar .back { min-width: 44px; }
@media (max-width: 359px) { .bar-end .icon-btn { width: 44px; } }
@media (min-width: 960px) { .col .keys, .col .roots { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); } }
@media (min-width: 960px) { .tabs .home-link, .tabs a:not(.home-link) { min-height: 44px; } }
.capo-row { flex-wrap: nowrap; gap: 4px; }
.capo-row .seg { flex: 1 1 0; min-width: 0; padding: 0 2px; }
.tog { flex-wrap: wrap; }
.tog > span { flex: 1 1 100%; }
.tog .seg { flex: 1 1 0; }
.octs .help { margin: 2px 2px 4px; }
.custom-head { background: transparent; padding: 0 12px; }
.custom-head i { font: 11px var(--sans); color: var(--text-3); font-style: normal; }

/* the box: the 5th string's mark is an open string's ring; the first shape is big enough to read on a knee */
.bx-pip.in-chord { stroke-dasharray: none; fill: none; stroke-width: 1.6; }
.bx-note5 { font-weight: 700; }
.shape { width: 156px; }
.shape .bx { position: relative; left: -12.75px; }
.cell .bx { position: relative; left: -5px; }
.shapes-row .first-shape { width: auto; margin-bottom: 10px; padding: 14px 8px 12px; }
.shapes-row .first-shape .bx { width: 191px; height: auto; left: -19px; }
.shapes-row .swipe { margin-top: 0; }
.h .count { color: var(--text-2); }
.box-key { font-size: 12.5px; line-height: 1.4; color: var(--text-2); margin: 10px 2px 0; }
.fifth-line b { font: inherit; font-weight: 700; color: var(--fifth); }
.no3rd { margin-top: 18px; }
.no3rd .help { margin: 0 2px 10px; }
@media (min-width: 960px) {
  .shapes-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
  .shapes-row .swipe { display: contents; }
  .shapes-row .first-shape { margin: 0; padding: 14px 10px 12px; }
  .shape { width: auto; }
  .shape .bx, .shapes-row .first-shape .bx { width: 134px; left: -9px; }
}

/* key page */
.start-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.start-cards .cell { border-color: var(--accent-line); }
.start-cards .cell a { display: block; min-height: 44px; padding: 2px 0; }
.start-cards .n { display: block; font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: .04em; }
.drone { margin-top: 22px; }
.colour-line { margin-top: 12px; }
.play-with { background: var(--surface); border-radius: 14px; padding: 10px 14px; }
.tempo-read { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; text-align: center; }
.tempo-read small { font-size: 11px; color: var(--text-3); }
.play-with .tempo .mini-btn { min-width: 44px; min-height: 44px; }
.prog .names { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 17px; }
.prog .names a { min-height: 44px; min-width: 0; padding: 0 2px; }

/* finder */
.answer { font: 400 26px/1.2 var(--serif); margin: 0 2px 10px; min-height: 32px; }
.neck button { height: 44px; }
.neck .no5 { height: 44px; }
.neck button.s5.pip::after { width: 16px; height: 16px; margin-left: -8px; bottom: 14px; }

/* tuner */
.tn-course:first-child .tn-str { border-color: var(--line); }
.tn-course.is-5th .tn-num { color: var(--fifth); font-weight: 700; }
.tuner.is-on .tn-start { display: inline-block; }

/* picking: the strip says what it means, and the player stays on screen */
.roll-def { margin: 0 2px 8px; font: italic 15px/1.4 var(--serif); color: var(--text-2); }
.draft-line { margin: 0 2px 12px; }
.st { min-height: 56px; }
.st i { font-size: 13px; }
.strip-key { font-size: 12.5px; line-height: 1.4; color: var(--text-2); margin: 10px 0 0; }
.player .actions { margin-top: 10px; }
.when-on { display: none; }
.is-playing .when-on { display: inline; }
.is-playing .when-off { display: none; }
.player-more { margin-top: 10px; }
.player-more .strip-key { margin-top: 0; }
.h-btn { border: 0; background: transparent; color: var(--accent); font: 600 13px var(--sans); letter-spacing: .04em; text-transform: none; min-height: 44px; margin: -14px 0; padding: 0 2px 0 12px; }
.roll-keys { background: var(--surface); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.rollrow .r { color: var(--accent); }
@media (max-width: 959px) {
  .rolls-cols, .rolls-cols > .col { display: contents; }
  .player { position: sticky; top: 0; z-index: 4; margin: 0 -16px; padding: calc(10px + var(--safe-top)) 16px 10px; background: var(--bg); border-radius: 0; border-bottom: 1px solid var(--line); }
}
@media (min-width: 960px) {
  .rolls-cols > .col:first-child { position: sticky; top: calc(var(--top-h) + 12px); }
  .start-cards { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* the tuning sheet */
body.sheet-open { overflow: hidden; }
.sheet-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .55); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; max-height: 85vh; margin: 0 auto; overflow: auto; padding: 10px 16px calc(14px + var(--safe-bottom)); background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 28px rgba(0, 0, 0, .5); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font: 400 21px var(--serif); }
.sheet .ga-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 24px; line-height: 1; }
.sheet .h { margin: 16px 0 8px; }
.sheet-more { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 44px; margin-top: 6px; color: var(--accent); font-size: 14px; font-weight: 600; }

/* the drone's pill, on any page */
.drone-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h, 66px) + 10px + var(--safe-bottom)); z-index: 6; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface-2); color: var(--accent); font-size: 14px; font-weight: 600; }
.drone-pill[hidden] { display: none; }
body.has-getapp .drone-pill { bottom: calc(var(--tabs-h, 66px) + var(--getapp-h, 72px) + 18px); }
@media (min-width: 960px) { .drone-pill, body.has-getapp .drone-pill { bottom: 24px; } }

.toast.stay { pointer-events: auto; user-select: all; display: flex; align-items: center; gap: 8px; border-radius: 14px; overflow-wrap: anywhere; }

@media (forced-colors: active) {
  .start-cards .cell { border-color: Highlight; }
  .is-playing, .sounding { outline: 2px solid Highlight; }
  .modes button.on, .modes-more button.on, .keys button.on, .roots .on, .seg.on, .chipbtn.on { outline: 2px solid Highlight; }
  .tabs a[aria-current] { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* ---------------------------------------------------------------- colours (Settings) */
/* each swatch is the palette's own ground with its accent, text and 5th-string colours on it */
.pal-sw { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 6px 7px; border: 1px solid; border-radius: 10px; }
.pal-sw i { width: 12px; height: 12px; border-radius: 50%; }
.pal-opt.on { background: var(--accent-soft); }
.pal-custom { display: grid; gap: 6px; margin-top: 8px; }
.pal-pick { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px; border-radius: 14px; background: var(--surface); cursor: pointer; }
.pal-pick input { flex: none; width: 52px; height: 44px; padding: 0; border: 1px solid var(--control-line); border-radius: 8px; background: transparent; cursor: pointer; }
.pal-pick small { display: block; color: var(--text-3); font-size: 12px; }

/* ---------------------------------------------------------------- UX pass 2: the one player (R7) */
.pattern-pick { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pattern-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 0 14px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); color: var(--text); font: 400 18px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pattern-btn span { color: var(--accent); font-size: 13px; }
.pl-step { justify-content: flex-start; gap: 6px; }
.pl-step .pattern-pick { flex: 1; min-width: 0; justify-content: center; }
.pl-step .mini-btn { flex: none; font-size: 20px; padding: 0; }
.strip-wrap { margin-top: 10px; }
.strip-wrap .strip { margin-top: 4px; }
.now-chord { font: 400 16px var(--serif); color: var(--text); }
.now-chord i { font: 700 11px var(--sans); font-style: normal; color: var(--accent); letter-spacing: .04em; margin-left: 4px; }
.pl-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pl-row .btn { flex: 1 1 auto; min-height: 44px; line-height: 1.2; min-width: 0; }
.pl-row .tempo { margin: 0; flex: none; gap: 6px; }
.pl-row .tempo b { font-size: 20px; }
.pl-row .tempo-read small { display: none; }
.pl-card { margin-bottom: 10px; }
.pl-card .pick-head { flex-wrap: wrap; }
.pl-card .tempo { margin: 0; }
.pl-over { font-size: 12.5px; color: var(--text-3); margin: 8px 0 0; }
.pl-goto { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.go-pick { background: transparent; border: 1px solid var(--accent-line); margin-top: 8px; }
.btn.small { flex: none; min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
/* a progression: its tune, Loop, and its chords as cells (numeral over name) */
.prog { display: block; }
.prog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prog-head .pnote { flex: 1; min-width: 0; font-size: 13px; }
.prog .names { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 8px 0 2px; }
.pcell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; width: 100%; padding: 4px 2px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); text-align: center; }
.pcell i { font: 700 11px var(--sans); font-style: normal; color: var(--accent); letter-spacing: .04em; }
.pcell b { font: 400 17px/1.15 var(--serif); }
.pcell small { font-size: 10px; color: var(--text-3); }
.pcell.noshape { opacity: .6; }
.pcell.sounding { box-shadow: 0 0 0 2px var(--live); }
.pl-prog.on { box-shadow: inset 3px 0 0 var(--accent); }
.mine-from { padding-left: 0; }
/* Picking: what it plays over */
.pl-views { display: flex; gap: 6px; margin: 14px 0 8px; }
.pl-views .seg { flex: 1 1 0; min-height: 44px; font-size: 14px; }
.pl-bars { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--text-2); font-size: 13px; }
.pl-bars span { flex: 1; }
.pl-bars .seg { min-width: 44px; min-height: 44px; }
.pl-chords { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pl-chord { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.pl-chord.main { border-color: var(--accent-line); }
.pl-chord.on { background: var(--accent-soft); border-color: var(--accent); }
.pl-chord.is-playing { box-shadow: 0 0 0 2px var(--live); }
.pl-chord i { font: 700 11px var(--sans); font-style: normal; color: var(--accent); }
.pl-chord b { font: 400 18px var(--serif); }
.pl-chord.noshape { opacity: .6; }
.pl-from { font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.pl-mine { margin-bottom: 4px; }
.mine-cells { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.mcell { display: flex; flex-direction: column; gap: 2px; }
.mcell-acts { display: flex; justify-content: flex-end; gap: 2px; }
.mini-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 18px; }
.mine-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mine-acts .btn { flex: 1 1 auto; min-height: 44px; }
.pl-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.pal { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 56px; min-height: 48px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.pal i { font: 700 10.5px var(--sans); font-style: normal; color: var(--accent); }
.pal b { font: 400 16px var(--serif); }
.pal.out { border-style: dashed; }
.pal.noshape { opacity: .6; }
.saved-mine .r { display: flex; gap: 4px; align-items: center; }
@media (min-width: 600px) { .mine-cells { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 959px) { .rolls-cols > .patterns-col { display: none; } }
/* the loop's pill, on every page but Picking; the drone's sits above it when both run */
.roll-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h, 66px) + 10px + var(--safe-bottom)); z-index: 6; display: flex; align-items: center; max-width: calc(100vw - 32px); border: 1px solid var(--live); border-radius: 999px; background: var(--surface-2); }
.roll-pill[hidden] { display: none; }
.roll-pill-go { display: flex; align-items: center; min-height: 44px; padding: 0 8px 0 16px; color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.roll-pill-stop { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--live); font-size: 16px; }
body.has-getapp .roll-pill { bottom: calc(var(--tabs-h, 66px) + var(--getapp-h, 72px) + 18px); }
body.pill-roll .drone-pill { bottom: calc(var(--tabs-h, 66px) + 64px + var(--safe-bottom)); }
body.pill-roll.has-getapp .drone-pill { bottom: calc(var(--tabs-h, 66px) + var(--getapp-h, 72px) + 72px); }
@media (min-width: 960px) {
  .roll-pill, body.has-getapp .roll-pill { bottom: 24px; }
  body.pill-roll .drone-pill, body.pill-roll.has-getapp .drone-pill { bottom: 78px; }
}
@media (forced-colors: active) { .pl-chord.on, .pcell.sounding, .pl-prog.on { outline: 2px solid Highlight; } }

/* ---------------------------------------------------------------- UX pass 3: Picking, stripped back (UX-PASS-3.md) */
/* a labelled disclosure: quiet text with ▾, 44 px tall */
.more-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--accent); font: 600 14px var(--sans); }
.more-btn span { font-size: 12px; }
.pl-help { margin: 4px 0 0; }
.pl-help + .player-more { margin-top: 2px; }
.player-more .roll-def { margin: 0 0 8px; font-size: 14px; }
/* what it plays over, then the key it's in and the bars, on one line */
.pl-views { margin: 10px 0 4px; }
.pl-ctx { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; color: var(--text-2); font-size: 14px; }
.pl-in { display: inline-flex; align-items: center; gap: 4px; }
.key-btn { font-size: 15px; }
.pl-ctx .pl-bars { display: inline-flex; gap: 4px; margin: 0; }
.pl-ctx .pl-bars .seg { min-width: 0; min-height: 44px; padding: 0 12px; font-size: 13px; }
/* the Chord view: chips, and one box */
.pl-chords { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.pl-chord { justify-content: center; min-height: 52px; padding: 4px; }
.pl-shape { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.pl-shape .shape { flex: none; padding: 8px 10px 6px; }
.pl-shape .help { margin: 0; }
.pl-goto.quiet { justify-content: flex-start; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
/* a progression or a saved one: one line you tap to pick; the picked one opens */
.pl-prog { padding: 0; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pl-prog.on { border-color: var(--accent); box-shadow: none; padding-bottom: 6px; }
.pl-prog .names, .pl-prog .mine-from { margin-left: 12px; margin-right: 12px; }
.pl-prow { display: block; width: 100%; min-height: 52px; padding: 9px 14px; border: 0; background: transparent; color: var(--text); text-align: left; }
.pl-prow .t { display: block; font: italic 15px/1.3 var(--serif); }
.pl-prow .s { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); letter-spacing: .02em; }
.pl-prog.on .pl-prow .s { display: none; }
.pl-prow.is-playing { box-shadow: inset 3px 0 0 var(--live); }
/* yours: each bar a chip, its ‹ and × inside it */
.mine-cells { display: flex !important; flex-wrap: wrap; gap: 6px; }
.mcell { flex-direction: row; align-items: stretch; gap: 0; border-radius: 12px; background: var(--surface-2); }
.mcell .pcell { width: auto; min-width: 52px; background: transparent; }
.mcell .mini-x { min-width: 36px; padding: 0; border-radius: 0; }
.mcell .mini-x:last-child { min-width: 44px; border-radius: 0 12px 12px 0; }
.mine-acts { align-items: center; gap: 4px; }
.mine-acts .btn.small { flex: none; }
.txt-btn { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--text-2); font: 600 14px var(--sans); }
.saved-mine { padding: 0 6px 0 0; }
.saved-mine .pl-prow { flex: 1; min-width: 0; }
.saved-mine.on { background: var(--accent-soft); }
.saved-mine .pl-prow .t { font-style: normal; font-size: 17px; }
.pl-palette + .pl-help { margin-top: 6px; }
@media (hover: hover) and (pointer: fine) {
  .more-btn:hover, .txt-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
  .pl-prow:hover { background: var(--surface-2); }
}
/* a computer: the pattern list scrolls in its own column, so it doesn't set the page's height (V11) */
@media (min-width: 960px) {
  .patterns-list { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 32px); overflow: auto; padding-right: 4px; }
  .patterns-list > .h:first-child { margin-top: 0; }
}
@media (forced-colors: active) { .pl-prog.on, .saved-mine.on { outline: 2px solid Highlight; } }

/* ---------------------------------------------------------------- release: feedback */
.feedback-btn { display: block; width: 100%; min-height: 44px; margin-bottom: 10px; }
.fb { display: flex; flex-direction: column; gap: 10px; }
.fb-l { font-size: 14px; color: var(--text-2); }
.fb textarea { width: 100%; min-height: 140px; resize: vertical; padding: 10px 12px; border: 1px solid var(--control-line, var(--line)); border-radius: 12px; background: var(--surface-2); color: var(--text); font: 400 16px/1.4 var(--sans); }
.fb .btn { min-height: 44px; }
.fb .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
