/* Bog Oak (R1 Gate A, prototypes/looks.html look A): dark green-black, cream text, a brass
   accent, serif chord names, each course drawn as its pair of strings. 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: #121b17; --surface: #1b2722; --surface-2: #233229; --line: #33463d;
  --text: #f1e8d6; --text-2: #b8ad98; --text-3: #a09783;
  --accent: #e3a83f; --accent-soft: rgba(227, 168, 63, .15); --accent-line: rgba(227, 168, 63, .4); --on-accent: #1a1408;
  --dot: #f1e8d6; --dot-text: #121b17; --root: #e3a83f; --root-text: #1a1408;
  --wire: #6b8275; --nut: #f1e8d6; --string: #c9bda5;
  --tabs-bg: rgba(18, 27, 23, .96);
  --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; }
.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; }
.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; }
.hero { display: flex; gap: 16px; align-items: center; margin: 8px 0 4px; min-width: 0; }
.hero > div:last-child { min-width: 0; }
.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 8px 10px; width: 132px; 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(84px, 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 { 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); }
.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: 26px repeat(4, 1fr); gap: 6px; 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: 3px double var(--string); transform: translateX(-50%); opacity: .55; }
.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(4, 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: rgba(227, 168, 63, .24); }
  .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(4, 1fr); gap: 6px; }
.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-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; } }
