/* The web app's look: the Mac app's dark window, green accents, Anton titles and Courier Prime labels.
   Colours come from theme.css (generated from the kit); a few blends are made here. */
@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
/* Music symbols for the Score view (SMuFL; loads only when a score is drawn). */
@font-face { font-family: "Bravura"; src: url("/fonts/Bravura.otf") format("opentype"); font-display: block; }
/* A score's title (on screen and on paper) in the titles' font, like the apps'. */
.score-svg .score-title { font-family: var(--display); }

:root {
  color-scheme: dark;
  /* Theme.swift's faint (not a kit colour yet). */
  --bp-faint: #5C715B;
  --line: color-mix(in srgb, var(--bp-text) 10%, transparent);
  --hover: color-mix(in srgb, var(--bp-text) 6%, transparent);
  --theme-neon: var(--bp-neon);
  --selected: color-mix(in srgb, var(--bp-neon) 16%, transparent);
  /* Grey text on a selected row: 4.5:1 on --selected (kit SurfaceColors.mutedOnSelected; green's value here). */
  --bp-muted-on-selected: #98AB97;
  /* Opaque: 85 % panel, 3 % text, 12 % background (kit SurfaceColors' sidebar). A single color-mix whose shares add to 88 %
     came out 12 % see-through, so the sticky New project bar showed the tree scrolling under it. */
  --sidebar: color-mix(in srgb, color-mix(in srgb, var(--bp-panel) 96.59%, var(--bp-text)) 88%, var(--bp-background));
  --display: "Anton", "Arial Narrow", sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --mono-fixed: var(--mono); /* chord lines, lines with chords, tabs: Appearance keeps this fixed-width */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 8px;
  /* The one control family (visual sweep 2026-12-02, matching the apps' Theme.Control and Theme.fill): buttons with words
     are capsules, icon-only buttons are circles, both --control-h tall; chips are capsules --chip-h tall; a secondary
     control is filled with --fill (neutral), a primary one with the accent. Cards and rows round to --card-radius.
     Spacing steps 4/8/12/16/24/32/48. */
  --control-h: 32px;
  --chip-h: 30px;
  --control-gap: 8px;
  --control-font: 600 14px/1.15 var(--sans);
  --fill: color-mix(in srgb, var(--bp-text) 7%, transparent);
  --fill-hover: color-mix(in srgb, var(--bp-text) 12%, transparent);
  --card-radius: 12px;
  /* Calendar: the three answers (a show and a practice use the accent alone). */
  --answer-going: #35d04a;
  --answer-maybe: #e8c46a;
  --answer-no: #e2413b;
}

/* Inside a project, album or song with art (Jack, 2026-11-23): the art's colour takes the green's place everywhere,
   the pot included, and the dark surfaces and grey text turn to its hue (ui/appearance.js applyArtTint, from the kit's
   SurfaceColors.tinted(by:)); the neutral grey below is only the fallback and grey art's own set. */
/* Appearance (ui/appearance.js): the accent a person picked takes the default green's place. Inside an item with art
   the art's colour wins, as before. Text on an accent-filled button is the dark or light the kit picked. */
:root { --on-neon: var(--on-neon-pick, var(--bp-background)); }
:root:not([data-tint]) { --bp-neon: var(--neon-pick, var(--bp-neon-default)); }
/* …and the dark surfaces and grey text take its hue too, so nothing green is left (Jack, 2026-11-19; kit SurfaceColors). */
:root[data-accent]:not([data-tint]) {
  --bp-background: var(--pick-background, #051105);
  --bp-panel: var(--pick-panel, #0B1C0B);
  --bp-text: var(--pick-text, #E4EFE2);
  --bp-muted-text: var(--pick-muted-text, #7F977E);
  --bp-faint: var(--pick-faint, #5C715B);
  --bp-muted-on-selected: var(--pick-muted-on-selected, #98AB97);
}

:root[data-tint] {
  --bp-neon: var(--tint);
  --on-neon: var(--tint-background, #0c0c0d);
  --bp-background: var(--tint-background, #0c0c0d);
  --bp-panel: var(--tint-panel, #18181a);
  --bp-text: var(--tint-text, #ececee);
  --bp-muted-text: var(--tint-muted-text, #8e8e93);
  --bp-faint: var(--tint-faint, #636366);
  --bp-muted-on-selected: var(--tint-muted-on-selected, #ADADB1); /* 4.5:1 on any art color's highlight (worst case: white art) */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bp-background);
  color: var(--bp-text);
  font: 400 15px/1.45 var(--sans);
  caret-color: var(--bp-neon);
}
::selection { background: var(--bp-neon); color: var(--on-neon); }
:focus-visible { outline: 2px solid var(--bp-neon); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
/* One item of a stat line (ui/dom.js stats): it wraps only between items, and its dot stays with it. */
.stat { white-space: nowrap; }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--bp-muted-text); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.pad { padding: 4px 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.boot { font-family: var(--mono); color: var(--bp-muted-text); padding: 40px; }
.boot-bar { display: block; width: min(320px, calc(100% - 80px)); height: 3px; margin: -24px 40px 0; border-radius: 2px; background: var(--line); overflow: hidden; }
.boot-bar > span { display: block; width: 0; height: 100%; background: var(--bp-neon); transition: width var(--motion-pop) linear; }
@media (prefers-reduced-motion: reduce) { .boot-bar > span { transition: none; } }

/* Window */
.window { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: auto minmax(0, 1fr); height: 100vh; }
.window > .top-bar { grid-column: 1 / -1; }
.main { overflow: auto; position: relative; }
/* A solid bar, above the DAW's sticky ruler and drawer: the buttons (and their popovers) floated over scrolled text and
   the ruler covered them. Sticky things below it start at --toolbar-h. */
.toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 20px; position: sticky; top: 0; z-index: 8;
  min-height: var(--toolbar-h); box-sizing: border-box; background: var(--bp-background); }
:root { --toolbar-h: 62px; }

/* Sidebar */
/* The bar across the top (ui/top-bar.js): brand, the three places, search, the profile circle. It is the page's own surface, so an art page tints it with everything else. */
.top-bar { display: flex; align-items: center; gap: 22px; height: 56px; padding: 0 18px; box-sizing: border-box; background: var(--bp-background); border-bottom: 1px solid var(--line); position: relative; z-index: 9; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-pill { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; color: var(--bp-muted-text); font-weight: 600; font-size: 13px; }
.top-pill .icon { width: 17px; height: 17px; }
.top-pill:hover { color: var(--bp-text); background: var(--hover); }
.top-pill[aria-current="page"], .top-pill[aria-expanded="true"] { color: var(--bp-text); background: var(--selected); }
.top-pill .bell-dot { top: 4px; right: 5px; }
.top-pill.bell { width: auto; border: 0; display: inline-flex; align-items: center; justify-items: initial; }
.top-pill.bell:hover { border: 0; }
.top-bar .search { flex: 1; min-width: 0; max-width: 340px; height: 34px; margin: 0 0 0 auto; border-radius: 10px; }
.top-bar .account { flex: none; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: auto; padding: 12px 8px 10px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; font: 400 22px/1 "Anton", "Arial Narrow", sans-serif; /* the wordmark stays Anton whatever the titles font is */ letter-spacing: 0.02em; color: var(--bp-text); text-decoration: none; flex: none; }
.brand img { width: 28px; height: 28px; flex: none; }
/* The pot takes the accent a person picked, or the art's colour inside a tinted item: its own shading kept.
   Every pot on the page is wrapped in .brand-pot (sidebar, sign-in, phone pages). */
.brand-pot { position: relative; display: flex; flex: none; isolation: isolate; }
:root[data-tint] .brand-pot::after, :root[data-accent] .brand-pot::after { content: ""; position: absolute; inset: 0; background: var(--bp-neon);
  -webkit-mask: url("/app/pot.png") center / contain no-repeat; mask: url("/app/pot.png") center / contain no-repeat; mix-blend-mode: multiply; }
/* A "color" blend kept the green's brightness and clipped a saturated pick to one flat color. So the pot is greyed and
   its narrow light range (about 34-63%) stretched to 50-100%, then multiplied by the pick: the lit side is the pick,
   the shaded side a darker pick (the apps' PotTint does the same). */
:root[data-tint] .brand-pot img, :root[data-accent] .brand-pot img { filter: grayscale(1) contrast(1.1) brightness(1.56); }
.section-label { font: 700 12px/1 var(--sans); color: var(--bp-muted-text); margin: 18px 12px 6px; letter-spacing: 0.02em; }
.tree { list-style: none; margin: 0; padding: 0; }
.row-button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 12px; border-radius: 6px; color: var(--bp-text); }
.row-button:hover { background: var(--hover); }
.row-button.selected { background: var(--selected); }
.row-button .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-button.depth-1 { padding-left: 26px; }
.row-button.depth-2 { padding-left: 40px; color: color-mix(in srgb, var(--bp-text) 85%, var(--bp-muted-text)); }
.row-button .icon { color: var(--bp-muted-text); }
.row-button.selected .icon, .row-button.selected.damaged .label,
.tree li.has-menu > .selected + .menu-button:not(:hover):not([aria-expanded="true"]) { color: var(--bp-muted-on-selected); }
.row-button.damaged .label { color: var(--bp-muted-text); font-style: italic; }
.badge { margin-left: auto; color: var(--bp-recording-red); font-weight: 700; }
.projects { margin-bottom: 8px; }
.sidebar-body { display: flex; flex-direction: column; flex: 1 0 auto; }
.row-button .count { margin-left: auto; padding-left: 8px; font-size: 12px; font-weight: 600; color: var(--bp-muted-text); }
.row-button.selected .count { color: var(--bp-muted-on-selected); }
.sidebar-foot { z-index: 3; position: sticky; bottom: -10px; margin: 10px -8px -10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--sidebar); display: grid; gap: 8px; }
.accent-text { display: flex; align-items: center; gap: 8px; color: var(--bp-neon); padding: 4px 8px; text-align: left; }

/* Stage dots */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--stage-idea); }
.stage-idea { background: var(--stage-idea); }
.stage-writing { background: var(--stage-writing); }
.stage-demo { background: var(--stage-demo); }
.stage-recording { background: var(--stage-recording); }
.stage-mixing { background: var(--stage-mixing); }
.stage-done { background: var(--stage-done); }
.stage-released { background: var(--stage-released); }

/* Buttons */
/* The control family (tokens in :root): a capsule with words, never wrapping ("Play" one letter a line, 2026-12-02), in
   the sans at one weight whatever font the box around it uses. An icon-only button is a --fill circle --control-h across. */
.primary, .quiet, button.danger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--control-h);
  padding: 0 16px; border-radius: 999px; font: var(--control-font); white-space: nowrap; text-decoration: none; }
.primary { background: var(--bp-neon); color: var(--on-neon); }
.quiet { background: var(--fill); color: var(--bp-text); }
.quiet:hover:not(:disabled) { background: var(--fill-hover); }
.primary .icon, .quiet .icon, button.danger .icon { width: 15px; height: 15px; flex: none; }
.quiet.small, .primary.small { min-height: 28px; padding: 0 12px; font-size: 13px; }
.link { color: var(--bp-neon); text-decoration: underline; text-underline-offset: 0.2em; padding: 0 4px; }
/* A link inside a sentence: no padding, so the full stop after it sits right against it. */
.link.inline { padding: 0; }
.notice .link { min-height: 28px; } /* "Got it", "Download a backup": 24 px or more to tap (friction audit #12) */

/* Pages */
.page { padding: 20px 40px 60px; max-width: 1680px; margin-inline: auto; }
.page.narrow { max-width: 640px; margin-inline: 0; }
.page h1 { font: 400 clamp(36px, 5vw, 56px)/1.05 var(--display); margin: 0 0 8px; letter-spacing: 0.01em; }
.page-header { display: flex; gap: 28px; align-items: flex-end; margin: 0 0 28px; }
/* A project's links: small rounded chips under the header (project-links.js). */
.project-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: -12px 0 28px; padding: 0; }
.link-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  background: var(--fill); color: var(--bp-text); font-size: 13px; text-decoration: none; }
.link-chip:hover { background: var(--selected); }
.link-chip .icon { width: 13px; height: 13px; color: var(--bp-neon); }
.link-chip .icon.logo { fill: currentColor; stroke: none; }
.link-chip.quiet { background: var(--fill); color: var(--bp-muted-text); } /* "Add a link": the same chip, its words quieter; no outline */
.link-chip.quiet .icon { color: var(--bp-muted-text); }
dialog.sheet.links-dialog { width: min(560px, calc(100vw - 32px)); }
.link-rows { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 10px; }
.link-row { display: grid; grid-template-columns: 1fr 150px auto auto; gap: 6px; align-items: center; }
dialog.sheet .link-row input { margin: 0; }
@media (max-width: 560px) { .link-row { grid-template-columns: 1fr auto auto; } .link-row input[type=text] { grid-column: 1; } }
/* A library page takes its art's colour (--accent, set by library-page.js), as the Mac's pages do: buttons, the
   Done stage and links. Without art it stays theme green. Album and project pages also get the wash at the top. */
.page.accented { --bp-neon: var(--accent, var(--theme-neon)); }
.page.accented .quiet .icon { color: var(--bp-neon); }
/* The wash is as wide as the content area (100cqw of .main), so no band shows beside a page capped at 1680 px. */
.page.wash { position: relative; isolation: isolate; }
.page.wash::before { content: ""; position: absolute; z-index: -1; pointer-events: none; top: 0; left: 50%; width: 100cqw; height: 460px; transform: translateX(-50%);
  background: linear-gradient(color-mix(in srgb, var(--bp-neon) 8%, transparent), color-mix(in srgb, var(--bp-neon) 20%, transparent) 90px, transparent); }
.art-button { padding: 0; border-radius: 6px; flex: none; display: block; }
.art-button:hover .art { outline: 2px solid var(--bp-neon); outline-offset: 2px; }
.art { width: 190px; height: 190px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bp-panel); }
.art.empty { display: grid; place-items: center; color: var(--bp-faint); border: 1px solid var(--line); }
.art.empty .icon { width: 48px; height: 48px; stroke-width: 1.2; }
.kicker { color: var(--bp-muted-text); margin: 0 0 6px; }
.meta { color: var(--bp-muted-text); margin: 0 0 14px; display: flex; align-items: center; gap: 6px; }
.lead { font-size: 18px; }
.welcome h1 { font-size: 72px; margin-top: 10vh; }
.phone-gate { padding-inline: 24px; }
.phone-gate-pot { width: 72px; margin: 0 auto; }
.phone-gate-pot img { width: 72px; height: 72px; object-fit: contain; display: block; }
.phone-gate h1 { font-size: 34px; margin: 16px 0 12px; text-wrap: balance; }
.library-home .actions { margin: 4px 0 8px; }
.album-card-title.damaged { color: var(--bp-muted-text); font-style: italic; }
.album-card-title .badge { margin-left: 6px; }
.library-home .section-label { margin: 28px 0 12px; }
.lyrics { max-width: 88ch; font: 400 15px/1.7 var(--mono); white-space: pre-wrap; margin: 0 0 20px; }
.plain { list-style: none; padding: 0; font-family: var(--mono); }

/* Tracklist */
.tracks { width: 100%; border-collapse: collapse; }
.tracks th { text-align: left; font-weight: 500; color: var(--bp-muted-text); font-size: 13px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tracks td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tracks td.title > .link-row { min-height: 24px; } /* the computer's 24 px target floor */
.tracks tbody tr { cursor: pointer; }
.tracks tbody tr:hover { background: var(--hover); }
.tracks .num { color: var(--bp-muted-text); width: 1%; white-space: nowrap; }
/* Stage, BPM, key and checklist never wrap ("Idea" under its dot); the title takes the rest on one line and ends in "…"
   (full title on hover), as the apps' tracklists do, so the table always fits its column and never runs under the rail. */
.tracks th { white-space: nowrap; }
.tracks td:not(.title) { white-space: nowrap; width: 1%; }
.tracks .title { font-weight: 600; max-width: 0; width: 100%; }
.tracks td.title > .link-row { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-sub-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-sub { display: none; align-items: center; gap: 6px; margin-top: 2px; font-weight: 400; font-size: 13px; color: var(--bp-muted-text); }
.link-row { padding: 0; text-align: left; }

/* Album cards */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
/* Not ".card": that's the corkboard's note, which is positioned and sized from its own variables. */
.cards > li { min-width: 0; }
.album-card { display: grid; gap: 6px; width: 100%; text-align: left; padding: 0; }
.album-card img { display: block; }
.album-card img, .album-card .art { width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; object-fit: cover; }
.album-card-title { font-weight: 600; }
.album-card-meta { display: inline-flex; align-items: center; gap: 6px; }

/* Main column and rail (album and project pages) */
.page-columns { display: grid; gap: 8px 44px; }
@media (min-width: 1100px) { .page-columns { grid-template-columns: minmax(0, 1fr) 280px; } }
.page-main, .page-rail { min-width: 0; }
.page-rail > .stages > .section-label { margin-left: 0; }

/* Stages: one bar split by stage and a count for each (AlbumView.stages), and the picker on a song's header */
.stages .section-label { margin: 18px 0 10px; }
.stage-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--hover); }
.stage-bar > span { flex: 1 1 0; min-width: 2px; }
.stage-grid { display: grid; grid-template-rows: repeat(4, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px 18px; margin-top: 12px; font-size: 13px; }
.stage-count { display: flex; align-items: center; gap: 7px; }
.stage-count .num { margin-left: auto; font-family: var(--mono); color: var(--bp-muted-text); font-variant-numeric: tabular-nums; }
.stage-count.none .stage-name { color: var(--bp-muted-text); }
.meta-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stage-picker { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; margin-left: -8px; border-radius: 6px; color: var(--bp-text); }
.stage-picker:hover:not(:disabled), .stage-picker[aria-expanded="true"] { background: var(--hover); }
.stage-picker .chevron { display: inline-flex; color: var(--bp-muted-text); }
.stage-picker .chevron .icon { width: 12px; height: 12px; transform: rotate(90deg); }
.stage-picker:disabled { opacity: 1; cursor: default; }
.stage-picker:disabled .chevron { display: none; }
.menu-item .dot { margin-right: 4px; }
.menu-item .check { display: inline-flex; vertical-align: -3px; margin-left: 8px; color: var(--bp-neon); }
.menu-item .check .icon, .rec-tick .icon { width: 14px; height: 14px; }

/* Search: the box at the top of the sidebar and the results page (SearchResultsView) */
.search { display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: var(--radius); background: var(--hover); border: 1px solid transparent; }
.search:focus-within { border-color: var(--bp-neon); box-shadow: 0 0 0 1px var(--bp-neon); }
.search .icon { color: var(--bp-muted-text); width: 14px; height: 14px; }
.search-input { flex: 1; min-width: 0; padding: 7px 0; background: none; border: 0; color: var(--bp-text); font: 14px var(--sans); outline: none; }
.search-input::placeholder { color: var(--bp-muted-text); }
mark { background: color-mix(in srgb, var(--bp-neon) 30%, transparent); color: var(--bp-text); border-radius: 2px; padding: 0 1px; }

/* Notices */
/* A shared item's bar: one calm line under the top bar. */
.share-bar { display: flex; align-items: center; gap: 10px; margin: 0 40px 10px; padding: 6px 12px; font-size: 13px; color: var(--bp-muted-text);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bp-panel); }
.share-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.share-role { padding: 1px 8px; border-radius: 999px; font-size: 12px; color: var(--bp-neon); border: 1px solid color-mix(in srgb, var(--bp-neon) 45%, transparent); }
.share-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.share-back { color: var(--bp-neon); text-decoration: none; }
.share-back:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.share-bar.ended { border-color: color-mix(in srgb, var(--bp-recording-red) 60%, transparent); }
@media (max-width: 700px) { .share-bar { margin: 0 16px 10px; flex-wrap: wrap; } }
.notices { padding: 0 40px; display: grid; gap: 8px; }
.notice { margin: 0; padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-panel); }
.notice.warn { border-color: color-mix(in srgb, var(--bp-recording-red) 60%, transparent); }
.notice.info { color: color-mix(in srgb, var(--bp-text) 85%, var(--bp-muted-text)); }
.notice:empty { display: none; }
.notice.closable { display: flex; align-items: center; gap: 10px; }
.notice.closable > span { flex: 1; }
.notice-close { flex: none; padding: 2px; }

/* Account menu */
.account { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid var(--line); color: var(--bp-muted-text); }
.account .avatar { width: 30px; height: 30px; }
.account .icon { width: 18px; height: 18px; }
.account:hover, .account[aria-current="page"] { color: var(--bp-text); border-color: color-mix(in srgb, var(--bp-neon) 50%, transparent); }
.popover { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; padding: 16px; border-radius: 12px; background: var(--bp-panel); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45); }
.popover h3 { margin: 0 0 8px; font: 400 22px/1.1 var(--display); }
.popover p { margin: 0 0 10px; font-size: 14px; }

/* Dialogs */
dialog.sheet { background: var(--bp-panel); color: var(--bp-text); border: 1px solid var(--line); border-radius: 14px; padding: 20px; width: min(420px, 92vw); }
dialog.sheet::backdrop { background: rgb(0 0 0 / 0.55); }
/* A sheet never grows past the screen: it scrolls inside, so the phone's keyboard can't hide its buttons. */
dialog.sheet { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 560px) { dialog.sheet { width: calc(100vw - 32px); padding: 18px; scroll-padding-bottom: 24px; } }
dialog.sheet h2 { margin: 0 0 14px; font: 400 26px/1.1 var(--display); }
dialog.sheet input { width: 100%; padding: 9px 11px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); color: var(--bp-text); font: inherit; margin-bottom: 16px; }

/* Read-only tab, and dragging files in */
.read-only .main { opacity: 0.92; }
body.dropping::after { content: "Drop Bardpot zips or folders to import them"; position: fixed; inset: 12px; border: 2px dashed var(--bp-neon); border-radius: 16px;
  display: grid; place-items: center; font: 400 28px var(--display); color: var(--bp-neon); background: color-mix(in srgb, var(--bp-background) 85%, transparent); pointer-events: none; z-index: 10; }

/* Menus ("⋯" and right-click) */
.menu { position: fixed; z-index: 20; list-style: none; margin: 0; padding: 5px; min-width: 210px; max-width: 320px; max-height: 70vh; overflow: auto;
  background: var(--bp-panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgb(0 0 0 / 0.5); font-size: 14px; }
.menu-item { padding: 6px 10px; border-radius: 6px; cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; }
.menu-item:focus { background: var(--selected); }
.menu-item.danger { color: var(--bp-recording-red); }
.menu-item[aria-disabled] { color: var(--bp-faint); }
.menu-item.has-submenu { display: flex; justify-content: space-between; gap: 16px; }
.menu-item.has-submenu::after { content: "›"; color: var(--bp-muted-text); }
.menu-heading { padding: 7px 10px 3px; font-size: 12px; font-weight: 700; color: var(--bp-muted-text); }
.menu-separator { border-top: 1px solid var(--line); margin: 5px 4px; }
.menu-button { width: 26px; height: 26px; border-radius: 50%; color: var(--bp-muted-text); line-height: 1; font-size: 16px; flex: none; }
.menu-button:hover:not(:disabled), .menu-button[aria-expanded="true"] { background: var(--hover); color: var(--bp-text); }
.page-header .menu-button { width: var(--control-h); height: var(--control-h); background: var(--fill); color: var(--bp-text); border-radius: 50%; } /* the circle beside the capsules */
.page-header .menu-button:hover:not(:disabled), .page-header .menu-button[aria-expanded="true"] { background: var(--fill-hover); }
.tree li.has-menu { position: relative; }
.tree li.has-menu .row-button { padding-right: 32px; }
.tree li.has-menu > .menu-button { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); opacity: 0; }
.tree li.has-menu:hover > .menu-button, .tree li.has-menu:focus-within > .menu-button, .tree li.has-menu > .selected + .menu-button { opacity: 1; }
.tracks .row-menu { width: 1%; padding: 4px 6px; }
.tracks .row-menu .menu-button { opacity: 0; }
.tracks tr:hover .menu-button, .tracks tr:focus-within .menu-button, .tracks .row-menu .menu-button[aria-expanded="true"],
.tree li.has-menu > .menu-button[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .tree li.has-menu > .menu-button, .tracks .row-menu .menu-button { opacity: 1; } }

/* Dragging songs to reorder or move them */
.tracks tr.drop-before td { box-shadow: inset 0 2px 0 var(--bp-neon); }
.tracks tr.drop-after td { box-shadow: inset 0 -2px 0 var(--bp-neon); }
.tree li.drop-into > .row-button { background: var(--selected); outline: 1px dashed var(--bp-neon); }

/* Renaming in place */
.page h1.editable { cursor: text; border-radius: 6px; }
.page h1.editable:hover { background: var(--hover); }
.title-input { font: 400 clamp(36px, 5vw, 56px)/1.05 var(--display); letter-spacing: 0.01em; color: var(--bp-text); background: var(--bp-background);
  border: 1px solid color-mix(in srgb, var(--bp-neon) 60%, transparent); border-radius: 6px; padding: 0 6px; margin: 0 0 8px; width: 100%; }

/* Things that can't be undone */
button.danger { background: var(--bp-recording-red); color: var(--bp-background); }
.danger-text { color: var(--bp-recording-red); }

/* Recently Deleted */
/* ‹ Profile, ‹ Calendar: the way back as green text (the accent a person picked), as on the apps and the phone pages, not a grey pill. */
.back-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px; margin-left: -4px; color: var(--bp-neon); font-size: 14px; border-radius: 6px; }
.back-link:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.deleted-back { margin-bottom: 12px; } /* clear of the title */
.deleted-restored { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.deleted-restored .link { min-height: 28px; padding: 0 2px; }
.deleted-list { list-style: none; padding: 0; margin: 20px 0 0; }
.removed-cloud { margin-top: 40px; }
.removed-cloud h2 { margin: 0 0 4px; }
.removed-cloud .deleted-list { margin-top: 12px; }
.deleted-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.deleted-text { display: grid; gap: 2px; margin-right: auto; min-width: 0; }
.deleted-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Narrow windows: the sidebar goes on top. (Phase 7 does phones properly.) */
@media (max-width: 760px) {
  .window { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; height: auto; min-height: 100vh; }
  .top-bar { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 8px 12px; }
  .top-pill { padding: 0 10px; }
  .top-bar .search { order: 5; flex-basis: 100%; max-width: none; margin: 0; }
  .top-bar .account { margin-left: auto; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 8px; max-height: 40vh; }
  /* Searching: just the results (on the page below). */
  .window:has(.search-input:not(:placeholder-shown)) .sidebar { display: none; }
  .tracks .col-stage, .tracks .col-bpm, .tracks .col-key { display: none; }
  .tracks .track-sub { display: flex; }
  .page-header .art { width: 120px; height: 120px; }
  .page { padding: 16px 16px 40px; }
  .notices { padding: 0 16px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .deleted-row { flex-wrap: wrap; }
}

/* A song's details line and sections */
.song-details { gap: 14px; }
.song-detail { display: inline-flex; align-items: center; gap: 6px; }
.detail-name { color: var(--bp-muted-text); font-size: 13px; }
.song-field, .field-signature { font: 400 14px var(--mono); color: var(--bp-text); background: var(--bp-panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 7px; }
.song-field:focus, .field-signature:focus { outline: none; border-color: var(--bp-neon); }
.field-bpm { width: 5ch; text-align: center; }
.field-key { width: calc(8ch + 16px); }
@supports (field-sizing: content) { .field-key { width: auto; field-sizing: content; min-width: 6ch; max-width: 18ch; } }
.song-field:disabled, .field-signature:disabled { opacity: 1; color: var(--bp-muted-text); background: transparent; }
.capo { gap: 8px; }

.song-sections, .song-rail { min-width: 0; display: grid; gap: 22px; align-content: start; }
.section-frame { display: grid; gap: 10px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.section-head > .section-buttons { margin-left: auto; }
.section-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; text-align: left; color: var(--bp-text); }
.section-toggle h2 { font: 700 17px/1.2 var(--sans); margin: 0; }
/* A drawn chevron (the ▸ glyph is a speck in some fonts): down when open, right when folded. */
.section-arrow { width: 7px; height: 7px; margin: 0 3px 3px 2px; font-size: 0; border-right: 1.75px solid var(--bp-muted-text);
  border-bottom: 1.75px solid var(--bp-muted-text); transform: rotate(45deg); transition: transform var(--motion-quick); flex: none; }
.section-frame.collapsed .section-arrow { transform: rotate(-45deg); margin-bottom: 0; }
.section-buttons { display: inline-flex; align-items: center; gap: 6px; }
.section-body:empty { display: none; }
.row.wrap { flex-wrap: wrap; }
/* The checklist and chord shapes move to a 340 px rail beside the other sections when the main area is 1150 px wide (the
   Mac's PageColumns). Narrower, they follow the other sections. */
.main { container: main / inline-size; }
@container main (min-width: 1150px) {
}

/* Writing: text sections (Courier Prime, the Mac's Theme.lyric) grow with their text; checklists; History. */
/* Text is capped at about 88 characters a line (Jack, 2026-10-24: "limit"): the whole section, so its buttons line up
   with the box (88ch of 15px Courier Prime + padding). Parts, tabs and sheets keep the full column. */
.section-frame:has(> .text-section) { max-width: 822px; }
.text-section { display: grid; gap: 8px; }
.text-editor { width: 100%; min-height: 7.5em; field-sizing: content; resize: none; overflow: hidden; padding: 12px 14px;
  font: 400 15px/1.7 var(--mono); color: var(--bp-text); background: var(--bp-panel); border: 1px solid var(--line); border-radius: var(--radius); }
.text-editor:focus { outline: none; border-color: color-mix(in srgb, var(--accent, var(--bp-neon)) 70%, transparent); }
.text-editor:disabled { color: var(--bp-muted-text); background: transparent; }
.text-editor[readonly] { background: transparent; }
.load-failed { font: 400 12px/1.5 var(--mono); color: var(--bp-muted-text); }
.load-failed button { color: var(--accent, var(--bp-neon)); padding: 0 4px; }
.history-button { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--bp-muted-text); }
.history-button:hover { background: var(--hover); color: var(--bp-text); }
.history-dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, var(--bp-neon)); }
.checklist { display: grid; gap: 2px; }
.checklist-progress { font-size: 13px; font-variant-numeric: tabular-nums; }
.checklist-items { list-style: none; margin: 0; padding: 0; }
.checklist-row, .checklist-new { display: grid; grid-template-columns: 18px minmax(0, 1fr) 26px; align-items: center; gap: 10px; padding: 3px 0; }
.checklist-new { grid-template-columns: 18px minmax(0, 1fr); color: var(--bp-muted-text); }
.checklist-new .icon { justify-self: center; width: 13px; }
.checklist-row .check { width: 16px; height: 16px; border: 1.5px solid var(--bp-faint); border-radius: 4px; justify-self: center; position: relative; }
/* The box looks 16 px but takes taps 26 px wide (WCAG 2.5.8 asks for 24; friction audit #12). */
.checklist-row .check::before { content: ""; position: absolute; inset: -6px; }
.checklist-row.done .check { border-color: var(--accent, var(--bp-neon)); background: var(--accent, var(--bp-neon));
  box-shadow: inset 0 0 0 2.5px var(--bp-background); }
.checklist-text, .checklist-add { width: 100%; font: inherit; color: var(--bp-text); background: transparent; border: 0; border-bottom: 1px solid transparent; padding: 3px 0; }
.text-editor::placeholder, .checklist-add::placeholder { color: var(--bp-muted-text); }
.checklist-text:focus, .checklist-add:focus { outline: none; border-bottom-color: color-mix(in srgb, var(--accent, var(--bp-neon)) 60%, transparent); }
.checklist-row.done .checklist-text { color: var(--bp-muted-text); text-decoration: line-through; }
.checklist-row.colored .check { border-color: var(--item-color); background: color-mix(in srgb, var(--item-color) 22%, transparent); }
.checklist-row.colored.done .check { border-color: var(--item-color); background: var(--item-color); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--item-color); vertical-align: baseline; }
.checklist-row .menu-button { opacity: 0; }
.checklist-row:hover .menu-button, .checklist-row:focus-within .menu-button, .checklist-row .menu-button[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .checklist-row .menu-button { opacity: 1; } }
.page-rail { display: grid; gap: 22px; align-content: start; }
.page-rail > .section-frame { margin-top: 18px; }
/* The practice log: minutes beside their label, the log below, each with its remove button at the row's end. */
.practice-form { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
dialog.sheet .practice-filled { margin: -8px 0 14px; }
dialog.sheet .practice-form input { width: 76px; height: 36px; padding: 0 10px; }
.practice-log { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.practice-log li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.practice-log li > span { flex: none; }
.practice-log .practice-remove { margin-left: auto; flex: none; }
/* The take an entry is heard in: its name in green, played from the log; long names shorten rather than wrap. */
.practice-log .practice-take-link { min-width: 0; color: var(--bp-neon); display: inline-flex; align-items: center; gap: 4px; }
.practice-take-link svg { flex: none; }
.practice-take-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-form select.practice-take { min-width: 0; max-width: 220px; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); color: var(--bp-text); font: inherit; font-size: 14px; text-overflow: ellipsis; }
.setlist-warn { color: var(--bp-text); }

/* A request in the bell: its answer on a line of its own under the words. */

/* What changed on a shared song: one line and its buttons, the lines below like track changes. */
.what-changed { margin: 0 0 16px; }
.what-changed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.what-changed-head .spacer { flex: 1; }
.what-changed-lines { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; font: 14px/1.5 var(--mono, monospace); }
.what-changed-lines .added::before { content: "+ "; color: var(--bp-neon); }
.what-changed-lines .removed { color: var(--bp-muted-text); text-decoration: line-through; }
.what-changed-lines .removed::before { content: "− "; display: inline-block; }

/* The first-run tour: one card at a time, the buttons staying put from card to card. */
dialog.sheet.tour { width: min(440px, calc(100vw - 32px)); padding: 24px; }
.tour-step { margin: 0 0 10px; font-size: 13px; color: var(--bp-muted-text); font-variant-numeric: tabular-nums; }
dialog.sheet.tour h2 { margin-bottom: 10px; }
.tour-body { margin: 0; min-height: 4.8em; line-height: 1.6; text-wrap: pretty; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.tour-foot .spacer { flex: 1; }
dialog.sheet.history-dialog { width: min(760px, calc(100vw - 32px)); }
/* Bars & Beats (ui/beats-sheet.js): the take's waveform with its beats, bar lines and the bar 1 marker, scrolling sideways. */
dialog.sheet.beats-dialog { width: min(900px, calc(100vw - 32px)); padding: 22px 24px; }
.beats-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.beats-head h2 { margin: 0; }
.beats-take { margin: 4px 0 0; font-family: var(--mono); }
.beats-status { margin: 0 0 10px; font: 13px/1.4 var(--mono); color: var(--bp-muted-text); }
.beats-scroll { overflow-x: auto; overflow-y: hidden; border-radius: 10px; background: color-mix(in srgb, var(--bp-background) 70%, transparent);
  border: 1px solid var(--line); padding-top: 4px; }
.beats-strip { position: relative; height: 140px; }
.beats-canvas { display: block; height: 140px; cursor: pointer; }
.beats-bar-one { position: absolute; top: 2px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; padding: 0;
  background: var(--bp-neon); color: var(--on-neon); font: 700 12px/24px var(--mono); text-align: center; cursor: grab; touch-action: none; }
.beats-bar-one.dragging { cursor: grabbing; box-shadow: 0 0 0 2px var(--bp-text); }
.beats-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--bp-text); pointer-events: none; }
.beats-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.beats-group { display: flex; gap: 6px; }
.beats-spacer { flex: 1; }
.beats-button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--hover); font-size: 14px; }
.beats-button .icon { width: 15px; height: 15px; }
.beats-button[disabled] { opacity: 0.45; }
.beats-zoom { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--bp-muted-text); }
.beats-zoom input[type=range] { width: min(260px, 50vw); margin: 0; padding: 0; border: 0; accent-color: var(--bp-neon); }
.beats-zoom .icon { width: 15px; height: 15px; }
.beats-ask { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--hover); }
.beats-ask p { margin: 0 0 10px; }
.beats-empty { display: grid; place-items: center; gap: 12px; min-height: 160px; color: var(--bp-muted-text); font-family: var(--mono); }
.beats-finding { animation: player-pulse var(--motion-tick) ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .beats-finding { animation: none; } }
.history-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; min-height: 0; }
.history-list { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto; border-right: 1px solid var(--line); }
.history-row { display: grid; gap: 2px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; }
.history-row:hover { background: var(--hover); }
.history-row[aria-pressed="true"] { background: var(--selected); }
.history-when { font-weight: 600; }
.history-same { color: var(--bp-recording-red); margin-left: 6px; }
.history-preview { display: grid; gap: 10px; align-content: start; min-width: 0; }
.history-preview pre { margin: 0; padding: 12px 14px; max-height: 44vh; overflow: auto; white-space: pre-wrap; font: 400 14px/1.6 var(--mono);
  background: var(--bp-background); border-radius: var(--radius); }
.history-actions { justify-content: space-between; }
.history-actions p { margin: 0; }
@media (max-width: 700px) {
  .history-body { grid-template-columns: minmax(0, 1fr); }
  .history-list { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Chord Shapes (chord-shapes.js): a grid of diagrams (chord-diagram.js), the Chord Builder and the tuning popover. Dots,
   open strings and the capo take the page's accent (--bp-neon), as the Mac's pageAccent. */
.chord-shapes { display: grid; gap: 12px; }

/* Tabs (ui/tabs/): the part buttons, the caption and the staff, drawn as SVG on the editor's panel like the Mac's. */
.tabs-body { display: grid; gap: 10px; min-width: 0; }
.tab-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-part { padding: 5px 12px; font: 400 13px/1.2 var(--mono); color: var(--bp-text); background: transparent;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.tab-part:hover { background: var(--hover); }
.tab-part.on { color: var(--accent, var(--bp-neon)); border-color: color-mix(in srgb, var(--accent, var(--bp-neon)) 60%, transparent); }
.tab-parts { column-gap: 14px; }
.tab-part-group { display: inline-flex; align-items: center; gap: 4px; }
.tab-part-group.silent .tab-part { opacity: 0.55; }
.tab-mix { width: 26px; height: 26px; padding: 0; font: 700 12px/1 var(--mono); color: var(--bp-muted-text); background: transparent;
  border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.tab-mix:hover { background: var(--hover); }
.tab-mix.on { color: var(--on-neon); background: var(--accent, var(--bp-neon)); border-color: var(--accent, var(--bp-neon)); }
.tab-caption { margin: 0; font: 400 12px/1.4 var(--mono); color: var(--bp-muted-text); }
.tab-hint { margin: 0; font-family: var(--mono); }
.tab-editor { padding: 10px 10px 0; background: var(--bp-panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: text; min-height: 120px; }
.tab-editor.read-only { cursor: default; }
.tab-keys-note { display: none; margin: 4px 0 8px; font-family: var(--mono); }
.tab-editor:focus .tab-keys-note, .tab-editor:focus-within .tab-keys-note { display: block; }
.tab-editor:focus { outline: none; }
.tab-editor:focus-visible, .tab-editor:focus { border-color: color-mix(in srgb, var(--accent, var(--bp-neon)) 45%, transparent); }
.tab-staff { display: block; user-select: none; }
.tab-staff text { font-family: var(--mono); fill: var(--bp-text); }
.tab-staff .tab-name { font-size: 10px; font-weight: 700; fill: var(--bp-muted-text); }
.tab-staff .tab-number { font-size: 9px; fill: var(--bp-muted-text); }
.tab-staff .tab-fret { font-size: 12px; font-weight: 700; }
.tab-staff .tab-fret.tied, .tab-staff .soft { fill: var(--bp-muted-text); }
.tab-staff .tab-small { font-size: 9px; font-weight: 700; }
.tab-staff .tab-tiny { font-size: 8px; font-weight: 700; }
.tab-staff .tab-chord { font-size: 11px; font-weight: 700; fill: var(--accent, var(--bp-neon)); }
.tab-line { stroke: color-mix(in srgb, var(--bp-muted-text) 45%, transparent); stroke-width: 1; }
.tab-bar { stroke: color-mix(in srgb, var(--bp-text) 70%, transparent); stroke-width: 1.2; }
.tab-knock { fill: var(--bp-panel); }
.tab-short-note { margin: 6px 0 0; }
.tab-short { fill: color-mix(in srgb, var(--bp-recording-red) 13%, transparent); }
.tab-sel { fill: color-mix(in srgb, var(--accent, var(--bp-neon)) 14%, transparent); }
.tab-play { fill: color-mix(in srgb, var(--accent, var(--bp-neon)) 28%, transparent); }
.tab-cursor { fill: none; stroke: var(--accent, var(--bp-neon)); stroke-width: 1.6; }
.tab-ink { fill: none; stroke: color-mix(in srgb, var(--bp-text) 85%, transparent); stroke-width: 1.2; }
.tab-ink-fill { fill: color-mix(in srgb, var(--bp-text) 85%, transparent); }
.tab-ink-fill.strong { fill: var(--bp-text); }
.tab-flag { fill: none; stroke: color-mix(in srgb, var(--bp-text) 85%, transparent); stroke-width: 1.6; }
.tab-rest { fill: none; stroke: color-mix(in srgb, var(--bp-text) 85%, transparent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-soft-line { fill: none; stroke: var(--bp-muted-text); stroke-width: 1.1; }
.tab-slide { stroke: color-mix(in srgb, var(--bp-text) 80%, transparent); stroke-width: 1.3; }
.tab-dash { fill: none; stroke: var(--bp-muted-text); stroke-width: 1; stroke-dasharray: 3 3; }
.tab-section-box { fill: none; stroke: color-mix(in srgb, var(--bp-text) 80%, transparent); stroke-width: 1; }
.section-buttons .quiet.small.on { color: var(--accent, var(--bp-neon)); }
.tab-speed { margin-left: 4px; font: 400 12px/1 var(--mono); }
.section-head:has(.tuning-button) .section-toggle h2 { white-space: nowrap; }
.chord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 14px 12px; align-items: start; }
.chord-cell { display: grid; justify-items: center; padding: 4px 0; border-radius: 8px; }
.chord-cell:hover:not(:disabled) { background: var(--hover); }
.chord-cell:disabled { opacity: 1; cursor: default; }
.chord-plot { display: grid; gap: 8px; justify-items: center; align-content: center; width: 76px; min-height: 106px; padding: 6px;
  background: var(--bp-panel); border-radius: 6px; font-family: var(--mono); text-align: center; }
.chord-cell-name { font-weight: 700; font-size: 14px; color: var(--bp-text); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.plot-it { font-size: 12px; color: var(--bp-neon); }
.chord-misfit { font-size: 10px; color: var(--bp-muted-text); }
.chord-diagram text { font-family: var(--mono); }
.chord-diagram .chord-name { font-size: 14px; font-weight: 700; fill: var(--bp-text); }
.chord-diagram .chord-caption, .chord-diagram .chord-mute { font-size: 10px; fill: var(--bp-muted-text); }
.chord-diagram .chord-open { font-size: 10px; fill: var(--bp-text); }
.chord-diagram .chord-first-fret { font-size: 11px; font-weight: 700; fill: var(--bp-text); }
.chord-diagram .chord-capo:not([fill]), .chord-diagram .chord-dot:not([fill]) { fill: var(--bp-neon); }
.chord-diagram line { stroke: var(--bp-muted-text); stroke-width: 1; }
.chord-diagram .chord-nut { stroke: var(--bp-text); stroke-width: 3; }
.chord-new { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--bp-muted-text); }
.chord-new .icon { width: 13px; }
.chord-new .chord-add { min-width: 15ch; }
/* Narrow: the button goes under the box, so the box's hint isn't cut off. */
@media (max-width: 560px) { .chord-new { grid-template-columns: 14px minmax(0, 1fr); } .chord-open-builder { grid-column: 2; justify-self: start; } }
.chord-add { width: 100%; font: 400 15px var(--mono); color: var(--bp-text); background: transparent; border: 0; border-bottom: 1px solid transparent; padding: 4px 0; }
.chord-add:focus { outline: none; border-bottom-color: color-mix(in srgb, var(--accent, var(--bp-neon)) 60%, transparent); }
.tuning-button { padding: 4px 9px; font-size: 12px; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.tuning-popover { position: fixed; z-index: 30; display: grid; gap: 12px; padding: 16px; background: var(--bp-panel); color: var(--bp-text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgb(0 0 0 / 0.5); }
.tuning-preset, .tuning-custom, .builder-name { font: 400 14px var(--mono); color: var(--bp-text); background: var(--bp-background);
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.tuning-preset:focus, .tuning-custom:focus, .builder-name:focus { outline: none; border-color: var(--bp-neon); }
.tuning-hint { margin: 0; font-size: 12px; color: var(--bp-recording-red); }
.tuning-hint:empty { display: none; }
.tuning-popover { gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; grid-template-columns: minmax(0, 1fr); }
.tuning-popover > * { min-width: 0; }
.tuning-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--bp-muted-text); }
.tuning-preset { padding: 9px 10px; font-size: 14px; width: 100%; }
.capo-stepper, .tuning-count { display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-variant-numeric: tabular-nums; }
.capo-stepper { padding-top: 12px; border-top: 1px solid var(--line); }
.capo-buttons { display: inline-flex; gap: 4px; }
.capo-minus, .capo-plus, .strings-minus, .strings-plus { width: 36px; height: 30px; border-radius: 8px; background: var(--hover); }
.tuning-editor { display: grid; gap: 12px; }
.tuning-editor[hidden] { display: none; }
.tuning-strings { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.tuning-strings[data-count="8"], .tuning-strings[data-count="9"], .tuning-strings[data-count="10"] { gap: 3px; }
.tuning-string { display: grid; justify-items: stretch; gap: 2px; text-align: center; }
.tuning-string-number { font-size: 11px; color: var(--bp-muted-text); }
.tuning-up, .tuning-down { height: 28px; border-radius: 6px; font-size: 10px; color: var(--bp-muted-text); }
.tuning-up:hover, .tuning-down:hover { background: var(--hover); color: var(--bp-text); }
.tuning-note { padding: 7px 0; border-radius: 6px; background: var(--hover); font: 700 14px var(--mono); white-space: nowrap; }
.tuning-strings[data-count="8"] .tuning-note, .tuning-strings[data-count="9"] .tuning-note,
.tuning-strings[data-count="10"] .tuning-note { font-size: 11px; }
.tuning-note.changed { color: var(--bp-neon); }
.tuning-help { margin: 0; font-size: 12px; color: var(--bp-muted-text); }
.tuning-actions { display: flex; justify-content: space-between; align-items: center; }
.tuning-reset { padding: 6px 10px; border-radius: 6px; color: var(--bp-muted-text); }
dialog.sheet.chord-builder { width: min(780px, calc(100vw - 32px)); display: grid; gap: 18px; }
dialog.sheet.chord-builder:not([open]) { display: none; }
.chord-builder h2 { font: 400 28px var(--display); margin: 0; }
.fretboard { display: grid; padding: 12px; background: var(--bp-background); border-radius: 8px; overflow-x: auto; }
.fret-row { display: grid; grid-template-columns: 26px 40px auto repeat(15, 40px); align-items: center; height: 28px; }
.fret-row.markers { height: 18px; }
.fret-note, .fret-marker, .fret-capo-label { font: 400 12px var(--mono); color: var(--bp-muted-text); text-align: center; }
.fret-note { text-align: right; padding-right: 4px; }
.fret-capo-label { font-size: 10px; font-weight: 700; color: var(--bp-neon); white-space: nowrap; }
.nut-cell { height: 28px; font: 700 15px var(--mono); color: var(--bp-muted-text); }
.nut-cell.open { color: var(--bp-neon); }
.fret-nut { width: 4px; height: 28px; background: var(--bp-text); }
.fret-nut.capo { width: 10px; background: var(--bp-neon); }
.fret-cell { position: relative; height: 28px; display: grid; place-items: center;
  background: linear-gradient(var(--bp-muted-text), var(--bp-muted-text)) center / 100% 1px no-repeat;
  border-right: 1px solid color-mix(in srgb, var(--bp-muted-text) 35%, transparent); }
.fret-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--bp-neon); }
.builder-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; font: 400 14px var(--mono); }
.builder-label { font: 600 13px var(--sans); color: var(--bp-muted-text); }
.builder-names { display: flex; flex-wrap: wrap; gap: 8px; }
.builder-candidate { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--hover); }
.builder-candidate.best { font-weight: 700; }
.builder-actions { align-items: center; gap: 12px; }
.builder-actions .builder-name { width: 220px; }
.builder-actions .spacer { flex: 1; }
.builder-actions .builder-play, .builder-actions .builder-name { min-height: 42px; box-sizing: border-box; }
.builder-play svg { width: 16px; height: 16px; flex: none; }
.builder-play:disabled { opacity: 0.45; cursor: default; }
/* Phones: Play chord and the name each get a row, then Cancel and Save share the last one. */
@media (max-width: 560px) {
  .builder-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .builder-play, .builder-actions .builder-name { grid-column: 1 / -1; width: auto; justify-content: center; }
  .builder-actions .spacer { display: none; }
}

/* Find Key, the key strip and the marker view */
.find-key-popover { position: fixed; z-index: 30; display: grid; gap: 8px; padding: 18px; background: var(--bp-panel); color: var(--bp-text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgb(0 0 0 / 0.5); font: 400 13px var(--mono); }
.find-key-popover p { margin: 0; }
.find-key-head, .find-key-note, .find-key-fine { color: var(--bp-muted-text); }
.find-key-fine { font-size: 12px; }
.find-key-name { font: 400 30px var(--display); }
.find-key-button { padding: 3px 8px; font-size: 12px; }
.key-strip { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 6px 2px 10px; font: 400 13px var(--mono); }
.key-icon { color: var(--accent, var(--bp-neon)); }
.key-hint, .key-details { color: var(--bp-muted-text); font-size: 12px; }
.key-hint { flex: 1 1 14em; min-width: 0; }
.key-markers { margin-left: auto; padding: 2px 8px; font-size: 12px; }
.chord-markup { padding: 12px; background: var(--bp-panel); border-radius: 8px; font: 400 15px var(--mono); }
.markup-line { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.markup-mark { text-align: right; color: var(--accent, var(--bp-neon)); font-size: 11px; }
.markup-text { white-space: pre-wrap; user-select: text; }
.outside-chord { background: color-mix(in srgb, var(--accent, var(--bp-neon)) 28%, transparent); border-radius: 3px; }
@media (max-width: 560px) { .markup-line { grid-template-columns: 78px minmax(0, 1fr); } }

/* The corkboard (ui/corkboard.js): cards at the kit's frames (--x/--y/--w/--h) on a board that scrolls both ways under
   the header and zooms with transform: scale. A folded card is only its header, with no resize handles. */
.board-toolbar { margin: 4px 0 12px; }
.board-scroll { overflow: auto; max-height: calc(100vh - 120px); min-height: 360px; border-radius: 12px;
  background: color-mix(in srgb, var(--bp-text) 2%, transparent); overscroll-behavior: contain; }
.board-sizer { position: relative; }
.board { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.card { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); display: flex; flex-direction: column;
  background: var(--bp-panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 6px rgb(0 0 0 / 0.25); }
.card.live { z-index: 1; border-color: color-mix(in srgb, var(--accent, var(--bp-neon)) 70%, transparent); box-shadow: 0 3px 14px rgb(0 0 0 / 0.5); }
.card-bar { flex: none; height: 16px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.card.live .card-bar { cursor: grabbing; }
.card-bar[aria-disabled="true"] { cursor: default; }
.card-grip { width: 28px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--bp-faint) 70%, transparent); }
.card-body { flex: 1; min-height: 0; overflow: auto; padding: 0 14px 12px; border-radius: 0 0 12px 12px; display: flex; flex-direction: column; }
/* Text editors fill their card (the Mac's fillsCard); longer text scrolls the card. */
.card-body > .section-frame:not(.collapsed) { flex: 1 0 auto; grid-template-rows: auto 1fr; }
.card .text-section { display: flex; flex-direction: column; }
.card .text-section > .text-editor { flex: 1 0 auto; }
.card-handle { position: absolute; touch-action: none; }
.card-handle.leading { left: -6px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.card-handle.trailing { right: -6px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.card-handle.bottom { left: 0; right: 0; bottom: -6px; height: 8px; cursor: ns-resize; }
.card-handle.bottomLeading { left: -6px; bottom: -6px; width: 16px; height: 16px; cursor: nesw-resize; }
.card-handle.bottomTrailing { right: -6px; bottom: -6px; width: 16px; height: 16px; cursor: nwse-resize; }
.card:has(> .card-body > .section-frame.collapsed) { height: auto; }
.card:has(> .card-body > .section-frame.collapsed) .card-handle { display: none; }

/* Lyric sheets (ui/lyric-sheet.js) are drawn into #print-sheet for printing only; print.css shows them on paper. */
@media screen { #print-sheet { display: none; } }
dialog.sheet.lyric-sheet-ready .lyric-sheet-name { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; font: 13px var(--mono); overflow-wrap: anywhere; }
dialog.sheet.lyric-sheet-ready .muted { margin: 0 0 16px; }

/* Sign-in flow (cloud preview only) */
/* Centred in the window: .page.narrow pins other narrow pages to the left, so this needs the same specificity. */
.page.signin { margin-inline: auto; max-width: 520px; padding-top: 14vh; text-align: center; }
.signin-logo { width: 96px; margin: 0 auto 8px; }
.signin-logo img { width: 96px; height: 96px; display: block; }
.signin-title { font-family: var(--display); }
.signin-lead { font-size: 18px; }
.signin-buttons { display: flex; flex-direction: column; gap: 10px; align-items: center; margin: 20px 0; }
.signin-buttons button { min-width: 240px; justify-content: center; }
.signin-choices { display: flex; flex-direction: column; gap: 18px; align-items: center; margin: 20px 0; }
.signin .small { font-size: 13px; }
.signin-age { max-width: 360px; margin: 0 auto; text-align: left; }
.signin-age h1 { margin: 0 0 14px; }
.signin-age-lead { margin: 0 0 22px; }
.signin-birth { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 22px; }
.signin-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.signin-field label, .signin-where legend { font: 700 13px/1 var(--sans); color: var(--bp-muted-text); letter-spacing: 0.02em; }
.signin-field select, .signin-field input { width: 100%; box-sizing: border-box; padding: 10px 11px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-panel); color: var(--bp-text); font: inherit; }
.signin-where { border: 0; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.signin-where legend { padding: 0; margin-bottom: 10px; }
.signin-radio { display: flex; gap: 10px; align-items: center; }
.signin-radio input { accent-color: var(--bp-neon); margin: 0; }
.signin-where .small { margin: 2px 0 0; }
.signin-continue { width: 100%; justify-content: center; margin-top: 24px; padding: 11px 14px; }
.signin-fineprint { margin: 14px 0 0; text-align: center; }
.signin-error { color: var(--bp-recording-red); margin: 16px 0 0; }
.signin-progress { font-family: var(--mono); font-size: 18px; }

/* Account settings and the avatar (ui/cloud/); the Profile page is ui/profile/profile.css */
.avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: color-mix(in srgb, var(--bp-neon) 25%, var(--bp-panel)); color: var(--bp-text); font-weight: 700; font-size: 14px; }
.settings-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.settings-fields p { margin: 0; }
.settings-plan { margin: 0 0 6px; color: var(--bp-neon); font-weight: 700; }
.space-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.space-fill { height: 100%; background: var(--bp-neon); }
.space-meter.nearly .space-fill { background: var(--bp-text); }
.space-meter.full .space-fill { background: var(--bp-recording-red); }
.space-words { margin: 6px 0 0; font-size: 13px; color: var(--bp-muted-text); }
.settings-section { display: grid; gap: 10px; margin: 0 0 28px; }
.settings-section h2 { margin: 0; }
.settings-profile .avatar { width: 56px; height: 56px; font-size: 24px; }
.settings-fields { display: grid; gap: 4px; flex: 1; }
.settings-photo { display: grid; gap: 4px; }
.waiting-list, .device-list { display: grid; gap: 6px; }
.waiting-row, .device-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bp-panel); }
.waiting-row span:first-child, .device-name { flex: 1; }
.waiting-badge, .device-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--bp-muted-text); }
.waiting-note { font-size: 13px; color: var(--bp-muted-text); }
.email-list { display: grid; gap: 6px; }
.email-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bp-panel); }
.email-address { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.email-actions { display: flex; gap: 6px; }
.email-chooser { display: grid; gap: 8px; justify-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.email-chooser p { margin: 0; }
.email-add { justify-self: start; }
.menu-sync { margin: 6px 0 0; }
.delete-dialog { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bp-panel); }
.delete-dialog h3 { margin: 0; }
.delete-project { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.delete-project legend { padding: 0; margin-bottom: 6px; }
.delete-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.delete-banner { padding-top: 8px; }

.admin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.admin-form label { display: grid; gap: 4px; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.admin-row .admin-email { font-family: var(--mono); }

.preview-panel { position: fixed; left: 12px; bottom: 12px; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: calc(100vw - 24px); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bp-panel); }
.preview-panel [hidden] { display: none; }

/* Takes: a row is star, play, name, waveform, details and ⋯; on a narrow window the waveform and details take their own lines. */
.takes { display: grid; gap: 8px; }
.takes-empty { margin: 0; font: 400 13px/1.5 var(--mono); }
.take-row { display: grid; grid-template-columns: 28px 28px minmax(100px, 170px) minmax(120px, 1fr) minmax(0, auto) 28px; align-items: center; gap: 12px;
  padding: 6px 10px; border-radius: var(--radius); background: var(--hover); min-width: 0; }
.take-row.playing { background: color-mix(in srgb, var(--accent, var(--bp-neon)) 10%, transparent); }
.take-row.part { margin-left: 24px; }
.take-star, .take-play { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--bp-muted-text); }
.take-play { color: var(--accent, var(--bp-neon)); }
.take-star:hover:not(:disabled), .take-play:hover:not(:disabled) { background: var(--hover); }
.take-star .icon, .take-play .icon { width: 15px; height: 15px; }
.take-play .icon { fill: currentColor; stroke-width: 1; }
.take-star.on { color: var(--accent, var(--bp-neon)); }
.take-star.on .icon { fill: currentColor; }
.take-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.take-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; padding: 1px 4px; margin-left: -4px; border-radius: 4px; cursor: text; }
.take-title:hover { background: var(--hover); }
.take-title-input { font: inherit; font-weight: 500; color: var(--bp-text); background: var(--bp-background); border: 1px solid var(--bp-neon); border-radius: 4px; padding: 1px 4px; min-width: 0; width: 100%; margin: 0; }
.take-current { flex: none; font-size: 11px; font-weight: 600; color: var(--on-neon); background: var(--accent, var(--bp-neon)); border-radius: 999px; padding: 1px 8px; }
.take-chords { flex: none; font-size: 11px; font-weight: 600; color: var(--accent, var(--bp-neon)); border: 1px solid var(--accent, var(--bp-neon)); border-radius: 999px; padding: 0 7px; }
.take-waiting { flex: none; white-space: nowrap; font-size: 11px; padding: 1px 8px; }
.take-wave { min-width: 0; }
.wave { position: relative; display: block; height: 30px; cursor: pointer; border-radius: 4px; }
.wave-canvas { display: block; width: 100%; height: 30px; }
.wave-head { display: none; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--bp-text); pointer-events: none; }
.take-details { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 12px; color: var(--bp-muted-text); white-space: nowrap; min-width: 0; }
.take-time { font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.take-name { flex-wrap: wrap; row-gap: 0; }
.take-over { flex: 1 0 100%; font-size: 11px; color: var(--bp-muted-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.take-parts { display: inline-flex; align-items: center; gap: 4px; color: var(--bp-muted-text); font: inherit; }
.take-parts .section-arrow { transform: rotate(-45deg); margin: 0 3px 0 0; }
.take-parts.open .section-arrow { transform: rotate(45deg); margin-bottom: 3px; }
.take-tempo { overflow: hidden; text-overflow: ellipsis; }
.take-by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }
.take-working { animation: take-working var(--motion-pulse) ease-in-out infinite; }
@keyframes take-working { 50% { opacity: 0.3; } }
@media (max-width: 700px) {
  .take-row { grid-template-columns: 28px minmax(0, 1fr) 28px 28px; grid-template-areas: "play name star menu" "wave wave wave wave" "details details details details"; gap: 6px 8px; }
  .take-row .take-play { grid-area: play; }
  .take-row .take-name { grid-area: name; }
  .take-row .take-star { grid-area: star; }
  .take-row .take-menu { grid-area: menu; }
  .take-row .take-wave { grid-area: wave; }
  .take-row .take-details { grid-area: details; justify-content: flex-start; }
  .take-row.part { margin-left: 12px; }
}
.take-menu { display: grid; place-items: center; }
.current-take { flex-wrap: wrap; }
body.dropping-takes::after { content: "Drop audio files to add them as takes"; position: fixed; inset: 12px; border: 2px dashed var(--bp-neon); border-radius: 16px;
  display: grid; place-items: center; font: 400 28px var(--display); color: var(--bp-neon); background: color-mix(in srgb, var(--bp-background) 85%, transparent); pointer-events: none; z-index: 10; }

/* A shared computer: the question before a sign-out deletes unsent changes, and the locked-library notices. */
dialog.sheet.unsynced-dialog p { margin: 0 0 12px; }
dialog.sheet.unsynced-dialog .unsynced-count { font-weight: 700; }
.unsynced-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.unsynced-actions .unsynced-backup { align-self: flex-start; }
@media (max-width: 480px) {
  .unsynced-actions { flex-direction: column-reverse; }
  .unsynced-actions .unsynced-backup { align-self: stretch; }
  .unsynced-actions .row { flex-direction: column-reverse; align-items: stretch; }
}
.shared-notices { max-width: 640px; margin: 16px auto 0; padding: 0 16px; }

/* Sharing: the Share box, the bell, Shared with Me (ui/cloud/share-dialog.js, bell.js, shared-with-me.js) */
dialog.share-dialog { width: min(520px, 94vw); }
.share-form { display: grid; gap: 26px; }
.share-form h2 { margin: 0; }
.share-form .share-note { margin: -16px 0 0; font-size: 14px; line-height: 1.45; } /* under the title: an empty new item, what to add first */
.share-section h3 { margin: 0 0 10px; font: 700 12px/1 var(--sans); letter-spacing: 0.02em; color: var(--bp-muted-text); }
.share-people { margin: 0; display: grid; gap: 4px; max-height: 240px; overflow-y: auto; font-family: var(--sans); }
.share-person { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.share-who { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.share-name, .share-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-nobody { padding: 6px 0; }
.share-form select { padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); color: var(--bp-text); font: inherit; font-size: 14px; }
.share-add-row { display: flex; gap: 8px; align-items: center; }
.share-find { position: relative; flex: 1; min-width: 0; }
dialog.sheet .share-find input { width: 100%; min-width: 0; margin: 0; }
.share-suggest { position: absolute; z-index: 2; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; display: grid; gap: 2px; max-height: 240px; overflow-y: auto;
  font-family: var(--sans); background: var(--bp-background); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / 0.5); }
.share-suggest[hidden], .share-suggest-empty[hidden] { display: none; }
.share-suggest-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: calc(var(--radius) - 2px); line-height: 1.25; cursor: pointer; }
.share-suggest-item:hover, .share-suggest-item.active { background: color-mix(in srgb, var(--bp-neon) 14%, transparent); }
.share-suggest-name, .share-suggest-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-suggest-empty { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 10px 12px; font-family: var(--sans);
  background: var(--bp-background); border: 1px solid var(--line); border-radius: var(--radius); }
.share-link { display: flex; align-items: center; gap: 12px; }
.share-link .share-copy[hidden] { display: none; }
.share-form .share-link-note { margin: 10px 0 0; max-width: 46ch; font-size: 14px; line-height: 1.45; } /* under the link picker: a link is for listening */
.share-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-foot .share-done { margin-left: auto; }
.share-stop { color: var(--bp-recording-red); }
.share-error:empty { display: none; }
.shared-row { text-decoration: none; }
.shared-row .shared-owner { margin-left: auto; display: inline-flex; }
.shared-row .avatar { width: 20px; height: 20px; font-size: 11px; }
.bell-menu { position: relative; }
.bell { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--bp-muted-text); }
.bell:hover { color: var(--bp-text); border-color: color-mix(in srgb, var(--bp-neon) 50%, transparent); }
.bell .icon { width: 18px; height: 18px; }
.bell-dot { position: absolute; top: 5px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bp-neon); border: 2px solid var(--bp-background); box-sizing: content-box; }
.share-link { flex-wrap: wrap; }
dialog.sheet .share-link-text { flex-basis: 100%; margin: 0; font: 13px var(--mono); }

/* Live room: who else is here (ui/cloud/people-here.js) */
.people-here { display: flex; align-items: center; margin-left: auto; align-self: flex-start; padding: 4px 4px 4px 0; }
.people-here:empty { display: none; }
.people-here .avatar { width: 30px; height: 30px; font-size: 13px; margin-left: -6px; box-shadow: 0 0 0 2px var(--ring, var(--bp-neon)), 0 0 0 4px var(--bp-background); }
.people-here .avatar:first-child { margin-left: 0; }
.people-here .people-more { margin-left: 10px; color: var(--bp-muted-text); font-size: 13px; font-weight: 700; }
.presence-dots { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; flex: none; }
.presence-dots:empty { display: none; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ring, var(--bp-neon)); }
.presence-dots .people-more { margin-left: 2px; color: var(--bp-muted-text); font-size: 11px; }
@media (max-width: 760px) { .people-here { margin-left: 0; align-self: flex-start; } }

/* Other people's carets over a shared text box (ui/remote-cursors.js): each is drawn in a hidden mirror of the box. */
.text-section { position: relative; }
.remote-cursors { position: absolute; pointer-events: none; }
.rc-mirror { position: absolute; left: 0; margin: 0; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; border-style: solid; border-color: transparent; }
.rc-sel { background: color-mix(in srgb, var(--rc) 30%, transparent); }
.rc-caret { position: relative; display: inline-block; width: 0; height: 1.2em; vertical-align: text-bottom; border-left: 2px solid var(--rc); margin-left: -1px;
  box-shadow: 0 0 8px 1px color-mix(in srgb, var(--rc) 70%, transparent); transform-origin: 0 100%; }
.rc-caret.typing { animation: rc-wiggle var(--motion-wiggle) ease-out; }
.rc-tag { position: absolute; left: -2px; bottom: calc(100% + 2px); display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 12px 12px 12px 3px;
  white-space: nowrap; font: 700 12px/1.3 var(--mono); color: #0b0b0b; background: var(--rc); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.rc-face { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; overflow: hidden; border-radius: 50%; background: rgba(0, 0, 0, 0.78); color: var(--rc);
  font: 700 11px/1 var(--mono); }
.rc-face::before { content: attr(data-initial); }
.rc-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Words someone just typed glow in their color, then fade (drawn in a mirror, never in the text). */
.rc-glow { border-radius: 3px; background: color-mix(in srgb, var(--rc) 38%, transparent); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--rc) 55%, transparent);
  animation: rc-glow var(--motion-slow) ease-out forwards; }
.checklist-row.live-glow { animation: row-glow var(--motion-slow) ease-out; }
@keyframes rc-glow { 0% { background-color: color-mix(in srgb, var(--rc) 38%, transparent); } 100% { background-color: transparent; box-shadow: 0 0 0 0 transparent; } }
@keyframes row-glow { 0% { background: color-mix(in srgb, var(--rc) 40%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 50%, transparent); } 100% { background: transparent; box-shadow: none; } }
@keyframes rc-wiggle { 0% { transform: scaleY(1); } 25% { transform: scaleY(1.35) rotate(-6deg); } 55% { transform: scaleY(0.95) rotate(4deg); } 100% { transform: none; } }

/* The LIVE banner at the top of the page, and the join and leave bubbles (ui/cloud/people-here.js). */
.live-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 40px 12px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--bp-neon) 40%, transparent); background: color-mix(in srgb, var(--bp-neon) 9%, var(--bp-panel)); }
.live-banner:empty { display: none; }
.live-mark { display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bp-neon); box-shadow: 0 0 0 0 color-mix(in srgb, var(--bp-neon) 70%, transparent); animation: live-pulse var(--motion-breathe) ease-out infinite; }
.live-word { font: 400 16px/1 var(--display); letter-spacing: 0.1em; color: var(--bp-neon); }
.live-who { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 3px 12px 3px 3px; border: 0; border-radius: 999px; background: transparent; color: var(--bp-text); font: 13px var(--mono); cursor: pointer; text-align: left; }
.live-who:hover, .live-who:focus-visible { background: var(--hover); }
.live-who .avatar { width: 28px; height: 28px; font-size: 13px; box-shadow: 0 0 0 2px var(--ring, var(--bp-neon)); }
.live-name { font-weight: 700; }
.live-where { color: var(--bp-muted-text); }
.people-here .avatar.arrive { animation: live-bounce var(--motion-bounce) cubic-bezier(0.3, 1.6, 0.5, 1), live-ring var(--motion-pulse) ease-out; }
.live-cards { position: fixed; top: 64px; right: 16px; z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.live-card { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--line); border-left: 3px solid var(--ring, var(--bp-neon));
  background: var(--bp-panel); color: var(--bp-text); font: 14px/1.35 var(--sans); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); overflow-wrap: anywhere;
  animation: card-in var(--motion-settle) cubic-bezier(0.2, 1.2, 0.4, 1); transition: opacity var(--motion-fade-slow) ease, transform var(--motion-settle) ease; }
.live-card.fading { opacity: 0; transform: translateY(-6px); }
.live-card .avatar { flex: none; width: 36px; height: 36px; font-size: 16px; box-shadow: 0 0 0 2px var(--ring, var(--bp-neon)); }
.live-card-body { min-width: 0; display: grid; gap: 2px; }
.live-card-head { display: flex; align-items: center; gap: 7px; color: var(--bp-muted-text); font: 12px var(--mono); text-transform: lowercase; letter-spacing: 0.04em; }
.live-card-dot { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font: 700 12px/1 var(--sans); color: var(--on-neon); }
.live-card-dot.join { background: var(--bp-neon); }
.live-card-dot.leave { background: var(--bp-recording-red); color: #fff; }
.live-card-name { font-weight: 700; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bp-neon) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes live-bounce { 0% { transform: translateY(-14px) scale(0.5); opacity: 0; } 60% { transform: translateY(2px) scale(1.1); opacity: 1; } 100% { transform: none; } }
@keyframes live-ring { 0% { box-shadow: 0 0 0 2px var(--ring), 0 0 0 4px var(--bp-background), 0 0 0 4px var(--ring); } 100% { box-shadow: 0 0 0 2px var(--ring), 0 0 0 4px var(--bp-background), 0 0 0 14px transparent; } }
@keyframes card-in { from { transform: translateX(24px) scale(0.95); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) { .live-cards { top: 56px; right: 12px; width: calc(100vw - 24px); } .live-banner { margin-inline: 16px; border-radius: 18px; } }
@media (prefers-reduced-motion: reduce) {
  .live-dot, .rc-caret.typing, .people-here .avatar.arrive, .checklist-row.live-glow { animation: none; }
  .rc-glows { display: none; }
  .live-card { animation: none; transition: none; }
}

/* Comments (ui/cloud/comments-button.js): the speech-bubble button beside the bell, its panel and a thread inside it */
.comments-btn .comments-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px;
  background: var(--bp-neon); color: var(--on-neon); font: 700 11px/18px var(--sans); text-align: center; }
.comments-btn:has(.comments-count) { color: var(--bp-neon); border-color: color-mix(in srgb, var(--bp-neon) 60%, transparent); }
.comments-panel { width: 360px; }
.comments-panel[hidden] { display: none; }
.comments-body { max-height: min(70vh, 480px); overflow-y: auto; font-family: var(--sans); font-size: 14px; }
.comments-list { margin: 0 0 8px; display: grid; }
.comment-row { display: grid; gap: 4px; padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.comment-row:last-child { border-bottom: 0; }
.comment-row:hover, .comment-row:focus-visible { background: color-mix(in srgb, var(--bp-neon) 8%, transparent); outline: none; }
.comment-row.done { opacity: 0.65; }
.comment-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comment-head .avatar { width: 24px; height: 24px; font-size: 12px; }
.comment-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.comment-when { flex: none; color: var(--bp-muted-text); font-size: 12px; }
.comments-body p { margin: 0; }
.comment-spot { padding-left: 10px; border-left: 2px solid var(--bp-neon); color: var(--bp-muted-text); font-family: var(--mono, var(--sans)); font-size: 13px; overflow-wrap: anywhere; }
.comment-body, .comment-voice { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.4; }
.comments-show-resolved { margin-top: 4px; }
.comment-thread { display: grid; gap: 12px; }
.comment-thread .comment-spot { margin: 0 0 2px; }
.comment-item { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.comment-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.comment-delete { color: var(--bp-recording-red); }
.comment-reply { display: grid; gap: 8px; }
.comment-reply-box { width: 100%; box-sizing: border-box; resize: vertical; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; }
.comment-back, .comment-goto { justify-self: start; }
/* Voice notes in comments (ui/cloud/voice-ui.js): recorder bar and the player */
.voice-recorder { display: grid; gap: 6px; }
.voice-bar, .voice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.voice-bar .voice-audio, .voice-where .voice-audio { flex: 1 1 100%; min-width: 0; max-width: 100%; height: 36px; }
.voice-where { display: flex; align-items: center; flex: 1 1 140px; min-width: 0; }
.voice-timer, .voice-length { font-family: var(--mono, var(--sans)); font-variant-numeric: tabular-nums; }
.voice-timer { min-width: 3ch; }
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bp-neon); animation: voice-pulse var(--motion-pulse) ease-in-out infinite; }
.voice-hint { color: var(--bp-neon); margin-right: auto; }
.voice-bar .voice-stop, .voice-bar .voice-send { color: var(--bp-neon); border-color: color-mix(in srgb, var(--bp-neon) 60%, transparent); }
.voice-error { color: var(--bp-recording-red); line-height: 1.4; }
.voice-status:empty { display: none; }
@keyframes voice-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .voice-dot { animation: none; } }
/* The open panel sits above its neighbours in the toolbar (the account chip was painted over it at phone width). */
.comments-menu:has(.comments-panel:not([hidden])) { z-index: 3; }
@media (max-width: 520px) {
  .comments-panel { position: fixed; left: 16px; right: 16px; top: 60px; width: auto; }
}
@media (pointer: coarse) { .comments-panel .quiet.small, .comments-panel .comment-row { min-height: 36px; } .comments-panel .quiet.small { display: inline-flex; align-items: center; } }

/* Comments on the page (ui/comment-marks.js, take-comments.js): highlights, the Comment chip, the compose box, marks on a waveform */
.comment-marks { position: absolute; pointer-events: none; }
.cm-hl { background: color-mix(in srgb, var(--bp-neon) 22%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--bp-neon) 70%, transparent); }
.cm-hl.focus { background: color-mix(in srgb, var(--bp-neon) 42%, transparent); }
.comment-chip { position: absolute; pointer-events: auto; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--bp-neon);
  background: var(--bp-background); color: var(--bp-neon); font: 600 13px var(--sans); cursor: pointer; z-index: 2; }
.comment-chip[hidden], .comment-compose[hidden] { display: none; }
.comment-compose, .take-compose, .daw-bar-compose { margin-top: 8px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--bp-neon) 40%, transparent); border-radius: 8px; font-family: var(--sans); }
.take-compose { grid-column: 1 / -1; }
.daw-bar-compose { margin: 8px 12px 10px; max-width: 560px; }
.score-svg.score-picking { cursor: crosshair; }
.score-bar-bubble { cursor: pointer; }
.score-bar-bubble:focus-visible { outline: 2px solid var(--bp-neon); outline-offset: 2px; }
.comment-compose-box { display: block; width: 100%; box-sizing: border-box; margin: 6px 0; font: 16px/1.4 var(--sans); color: var(--bp-text); background: var(--bp-background);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px; resize: vertical; }
.comment-compose-what { margin: 0; overflow-wrap: anywhere; }
.comment-compose .comment-actions, .take-compose .comment-actions, .daw-bar-compose .comment-actions { display: flex; gap: 8px; margin-top: 8px; }
.comment-compose button, .take-compose button, .daw-bar-compose button { min-height: 36px; }
.wave-mark { position: absolute; top: 0; bottom: 0; width: 16px; margin-left: -8px; padding: 0; border: 0; background: transparent; cursor: pointer; z-index: 1; }
.wave-mark::after { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--bp-neon); }
.wave-mark::before { content: ""; position: absolute; left: 3px; top: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--bp-neon); }
@media (pointer: coarse) { .wave-mark { width: 32px; margin-left: -16px; } .wave-mark::after { left: 15px; } .wave-mark::before { left: 11px; } }
.comment-changed { margin: 4px 0 8px; }

/* The metronome (ui/metronome-circle.js, metronome-panel.js): a circle in the toolbar, its panel hung under it from #audio-chrome.
   The metronome and the tuner (.tuner-button) are one look, as the apps' ToolFace .bar (visual sweep 2026-12-02): the glyph in the
   text color on the quiet filled circle every icon button has; solid accent while the click plays or the tuner listens (.playing);
   the playing metronome swells and glows on each beat (--pulse, .flash). Home's tiles keep the accent ring (.home-tool-face). */
.metronome-circle { position: relative; display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 0; color: var(--bp-text); background: var(--fill);
  transform: scale(calc(1 + var(--pulse, 0) * 0.12)); transition: background-color var(--motion-quick) ease, color var(--motion-quick) ease; }
.metronome-circle:hover { background: var(--fill-hover); }
.metronome-circle .icon { width: 18px; height: 18px; }
.metronome-circle.playing { background: color-mix(in srgb, #fff calc(var(--pulse, 0) * 40%), var(--bp-neon)); color: var(--on-neon); } /* brightens on each beat, also with reduced motion (the only cue when the click only flashes) */
.metronome-circle.flash { box-shadow: 0 0 calc(var(--pulse, 0) * 14px) color-mix(in srgb, var(--bp-neon) 80%, transparent); }
@media (pointer: coarse) { .metronome-circle { width: 44px; height: 44px; } }
.mc-badge { position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--bp-neon); border: 2px solid var(--bp-background); box-sizing: content-box; }
.mc-badge[hidden], .mp-layer[hidden], .mp-settings[hidden] { display: none; }
.mp-layer { position: fixed; z-index: 30; top: var(--mp-top, 56px); right: var(--mp-right, 20px); width: 340px; max-height: var(--mp-max, calc(100dvh - var(--mp-top, 56px) - 16px)); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 16px; background: var(--bp-panel); border: 1px solid color-mix(in srgb, var(--bp-neon) 35%, transparent); box-shadow: 0 18px 40px rgb(0 0 0 / 0.5); }
.mp-panel { display: grid; gap: 14px; padding: 16px; font-family: var(--sans); }
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; }
.mp-title { font: 700 12px/1 var(--sans); letter-spacing: 0.02em; color: var(--bp-muted-text); }
.mp-dots { display: flex; align-items: center; gap: 6px; }
.mp-dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--bp-muted-text) 50%, transparent); }
.mp-dot.accent { width: 10px; height: 10px; }
.mp-dot.mute { background: none; border: 1px solid var(--bp-muted-text); }
.mp-dot.lit { background: var(--bp-neon); box-shadow: 0 0 6px var(--bp-neon); }
.mp-tempo { display: flex; align-items: center; justify-content: center; gap: 18px; }
.mp-step { width: 40px; height: 40px; border-radius: 50%; border: 0; font: 700 20px/1 var(--sans); color: var(--bp-text); background: var(--fill); }
.mp-step:hover { background: var(--fill-hover); }
.mp-number { display: grid; justify-items: center; gap: 2px; min-width: 96px; }
.mp-bpm { width: 96px; padding: 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: none; color: var(--bp-text); text-align: center; font: 400 44px/1.1 var(--display);
  font-variant-numeric: tabular-nums; cursor: ns-resize; touch-action: none; }
.mp-bpm:hover, .mp-bpm:focus { border-bottom-color: color-mix(in srgb, var(--bp-neon) 60%, transparent); outline: none; cursor: text; }
.mp-caption { font: 400 12px/1 var(--mono); color: var(--bp-muted-text); }
.mp-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
/* Tap is secondary, Play primary: the control family (sans, capsules), as every other button. */
.mp-tap, .mp-play { min-height: 44px; border-radius: 999px; font: 600 15px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.mp-tap { background: var(--fill); color: var(--bp-text); }
.mp-tap:hover { background: var(--fill-hover); }
.mp-play { background: var(--bp-neon); color: var(--on-neon); }
.mp-prompt:empty { display: none; }
.mp-prompt-button { width: 100%; padding: 10px 12px; border-radius: 10px; text-align: left; font: 700 13px/1.35 var(--mono); color: var(--bp-neon);
  background: color-mix(in srgb, var(--bp-neon) 14%, transparent); overflow-wrap: anywhere; }
.mp-fold { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 2px 0; font: 400 12px var(--mono); color: var(--bp-muted-text); text-align: left; }
.mp-fold[aria-expanded="true"] .mp-chevron { transform: rotate(180deg); }
.mp-settings { display: grid; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 13px var(--mono); }
.mp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mp-row > span:first-child { min-width: 0; }
.mp-block { display: grid; gap: 8px; }
.mp-signature { display: inline-flex; align-items: center; gap: 6px; }
.mp-settings select { padding: 6px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); color: var(--bp-text); font: inherit; }
/* Choices are capsule chips (the control family): --fill, the chosen one in the accent. */
.mp-segments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mp-segment { min-height: var(--chip-h); padding: 0 4px; border-radius: 999px; background: var(--fill); font: 600 13px/1 var(--sans); color: var(--bp-text); }
.mp-segment[aria-pressed="true"] { background: var(--bp-neon); color: var(--on-neon); }
.mp-accents { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-accent { display: grid; justify-items: center; gap: 3px; min-width: 32px; padding: 4px 0; }
.mp-accent-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bp-muted-text); }
.mp-accent.accent .mp-accent-dot { width: 16px; height: 16px; margin: -2px 0; background: var(--bp-neon); }
.mp-accent.mute .mp-accent-dot { background: none; border: 1px solid var(--bp-muted-text); }
.mp-accent-num { font-size: 10px; color: var(--bp-muted-text); }
.mp-volume { flex: 1; max-width: 180px; accent-color: var(--bp-neon); }
.mp-check { display: flex; align-items: center; gap: 8px; }
.mp-check input { accent-color: var(--bp-neon); width: 16px; height: 16px; }
@media (max-width: 520px) {
  .mp-layer { left: 16px; right: 16px; width: auto; }
}
@media (pointer: coarse) { .mp-segment, .mp-accent { min-height: 40px; } }
@media (prefers-reduced-motion: reduce) { .metronome-circle { transform: none; transition: none; } .metronome-circle.flash { box-shadow: none; } }

/* Recording (record-button, recording-row, layer-picker, input-picker): red is for recording only; everything else stays green. */
.section-buttons { flex-wrap: wrap; justify-content: flex-end; }
.record-button { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-h); padding: 0 16px; border: 0; border-radius: 999px; color: var(--bp-background); background: var(--bp-recording-red); font: var(--control-font); font-weight: 700; white-space: nowrap; } /* Record's one look: song.css .record-pill */
.record-button .icon { width: 14px; height: 14px; fill: currentColor; stroke-width: 1; }
.record-button:hover:not(:disabled) { background: color-mix(in srgb, var(--bp-recording-red) 85%, var(--bp-text)); }
.record-button:disabled { opacity: 0.45; }
.rec-pop { position: relative; display: inline-flex; }
.rec-pop-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 320px; max-width: calc(100vw - 32px); padding: 16px; border-radius: 12px; background: var(--bp-panel); border: 1px solid var(--line); box-shadow: 0 8px 28px rgb(0 0 0 / 0.5); font-size: 14px; }
.rec-pop-title { margin: 0 0 10px; font-weight: 600; }
.rec-pop-panel p.small { margin: 10px 0 0; line-height: 1.4; }
.rec-layer-list, .rec-options { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; }
.rec-check { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 2px 4px; border-radius: 6px; cursor: pointer; }
.rec-check:hover { background: var(--hover); }
.rec-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--bp-neon); }
.rec-layers .row.end { margin-top: 14px; }
.rec-option { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 6px; border-radius: 6px; text-align: left; }
.rec-option:hover { background: var(--hover); }
.rec-option.on { color: var(--bp-neon); }
.rec-tick { width: 14px; flex: none; }
.rec-sub { padding-left: 18px; }
.rec-nudge { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.rec-stepper { display: inline-flex; gap: 6px; }
.recording-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--bp-recording-red) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bp-recording-red) 50%, transparent); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bp-recording-red); flex: none; }
.rec-dot.live { box-shadow: 0 0 8px var(--bp-recording-red); }
.rec-title { font-weight: 700; font-size: 15px; }
.rec-status { color: var(--bp-recording-red); font-size: 13px; font-variant-numeric: tabular-nums; }
.rec-meter { flex: 1 1 120px; max-width: 220px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rec-meter-fill { display: block; height: 100%; width: calc(var(--level, 0) * 100%); background: var(--bp-neon); }
.rec-meter-fill.hot { background: var(--bp-recording-red); }
@media (max-width: 700px) {
  .section-head:has(.record-button) { flex-wrap: wrap; row-gap: 8px; }
  .section-head:has(.record-button) .section-buttons { flex: 1 1 100%; justify-content: flex-start; }
  .section-buttons .record-button { order: -3; }
  .section-buttons .monitor-button { order: -1; }
    .section-buttons .rec-pop .rec-label { display: none; }
  .rec-pop-panel { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-width: none; }
}

/* The Inbox (ui/inbox-page.js): the intro and Record an Idea, then one row per waiting recording. */
.inbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; margin-bottom: 16px; }
.inbox-intro { min-width: 0; max-width: 60ch; }
.inbox-intro h1 { margin-bottom: 8px; }
.inbox-intro p { margin: 0; }
.inbox-head .record-button { flex: none; padding: 9px 18px; font-size: 14px; }
.inbox-page .recording-row { margin-bottom: 12px; }
.inbox-list { list-style: none; margin: 8px 0 0; padding: 0; }
.inbox-empty { margin-top: 12px; }
@media (max-width: 700px) {
  .inbox-head { flex-direction: column; align-items: stretch; }
  .inbox-head .record-button { align-self: flex-start; }
}

/* The tuner (ui/tuner-panel.js, audio/tuner.js): the tuning fork beside the metronome circle; its panel reuses .mp-layer */
.tp-layer { width: 300px; }
.tp-panel { display: grid; gap: 14px; padding: 18px 16px; font-family: var(--sans); justify-items: center; }
.tp-instrument { display: grid; gap: 14px; width: 100%; }
.tp-panel.refused .tp-instrument { display: none; }
.tp-note { display: flex; align-items: baseline; justify-content: center; gap: 3px; min-height: 76px; }
.tp-name { font: 400 64px/1.1 var(--display); color: var(--bp-muted-text); }
.tp-octave { font: 400 16px var(--mono); color: var(--bp-muted-text); }
.tp-panel.in-tune .tp-name { color: var(--bp-neon); }
.tp-scale { position: relative; height: 36px; margin: 0 8px; }
.tp-band { position: absolute; top: 0; bottom: 0; left: 47%; width: 6%; background: color-mix(in srgb, var(--bp-neon) 15%, transparent); }
.tp-tick { position: absolute; bottom: 0; left: calc((var(--tp-at) + 50) * 1%); width: 1px; height: 40%; background: color-mix(in srgb, var(--bp-muted-text) 50%, transparent); }
.tp-tick.mid { height: 100%; background: color-mix(in srgb, var(--bp-muted-text) 90%, transparent); }
.tp-needle { position: absolute; top: 0; bottom: 0; left: calc((var(--tp-cents, 0) + 50) * 1%); width: 4px; margin-left: -2px; border-radius: 2px; background: var(--bp-text); transition: left var(--motion-quick) ease-out; }
.tp-panel.in-tune .tp-needle { background: var(--bp-neon); }
.tp-details { display: flex; justify-content: space-between; margin: 0 8px; font: 400 12px var(--mono); color: var(--bp-muted-text); font-variant-numeric: tabular-nums; }
.tp-message { margin: 0; max-width: 260px; text-align: center; font: 400 12px/1.4 var(--mono); color: var(--bp-muted-text); }
.tp-message:empty { display: none; }
.tp-reference { grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; width: auto; }
.tp-label { font: 400 12px var(--mono); color: var(--bp-muted-text); white-space: nowrap; }
.tp-input { margin-left: 8px; }
.tp-ref { min-width: 62px; text-align: center; font: 700 13px var(--mono); font-variant-numeric: tabular-nums; }
.tp-step { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill); font: 700 18px/1 var(--sans); color: var(--bp-text); }
.tp-step:hover:not(:disabled) { background: var(--fill-hover); }
.tp-step:disabled { opacity: 0.35; }
@media (max-width: 520px) { .tp-layer { left: 16px; right: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .tp-needle { transition: none; } }


/* Input monitoring (ui/recording-row.js monitorButton): a headphones toggle beside Record; green when on */
.monitor-button { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--bp-muted-text); }
.monitor-button .icon { width: 18px; height: 18px; }
.monitor-button:hover:not(:disabled) { color: var(--bp-text); border-color: color-mix(in srgb, var(--bp-neon) 50%, transparent); }
.monitor-button.on { color: var(--bp-neon); border-color: color-mix(in srgb, var(--bp-neon) 70%, transparent); background: color-mix(in srgb, var(--bp-neon) 12%, transparent); }
.monitor-button:disabled { opacity: 0.45; }
.inbox-record { display: flex; align-items: center; gap: 10px; flex: none; }

/* A new version is ready (main.js showUpdateBar) */
.update-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 18px; border-radius: 12px; background: var(--bp-panel); border: 1px solid color-mix(in srgb, var(--bp-neon) 50%, transparent);
  box-shadow: 0 8px 30px rgb(0 0 0 / 45%); max-width: calc(100vw - 32px); }

/* A project's or album's art in the sidebar, in place of its icon (ui/sidebar.js artOr) */
.side-art { width: 16px; height: 16px; flex: none; border-radius: 3px; object-fit: cover; }

.loading-library { display: flex; align-items: center; gap: 8px; }
.cymbal { flex: none; color: var(--bp-neon, #3ddc84); }
.cymbal-stand { stroke: var(--bp-muted-text); stroke-width: 1.6; fill: none; }
.cymbal-plate { fill: currentColor; }
.cymbal-disc { transform-origin: 16px 13px; animation: cymbal-wobble var(--motion-slow) ease-in-out infinite; }
@keyframes cymbal-wobble { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } }
@keyframes cymbal-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .cymbal-disc { animation: cymbal-pulse var(--motion-slow) ease-in-out infinite; } }

/* Toast (ui/toast.js): a short note at the bottom that fades away by itself */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; width: max-content; max-width: min(560px, calc(100vw - 32px)); transform: translateX(-50%);
  padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-panel); color: var(--bp-text);
  font-size: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.45); pointer-events: none; animation: toast-in var(--motion-pop) ease-out; transition: opacity var(--motion-fade-slow); }
.toast.leaving { opacity: 0; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }

/* Set lists (ui/setlist-page.js) */
.setlist-title { font: 400 44px var(--display); background: none; border: 0; color: var(--bp-text); width: 100%; padding: 0; }
.setlist-fields { gap: 12px; margin: 12px 0 6px; }
.setlist-field { display: flex; flex-direction: column; gap: 4px; flex: 0 1 260px; min-width: 0; }
.setlist-field input { font: 400 15px var(--sans); color: var(--bp-text); background: var(--bp-panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; }
.setlist-field input:focus, .setlist-title:focus, .setlist-note:focus, .setlist-break input:focus { outline: none; border-color: var(--bp-neon); }
.setlist-field input::placeholder, .setlist-note::placeholder { color: var(--bp-muted-text); }
.setlist-actions { gap: 10px; margin: 10px 0 18px; }
.setlist-rows { list-style: none; padding: 0; margin: 0; }
.setlist-rows > li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setlist-number { width: 28px; text-align: right; color: var(--bp-muted); font-weight: 700; }
.setlist-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.setlist-note { background: none; border: 0; color: var(--bp-muted); font-size: 13px; padding: 0; }
.setlist-tools { display: flex; gap: 2px; }
.setlist-break hr { flex: 1; border: 0; border-top: 1px solid var(--line); }
.setlist-break input { background: none; border: 0; color: var(--bp-muted); font: 700 13px var(--mono); text-align: center; width: 9em; }
.gig-mode { position: fixed; inset: 0; z-index: 50; background: var(--bp-background); overflow: auto; outline: none; }
.gig-body { max-width: 900px; margin: 0 auto; padding: 28px 24px 60px; }
.gig-top { display: flex; justify-content: space-between; align-items: center; }
.gig-top button { font-size: 22px; }
.gig-title { font: 400 56px var(--display); margin: 18px 0 6px; }
.gig-details { font-weight: 700; font-size: 18px; margin: 0; }
.gig-note { font-size: 18px; }
.gig-lyrics { font: 400 24px/1.45 var(--mono); white-space: pre-wrap; margin-top: 18px; }
@media (max-width: 600px) {
  .setlist-title { font-size: 34px; }
  .gig-title { font-size: 40px; }
  .gig-lyrics { font-size: 19px; }
}
dialog.sheet.art-crop { width: min(480px, calc(100vw - 32px)); }
.art-crop-frame { margin: 0 -20px; }
.art-crop-canvas { display: block; width: 100%; height: min(360px, calc(100vw - 80px)); touch-action: none; cursor: grab; }
.art-crop-canvas:active { cursor: grabbing; }
.art-crop-canvas:focus-visible { outline: 2px solid var(--bp-neon); outline-offset: -2px; }
.art-crop-zoom-row { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; color: var(--bp-muted-text); }
.art-crop-zoom { flex: 1; accent-color: var(--bp-neon); }
.art-crop-help { margin: 0 0 16px; font-size: 13px; }

/* Now playing (ui/player-bar.js): stuck to the bottom of the page while an album or project plays. */
.player-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; margin: 24px -8px 0;
  padding: 10px 16px; background: color-mix(in srgb, var(--bp-panel) 92%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); }
.player-progress { position: absolute; left: 0; right: 0; top: -3px; height: 6px; cursor: pointer; }
.player-progress::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 2px; background: var(--line); }
.player-progress-fill { position: absolute; left: 0; top: 2px; height: 2px; width: 0; background: var(--bp-neon); pointer-events: none; }
.player-art { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.player-art.empty { display: grid; place-items: center; background: var(--hover); color: var(--bp-muted-text); }
.player-titles { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1; text-align: left; padding: 0; background: none; color: var(--bp-text); }
.player-titles strong, .player-titles span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub.player-line { color: var(--bp-text); font-family: var(--mono); }
.player-controls { display: flex; align-items: center; gap: 4px; }
.player-controls .player-main { width: 40px; height: 40px; border-radius: 50%; background: var(--bp-neon); color: var(--on-neon); }
.player-controls .player-main .icon { fill: currentColor; }
.player-controls .player-loading { opacity: 0.5; animation: player-pulse var(--motion-tick) ease-in-out infinite alternate; }
@keyframes player-pulse { to { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .player-controls .player-loading { animation: none; } }
.player-time { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; color: var(--bp-muted-text); }
@container main (max-width: 560px) { .player-count { display: none; } }
/* Under 760 px the page itself scrolls (not .main), so a sticky bar would sit at the very end: pin it to the screen. */
@media (max-width: 760px) {
  .player-bar { position: fixed; left: 0; right: 0; margin: 0; }
  .main:has(.player-bar) { padding-bottom: 72px; }
}
/* Speed and key: a button on the bar, and its panel above the bar's right end (the apps' tempo and key steppers). */
.player-shift-wrap { position: relative; display: flex; }
.player-shift-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px;
  border: 1px solid var(--line); color: var(--bp-muted-text); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.player-shift-toggle .icon { width: 16px; height: 16px; }
.player-shift-toggle:hover, .player-shift-toggle[aria-expanded="true"] { color: var(--bp-text); background: var(--hover); }
.player-shift-toggle.changed { color: var(--bp-neon); border-color: color-mix(in srgb, var(--bp-neon) 55%, transparent); }
.player-shift { position: absolute; right: 0; bottom: calc(100% + 18px); z-index: 6; display: grid; gap: 14px; padding: 16px;
  border-radius: 12px; background: var(--bp-panel); border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(0 0 0 / 0.45); }
.player-shift-steppers { display: flex; gap: 12px; }
.player-stepper { display: flex; align-items: center; border-radius: 22px; background: var(--hover); }
.player-stepper.changed { background: color-mix(in srgb, var(--bp-neon) 16%, var(--hover)); }
.player-stepper > button { width: 40px; height: 44px; display: grid; place-items: center; color: var(--bp-text); border-radius: 22px; }
.player-stepper > button .icon { width: 16px; height: 16px; }
.player-stepper-value { display: flex; flex-direction: column; align-items: center; width: 112px; text-align: center; }
.player-stepper-value strong { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.player-stepper-value span { font-size: 12px; color: var(--bp-muted-text); }
.player-shift-actions { display: flex; justify-content: center; gap: 20px; font-size: 13px; font-weight: 600; }
@container main (max-width: 560px) {
  .player-shift-toggle span { display: none; }
  .player-shift-toggle { padding: 0; width: 36px; justify-content: center; }
  .player-shift { position: fixed; left: 12px; right: 12px; bottom: 84px; }
  .player-shift-steppers { flex-direction: column; }
  .player-stepper { justify-content: space-between; }
}

/* Send feedback (ui/feedback-dialog.js) */
dialog.feedback-dialog textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); color: var(--bp-text); font: inherit; resize: vertical; margin-bottom: 14px; }
dialog.feedback-dialog .feedback-message-label, dialog.feedback-dialog .feedback-email-label { display: block; margin-bottom: 6px; }
dialog.feedback-dialog .feedback-error:empty { display: none; }
dialog.feedback-dialog .feedback-error { margin: 0 0 12px; }
dialog.feedback-dialog .muted { margin: 0 0 12px; }
/* Account settings: the name box, styled like the app's other text boxes (it was the browser's plain one). */
.settings-name { width: min(320px, 100%); padding: 9px 11px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bp-background); color: var(--bp-text); font: inherit; }
.settings-name:focus { outline: none; border-color: var(--bp-neon); }

/* Account settings, Live sessions (ui/cloud/live-settings.js): the fixed name in grey, then the box for the rest. */
.settings-live p { margin: 0; }
.settings-live { gap: 12px; }
.settings-message-row { display: grid; gap: 6px; max-width: 460px; }
.settings-message-label { font-weight: 700; }
.settings-message-line { display: flex; align-items: center; gap: 8px; padding: 0 0 0 11px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bp-background); }
.settings-message-line:focus-within { border-color: var(--bp-neon); }
.settings-message-name { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bp-muted-text); }
.settings-message { flex: 1; min-width: 0; padding: 9px 11px 9px 0; border: 0; background: transparent; color: var(--bp-text); font: inherit; }
.settings-message:focus { outline: none; }
.settings-example { margin: 0; overflow-wrap: anywhere; }
.settings-toggle { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; margin-top: 4px; cursor: pointer; }
.settings-toggle input { accent-color: var(--bp-neon); width: 16px; height: 16px; margin: 0; }
.settings-toggle .muted { grid-column: 2; }

/* Settings, Appearance (ui/appearance-dialog.js) */
dialog.sheet.appearance-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 820px); padding: 24px; overflow: hidden; }
dialog.sheet.appearance-dialog[open] { display: flex; flex-direction: column; gap: 16px; }
dialog.sheet.appearance-dialog h2 { margin: 0; }
.appearance-body { overflow-y: auto; margin: 0 -8px; padding: 0 8px; display: grid; gap: 28px; min-height: 0; }
.appearance-section h3 { margin: 0 0 4px; font: 700 15px/1.3 var(--sans); }
.appearance-section > p { margin: 0 0 12px; }
.appearance-fonts { display: grid; gap: 28px; }
.appearance-section .row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); padding: 0; }
.swatch.on { border-color: var(--bp-text); outline: 2px solid var(--bp-background); outline-offset: -5px; }
.swatch-any { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--bp-muted-text); }
.swatch-custom { width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; margin: 0; }
dialog.sheet .swatch-custom { width: 36px; height: 36px; padding: 0; margin: 0; border: 0; background: none; box-sizing: border-box; }
.appearance-preview { margin: 0 0 12px; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.appearance-slot[data-slot="titles"] .appearance-preview { font-size: 28px; line-height: 1.15; }
.appearance-picker { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
dialog.sheet .appearance-search { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 11px 14px; }
.font-list { max-height: 300px; overflow-y: auto; padding: 4px 0 8px; }
.font-group { margin: 12px 14px 4px; font: 700 12px/1 var(--sans); color: var(--bp-muted-text); letter-spacing: 0.02em; }
.font-row { display: block; width: 100%; text-align: left; padding: 9px 14px; min-height: 44px; font-size: 20px; line-height: 1.3; }
.font-row:hover { background: var(--hover); }
.font-row.on { background: var(--selected); color: var(--bp-neon); }
.font-empty { margin: 12px 14px; }
@media (max-width: 480px) { dialog.sheet.appearance-dialog { padding: 18px; } .appearance-preview { font-size: 18px; } .appearance-slot[data-slot="titles"] .appearance-preview { font-size: 24px; } }
.swatch-custom::-webkit-color-swatch-wrapper { padding: 4px; }
.swatch-custom::-webkit-color-swatch { border: 1px solid rgb(255 255 255 / 0.25); border-radius: 50%; }
.swatch-custom::-moz-color-swatch { border: 1px solid rgb(255 255 255 / 0.25); border-radius: 50%; }
.appearance-body:focus-visible { outline: none; }
.chords-section .text-editor, .chords-section .markup-text, .tab-staff text, .chord-diagram text { font-family: var(--mono-fixed); }
.appearance-chords-note { margin: -4px 0 10px; }

/* Other people's mouse pointers (ui/remote-pointers.js): one fixed layer over the window, never in the way of clicks.
   The arrow's tip is the point; the flag sits below and to the right so it doesn't cover the words pointed at. */
.rp-layer { position: fixed; inset: 0; z-index: 7; pointer-events: none; overflow: hidden; }
.rp-pointer { position: absolute; left: 0; top: 0; margin: -1px 0 0 -1px; pointer-events: none; will-change: transform; opacity: 1;
  transition: transform var(--motion-quick) linear, opacity var(--motion-fade-slow) linear; }
.rp-pointer.rp-fading { opacity: 0; }
.rp-arrow { display: block; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.rp-arrow path { fill: var(--rc); stroke: #0b0b0b; stroke-width: 1.5; stroke-linejoin: round; }
.rp-flag { position: absolute; left: 12px; top: 18px; display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 3px 12px 12px 12px;
  white-space: nowrap; font: 700 12px/1.3 var(--mono); color: #0b0b0b; background: var(--rc); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.rp-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.rp-flag .rc-face { background: rgba(0, 0, 0, 0.78); color: var(--rc); }
@media (prefers-reduced-motion: reduce) { .rp-pointer { transition: opacity var(--motion-fade-slow) linear; } }
.rp-pointer.rp-flip .rp-flag { left: auto; right: 4px; border-radius: 12px 3px 12px 12px; }

.sidebar .section-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
/* With no strip above them (only a song's page has one), notices start a little below the bar. */
.main > .live-banner:first-child + .notices, .main > .notices:first-child { padding-top: 16px; }

/* Folding projects and albums in the left list (ui/sidebar-folds.js) */
.tree li.has-menu > .fold-toggle { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 28px; border-radius: 6px; color: var(--bp-muted-text); z-index: 1; } /* 24 px: the computer's target floor */
.tree li.has-menu > .fold-toggle:hover { background: var(--hover); color: var(--bp-text); }
.tree li.has-menu > .fold-toggle .icon { width: 12px; height: 12px; transition: transform var(--motion-quick); }
.tree li.has-menu > .fold-toggle.open .icon { transform: rotate(90deg); }
.tree.projects .row-button.foldable { padding-left: 24px; }
.tree.projects .row-button.depth-1.foldable { padding-left: 38px; }
.tree.projects .row-button.depth-1 { padding-left: 38px; }
.tree.projects .row-button.depth-2 { padding-left: 52px; }
.tree.projects li:has(> .row-button.depth-1.foldable) > .fold-toggle { left: 16px; }
@media (prefers-reduced-motion: reduce) { .tree li.has-menu > .fold-toggle .icon { transition: none; } }
/* Record stays distinct on red art (syncRecordRing in ui/appearance.js sets [data-record-ring]): a thin light edge on the red itself, as the
   apps' recordRing; a gap and a second outline read as a doubled border. */
:root[data-record-ring] :is(.record-pill, .record-button, .rec-big-dot, .phone-plus-dot, .phone-plus .phone-plus-mark) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bp-text) 90%, transparent); }
:root[data-record-ring] .phone-plus .phone-plus-mark { border-radius: 50%; }
