/* The app page's own styles (index.html), after base.css: the shell (menu, top and tab bars,
   the player) and the tools. */

/* A section of a page: 20px, whatever its level (h3 under a tab, h4 inside Patterns), on every page. */
.section-title, .home-section > h3, .pattern > h4, .home-card-head h3, #tool-settings .card > h3, #tool-admin .card > h3, #tool-about .card > h3 { font-size: var(--fs-section); }
.range-tracks .track a, .check-title a, .player-track a, .library-table a, .library-albums a, .home-ranked a { color: inherit; }
.home-ranked a { text-decoration: none; }
.home-ranked a:hover, .library-albums a:hover { text-decoration: underline; }
.library-albums a { font-weight: 600; text-decoration: none; }
.hint { font-size: var(--fs-small); margin-top: var(--s2); }

/* ---------- The shell: menu, content; on a phone a top bar and a tab bar ---------- */
.shell { display: flex; min-height: 100vh; }
/* A column as high as the window, so the player bar can sit at its bottom on short pages too */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content > main { width: 100%; }
/* The menu: the brand, the five places (and Admin), your account at the bottom. It never scrolls. */
.menu {
  flex: 0 0 232px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s4); padding: var(--s4) var(--s3) var(--s4);
  background: var(--rail); border-right: 1px solid var(--border);
}
.menu[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: var(--s2); padding: 2px var(--s2); border-radius: 12px; color: var(--text); text-decoration: none; }
.brand .logo-mark { width: 34px; height: 34px; }
.brand .wordmark { font-size: 19px; }
.nav { display: grid; gap: var(--s1); }
.nav a {
  display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s3); border-radius: 14px;
  color: var(--text); font-weight: 550; text-decoration: none;
}
.nav a:hover { background: var(--raised); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.nav-divider { display: block; height: 1px; margin: var(--s2) var(--s3); background: var(--border); }
.nav-divider[hidden], .nav a[hidden] { display: none; }
.nav .menu-count { margin-left: auto; }
/* Your account: picture, name and email; opens the account menu. */
.account-button {
  margin-top: auto; justify-content: flex-start; gap: var(--s2); height: auto; min-height: 56px; padding: var(--s2) var(--s2); border-radius: 16px;
  background: transparent; color: var(--text); font-weight: 550; text-align: left;
}
.account-button:hover:not(:disabled), .account-button[aria-expanded="true"] { background: var(--raised); filter: none; }
.account-button:active:not(:disabled) { transform: none; }
.account-button .avatar { width: 36px; height: 36px; font-size: var(--fs-body); }
.account-names { flex: 1; min-width: 0; display: grid; }
.account-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-email { font-size: var(--fs-caption); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-chevron { width: 18px; height: 18px; color: var(--muted); }
/* The account menu: above the account button, or under the top bar's picture on a phone. */
.account-menu {
  position: fixed; left: 12px; bottom: 76px; z-index: 40; width: 208px;
  display: grid; gap: 2px; padding: var(--s2); border-radius: var(--radius-sm);
  background: var(--solid); box-shadow: var(--shadow);
}
.account-menu[hidden] { display: none; }
.account-menu a, .account-menu .signout {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--s2); width: 100%; min-height: 44px; padding: 0 var(--s2);
  border-radius: 10px; color: var(--text); font-weight: 550; text-decoration: none; background: transparent;
}
.account-menu a:hover, .account-menu .signout:hover:not(:disabled) { background: var(--raised); color: var(--text); filter: none; }
.account-menu a.active { color: var(--accent-ink); }
.account-menu .menu-count { margin-left: auto; }
@media (min-width: 761px) { .account-menu .account-admin { display: none; } } /* on a phone only: the menu has Admin elsewhere */
.app-version { margin: var(--s1) var(--s2) 2px; font-size: var(--fs-caption); color: var(--muted); }
/* Your work going on (core.js watchActivity): in the menu above your account; on a phone above
   the tab bar. A link to the page about it. */
.activity {
  display: grid; gap: var(--s2); margin: auto 0 0; padding: var(--s2) var(--s3); border-radius: 14px;
  background: var(--raised); color: var(--text); text-decoration: none; font-size: var(--fs-small);
}
.activity[hidden] { display: none; }
.activity:not([hidden]) + .account-button { margin-top: var(--s2); } /* else the account button is at the bottom by itself */
.activity:hover { box-shadow: inset 0 0 0 1px var(--accent-ink); }
.activity-label { display: flex; align-items: center; gap: var(--s2); font-weight: 650; }
.activity-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.activity-bar { display: block; height: 4px; border-radius: 2px; background: var(--accent-soft); overflow: hidden; }
.activity-bar > span { display: block; height: 100%; width: calc(var(--done, 0) * 100%); background: var(--accent-ink); border-radius: 2px; transition: width .3s; }
.activity.unknown .activity-bar > span { width: 30%; }
.activity-count { font-size: var(--fs-caption); }
.activity-count:empty { display: none; }
.activity-phone { display: none; }
/* A message when your work is done: at the bottom of the window, for a while. */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 45; max-width: min(420px, calc(100vw - 32px));
  display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--radius-sm);
  background: var(--solid); color: var(--text); box-shadow: var(--shadow); font-size: var(--fs-small);
}
.toast[hidden] { display: none; }
body:has(#player:not([hidden])) .toast { bottom: 120px; } /* above the player, not over it */
html:has(#player:not([hidden])) { scroll-padding-bottom: 140px; } /* the keyboard's focus stays above it too */
.toast a { font-weight: 650; white-space: nowrap; }
.toast button { flex: none; width: 36px; height: 36px; padding: 0; }
/* On a phone: a top bar with the page's name and your picture, and the places along the bottom. */
.topbar { display: none; }
.topbar-title { font: 700 var(--fs-section)/1.2 var(--heading-font); }
.tabbar { display: none; }
/* Tabs at the top of a page (Stats, Library, Admin, Gigs, an event): one row; equal parts on a phone. */
.page-tabs {
  display: flex; gap: var(--s1) var(--s6); margin: var(--s4) 0 var(--s3); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.page-tabs a:hover { color: var(--text); }
.page-tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.page-tabs a:focus-visible { outline-offset: -2px; }
.page-tabs .menu-count { margin-left: var(--s2); }
/* Above a tool's name: back to all tools. */
/* On a phone, inside a place (a tool, one playlist): back in the top bar. */
.topbar-back { display: flex; align-items: center; gap: 2px; min-height: 44px; margin-left: calc(-1 * var(--s2)); padding-right: var(--s2); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.topbar-back[hidden] { display: none; }
.topbar-back + .topbar-title { margin-left: var(--s1); }
/* The Tools page: a card per tool. */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--s4); }
.tool-card { display: grid; align-content: start; gap: var(--s2); color: var(--text); text-decoration: none; } /* its margin is .card's (a `margin: 0` here never won: .card came later) */
.tool-card:hover { box-shadow: inset 0 0 0 1px var(--accent-ink), var(--shadow); }
.tool-card-title { display: flex; align-items: center; gap: var(--s2); font: 700 var(--fs-part)/1.3 var(--heading-font); }
.tool-card-title .menu-icon { color: var(--accent-ink); }
/* Settings › Connected services: a row per service. */
.service-list, .range-tracks { list-style: none; margin: var(--s3) 0 0; padding: 0; border-top: 1px solid var(--border); }
.service-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-height: 60px; padding: var(--s2) 2px; border-bottom: 1px solid var(--border); }
.service-row .service-icon { margin: 0; width: 26px; height: 26px; }
.service-row-name { font-weight: 650; }
.service-row-state { display: inline-flex; align-items: center; gap: var(--s2); flex: 1 1 auto; }
.service-row-actions { display: flex; flex: none; gap: var(--s2); }
.service-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--muted); }
.connected .service-dot { background: var(--ok); box-shadow: none; }
.needs .service-dot { background: var(--warn-text); box-shadow: none; } /* connected, but a permission is missing */
.service-row.needs .service-row-state { color: var(--warn-text); }
/* Signed out: the logo above the sign-in card. */
.signed-out-head { display: flex; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s10) var(--s4) 0; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-mark .ink { fill: var(--mark-ink); }
.logo-mark .ring { fill: none; stroke: var(--mark-ring); stroke-width: 1.5; }
.logo-mark .label { fill: var(--coral); }
.logo-mark .play { fill: #FFFFFF; stroke: #FFFFFF; stroke-width: 1.5; stroke-linejoin: round; }
.wordmark { margin: 0; font-size: 21px; letter-spacing: -0.035em; white-space: nowrap; }
.wordmark-strong { font-weight: 800; color: var(--text); }
.wordmark-light { font-weight: 500; color: var(--coral); }
.avatar-large { width: 72px; height: 72px; font-size: var(--fs-page); }
.avatar-small { width: 28px; height: 28px; font-size: var(--fs-caption); }
.page-head { margin: var(--s8) 0 var(--s5); }
.page-head .muted { font-size: var(--fs-part); max-width: 70ch; }
.home-service {
  background: var(--card);
  border-radius: var(--radius); /* no blur: only floating things (player, bars, dialogs) have it */
  box-shadow: var(--shadow);
  padding: var(--s6);
  margin-top: var(--s4);
}
/* Cards only for units (a tool's setup and result, the Home and Tools cards, dialogs, empty
   states, the set on air on Gigs): on Stats, Library, Gigs, Settings and Admin the parts sit on the
   page, a line between them. */
:is(#tool-stats, #tool-library, #tool-djsets, #tool-settings, #tool-admin, #tool-about) :is(.card:not(.empty, .sets-now, .first-steps), .home-service) {
  background: none; box-shadow: none; border-radius: 0; padding: 0; margin-top: var(--s8); /* sections apart by space, not by more lines */
}
/* Signed-out screens */
.auth { display: grid; place-items: center; min-height: calc(100vh - 160px); }
.auth-card { width: 100%; max-width: 420px; padding: var(--s8); }
.auth-card h2 { font-size: var(--fs-page); }
.auth-card .muted { margin-bottom: var(--s4); }
.empty-title { margin: 0 0 var(--s2); font: 700 var(--fs-section)/1.3 var(--heading-font); }
.empty-state { text-align: center; padding: var(--s10) var(--s4); } /* an empty state inside a page (the missing album) */
.empty-state .muted { margin-bottom: var(--s5); }
#dup-count:empty { display: none; }
.card-lead { margin: 0 0 var(--s3); } /* a card's first line, where a title would repeat the page's */
.stack.narrow, .row.narrow { max-width: 420px; }
/* A field (its label above it) with its button beside it: the button in line with the field. */
.row.field-row { align-items: flex-end; }
/* Fields about one thing, under its name (New sync's "The copy"). */
.copy-group { display: grid; gap: var(--s4); margin: 0; padding: 0; border: 0; min-width: 0; }
.copy-group legend { padding: 0; margin-bottom: var(--s2); font-size: var(--fs-body); font-weight: 700; }
.copy-where { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--s4); } /* Service and Playlist on one line */
@media (max-width: 560px) { .copy-where { grid-template-columns: 1fr; } }
.fields label, .home-gig-field { display: grid; gap: var(--s2); font-size: var(--fs-small); font-weight: 550; color: var(--muted); }
.stack button.wide { justify-self: stretch; }
.stack .hint { margin: calc(-1 * var(--s2)) 0 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); margin: var(--s4) 0; }
.toggle-row { cursor: pointer; } /* a click on the row ticks its box (core.js rowToggles) */
.stepper { position: relative; display: inline-flex; flex: 0 0 auto; min-width: 0; }
.stepper input { flex: 1 1 auto; width: 100%; padding-right: var(--s6); }
.steps { position: absolute; top: 4px; bottom: 4px; right: 4px; width: 18px; display: grid; grid-template-rows: 1fr 1fr; gap: 1px; }
.stepper button {
  height: auto; width: 18px; padding: 0; border-radius: 4px; background: transparent; color: var(--muted);
  opacity: .55; transition: opacity .15s, background-color .15s, color .15s;
}
.stepper button::before {
  content: ''; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url(icons/chevron-up.svg) center / contain no-repeat; mask: url(icons/chevron-up.svg) center / contain no-repeat;
}
.stepper button.down::before { -webkit-mask-image: url(icons/chevron-down.svg); mask-image: url(icons/chevron-down.svg); }
.stepper:hover button, .stepper:focus-within button { opacity: 1; }
.stepper button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-ink); filter: none; }
.stepper button:active:not(:disabled) { transform: none; background: var(--accent-soft); }
@media (pointer: coarse) {
  .stepper button { display: none; }
  .stepper input { padding-right: var(--s2); }
}
input.tiny { flex: 0 0 76px; }
.stepper:has(input.tiny) { flex: 0 0 84px; }
.stepper input.tiny { flex: 1 1 auto; }
.row.or .muted { font-size: var(--fs-small); white-space: nowrap; }
.avatar-gravatar { display: flex; align-items: center; gap: var(--s2); margin: var(--s3) 0 0; cursor: pointer; }
label.inline { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.actions { margin-top: var(--s4); }
.generate { margin-top: var(--s1); }
button.icon { width: 44px; padding: 0; }

/* ---------- Messages ---------- */
.flash, .warning { padding: var(--s3) var(--s4); border-radius: var(--radius-sm); margin: var(--s4) 0 0; }
.flash { background: var(--err-bg); color: var(--err-text); }
/* The page's message: pinned at the top of the window while you scroll (core.js flash), on a solid
   background so it reads over the page. */
#flash:not([hidden]) { display: flex; align-items: center; gap: var(--s3); }
#flash > span { flex: 1; }
.flash-close { flex: none; color: inherit; }
#flash { position: sticky; top: calc(var(--sticky-top) + 8px); z-index: 15; background: color-mix(in srgb, var(--err-text) 14%, var(--solid)); box-shadow: var(--shadow); }
.warning { background: var(--warn-bg); color: var(--warn-text); }
/* A service that needs one more permission (core.js permissionNote): the sentence, its button at the right. */
.permission-note {
  display: flex; align-items: center; gap: var(--s2) var(--s4); min-height: 56px; margin: var(--s3) 0 var(--s4); padding: var(--s2) 2px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--warn-text); font-size: var(--fs-small);
}
.permission-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-text); }
.permission-text { flex: 1 1 auto; min-width: 0; }
.permission-note .button { flex: none; }
@media (max-width: 760px) { /* the button at the right of the text's last line, as Home's rows */
  .permission-note { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: end; }
  .permission-dot { align-self: start; margin-top: var(--s2); }
}
/* Analysis progress */
.progress, .home-progress { display: grid; gap: var(--s2); }
.progress-text, .home-progress-text { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-small); }
.progress progress, .home-progress progress {
  width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden;
  background: var(--accent-soft); appearance: none; -webkit-appearance: none;
}
.progress progress::-webkit-progress-bar, .home-progress progress::-webkit-progress-bar { background: var(--accent-soft); border-radius: 999px; }
.progress progress::-webkit-progress-value, .home-progress progress::-webkit-progress-value { background: var(--accent-ink); border-radius: 999px; transition: width .3s; }
.progress progress::-moz-progress-bar, .home-progress progress::-moz-progress-bar { background: var(--accent-ink); border-radius: 999px; }
/* Spotify green only on white or black; the dark rows are neither, so both logos are white there. */
.connect-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.connect-buttons .service-icon { width: 20px; height: 20px; margin: 0; background: currentColor; }
/* Why a service has no button here (Spotify not open for this account yet), under the buttons. */
.connect-buttons .connect-note { flex: 0 0 100%; margin: var(--s1) 0 0; text-wrap: balance; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1); }
.table-wrap:has(.row-menu[open]) { overflow: visible; } /* a row's ⋯ menu shown whole, not clipped (and scrolled) by the table */
.num { text-align: right; }
table.ranges td input { width: 96px; }
table.ranges td:nth-child(3) { color: var(--muted); }
tr.disabled td { opacity: .55; }
.actions-cell { text-align: right; white-space: nowrap; } /* a table cell: the row's lines stay in line */
/* On a phone: what a column said goes under the name (Admin › People). */
.inline-detail { display: none; }
@media (max-width: 760px) { .inline-detail { display: block; } }
@media (max-width: 760px) { /* Accounts on a phone: email, role and status under the name */
  [data-admin-section="people"] .opt, [data-admin-section="people"] thead { display: none; }
  [data-admin-section="people"] .inline-detail { overflow-wrap: anywhere; }
  /* A field that submits gets its button under it, full width (the invite, the tempo search). */
  #invite-create-form, #tempo-search { flex-direction: column; align-items: stretch; }
  #invite-create-form input:not([type="checkbox"]), #tempo-search input, #tempo-search select { flex: none; width: 100%; }
  #invite-create-form label.inline { white-space: normal; }
}

/* ---------- BPM split ---------- */
/* Setup: one line, no card */
.setup { display: grid; gap: var(--s3); }
.setup-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); }
.setup-line.top { align-items: flex-start; } /* a tall field beside: the labels in one line */
.field.grow { flex: 2 1 280px; }
.with-button { display: flex; gap: var(--s2); }
.with-button > button { flex: none; }
.link-field { max-width: 560px; }
.link-field input { flex: none; width: 100%; }
#template-summary { margin: 0; }
/* Template editor, open only when asked for */
.editor { margin: var(--s4) 0 var(--s6); padding: var(--s5) var(--s6); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.editor-head h3 { margin: 0; }
.editor .fields { margin-bottom: var(--s2); }
#template-state.dirty { color: var(--warn-text); }
/* The result: the one raised surface */
.result { margin-top: var(--s6); padding: var(--s6); border-radius: var(--radius); /* the cards' padding: the step numbers line up */ background: var(--card);  box-shadow: var(--shadow); }
.result .result-title { margin: 0 0 var(--s1); font-size: var(--fs-section); font-weight: 800; } /* a section: above .result h3, its parts */
.result-title:focus { outline: none; }
.lead { margin: 0 0 var(--s6); color: var(--muted); font-size: var(--fs-part); max-width: 72ch; }
.result h3 { font-size: var(--fs-part); }
/* Tempo map: a bar per range, as high as its number of tracks */
.tempo-map {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(28px, 1fr)); gap: var(--s2);
  align-items: end; height: 250px; border-bottom: 2px solid var(--text);
}
.tempo-range {
  height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text);
  display: grid; grid-template-rows: 1fr auto; grid-template-columns: minmax(0, 24px); justify-content: center; /* thin bars, as the other charts */ align-items: end; justify-items: stretch;
  position: relative; font-weight: 400;
}
.tempo-range:hover:not(:disabled) { filter: none; }
.tempo-range:active:not(:disabled) { transform: none; }
.tempo-range .count {
  align-self: end; margin-bottom: var(--s2); text-align: center;
  font: 700 var(--fs-lead)/1 var(--heading-font); font-variant-numeric: tabular-nums;
}
.tempo-range .level {
  display: block; height: calc(var(--size, 0) * 180px); min-height: 2px;
  border-radius: 4px 4px 0 0; background: var(--bar); transition: height .3s, background-color .2s;
}
.tempo-range .axis {
  position: absolute; top: 100%; left: 0; right: 0; padding-top: var(--s2); text-align: center;
  font: 600 var(--fs-small)/1.2 var(--heading-font); font-variant-numeric: tabular-nums; color: var(--muted);
}
.tempo-range .level.zero { height: 2px; border-radius: 1px; background: var(--border); }
.tempo-range:hover .level { opacity: .85; }
.tempo-range[aria-pressed="true"] .level { background: var(--accent); }
.tempo-range[aria-pressed="true"] .count, .tempo-range[aria-pressed="true"] .axis { color: var(--accent-ink); }
.tempo-map + * { margin-top: var(--s12); }
/* Tracks to check by ear */
.checks { padding: var(--s5) var(--s6); border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.checks-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s3); }
.checks-head h3 { margin: 0; font-size: var(--fs-part); }
.check-list, .home-list, .plain-list, .library-albums { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); } /* a list without bullets, its items apart */
.check-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.check-text { flex: 1 1 240px; min-width: 0; }
.check-text p { margin: 0; }
.check-title { font-weight: 650; }
.check-title a { text-decoration: none; }
.check-title a:hover { text-decoration: underline; }
.check-text .artist { font-size: var(--fs-small); }
.artist { font-weight: 400; color: var(--muted); }
.check-actions { display: flex; align-items: center; gap: var(--s2); flex: none; }
.check-actions .stepper { flex: 0 0 96px; } /* "e.g. 92" fits */
.check-actions input { height: 36px; }
.listen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding-left: var(--s16); }
.preview-progress { flex: 1 1 200px; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
/* The play position: a slider with the played part in the accent colour (--played, 0 to 1) */
input.seek {
  flex: 1; min-width: 0; height: 24px; padding: 0; border: 0; background: transparent;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
input.seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(var(--accent-ink), var(--accent-ink)) 0 0 / calc(var(--played, 0) * 100%) 100% no-repeat, var(--border);
}
input.seek::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(var(--accent-ink), var(--accent-ink)) 0 0 / calc(var(--played, 0) * 100%) 100% no-repeat, var(--border);
}
input.seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: calc(-1 * var(--s1));
  border: 0; border-radius: 50%; background: var(--accent-ink);
}
input.seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent-ink); }
input.seek:hover::-webkit-slider-thumb { transform: scale(1.2); }
input.seek:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
input.seek:disabled { cursor: default; }
input.seek:disabled::-webkit-slider-thumb { visibility: hidden; }
input.seek:disabled::-moz-range-thumb { visibility: hidden; }
button.play { flex: 0 0 44px; width: 44px; padding: 0; border-radius: 50%; background: var(--accent); color: var(--accent-text); }
.play-icon {
  width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url(icons/play.svg) center / contain no-repeat; mask: url(icons/play.svg) center / contain no-repeat;
}
.play.playing .play-icon { -webkit-mask-image: url(icons/pause.svg); mask-image: url(icons/pause.svg); }
button.tap { height: 30px; padding: 0 var(--s3); font-size: var(--fs-small); box-shadow: inset 0 0 0 1px var(--text); font-weight: 650; }
button.tap.tapped { animation: tap .12s ease-out; }
.tap-result { flex: 1 1 220px; font-size: var(--fs-small); }
/* Tracks in the chosen range */
.range h3 { margin-bottom: 2px; }
.setprep-controls { margin-bottom: var(--s3); }
.setprep-limit { display: flex; gap: var(--s2); align-items: center; }
.setprep-limit input { width: 7em; min-width: 0; }
/* Smart playlists' page of rules: short rules side by side, the preview's first songs under its button. */
.smart-rule-line { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); }
label.inline.smart-rule-switch { white-space: normal; } /* Leave out overplayed songs …: wraps on a phone */
.field label.smart-key-mixes { display: flex; align-items: center; gap: var(--s2); font-weight: 400; color: var(--text); } /* a tick box under the key, not a field's name */
.wave-feel { margin: var(--s1) 0 var(--s4); } /* Tempo wave's feel filter, under its settings */
.smart-preview { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.smart-preview p { margin: 0; }
.smart-preview-list { margin: 0; padding-left: 1.6em; max-height: 320px; overflow: auto; font-size: var(--fs-small); }
/* Its page (#smart/new, #smart/<id>): the steps as cards, as the other tools; the rarer rules folded. */
.smart-page { display: grid; gap: var(--s4); }
.smart-page > .result-title { margin: 0; font-size: var(--fs-section); font-weight: 800; }
.smart-step { display: grid; gap: var(--s3); }
.smart-page .smart-rule-line > .field { flex: 0 1 auto; } /* short rules as wide as they need */
.tag-rule > div { flex: 1 1 240px; min-width: 0; } /* your tags to keep songs by: two pickers side by side, wide enough for a few chips */
.smart-step .copy-group { max-width: 520px; }
.smart-step .step-label, .smart-step p { margin: 0; }
.smart-more summary span { font: 400 var(--fs-small)/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; } /* which of them are in use */
.smart-more > :not(summary) { margin: 0 0 var(--s4); }
.smart-more[open] summary { margin-bottom: var(--s2); }
.setprep-line, .home-figure dt, .home-figure .note, .all-list .note { font-size: var(--fs-small); color: var(--muted); }
/* Gigs › Places (js/places.js): the events or venues, a name and its line each; one of them on its own. */
#places-by { margin-bottom: var(--s3); }
.places-list { list-style: none; margin: 0; padding: 0; }
.places-list li { display: grid; gap: var(--s1); padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.places-list li:last-child { border-bottom: 0; }
.places-name { font-weight: 650; font-size: var(--fs-part); text-decoration: none; overflow-wrap: anywhere; }
.places-name:hover { text-decoration: underline; }
#places-no-venue { margin: var(--s3) 0 0; }
/* A page inside a tab (one place, one event): the way back to the list (a phone's top bar has its
   own), and its name. */
.back-link { display: inline-block; margin-bottom: var(--s2); font-size: var(--fs-small); }
.back-link::before { content: '‹ ' / ''; }
@media (max-width: 760px) { .back-link { display: none; } }
.detail-title { margin: 0 0 var(--s1); font-size: var(--fs-section); }
/* Its editions side by side where they fit (a year's slots each), under each other on a phone. */
.places-editions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3) var(--s6); }
.places-slots { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: var(--s1); }
/* Five filters: one row that scrolls on a phone, not five wrapped labels. */
.setprep-filter { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.chip.overplayed { box-shadow: inset 0 0 0 1px var(--warn-text); color: var(--warn-text); } /* Set prep: played at many of the last gigs */
.setprep-filter label { flex: none; white-space: nowrap; }
.range-tracks li { display: flex; align-items: center; gap: var(--s4); padding: var(--row-pad) 2px; border-bottom: 1px solid var(--border); }
.range-tracks .track { flex: 1; min-width: 0; display: grid; }
.range-tracks .track a { font-weight: 600; text-decoration: none; }
.range-tracks .track a:hover { text-decoration: underline; }
.range-tracks .artist { font-size: var(--fs-small); }
.range-tracks .note { flex: none; font-size: var(--fs-small); color: var(--muted); text-align: right; }
.row-play-gap { flex: 0 0 32px; } /* a song without ▶ (not found): the rows stay in line */
.range-tracks .artist, .wave-share-list label, .tempo-song-name strong, .tempo-song-name .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Your tags on a song (Library › Songs): chips under its title; on its page each with a button to remove it. */
.song-tag-list, .song-tags { display: flex; flex-wrap: wrap; gap: var(--s1); }
.song-tag-list { margin-top: 2px; }
.song-tags:empty { display: none; }
.chip.song-tag { color: var(--text); }
.song-tags .song-tag { display: inline-flex; align-items: center; gap: 2px; padding-right: 0; font-size: var(--fs-small); }
.song-tags .tag-remove { width: 28px; height: 28px; }
.song-tags .tag-remove .menu-icon { width: 14px; height: 14px; }
.song-notes { display: grid; gap: var(--s3); max-width: 560px; }
.song-notes .field { display: grid; gap: var(--s2); }
.song-notes textarea { min-height: 96px; } /* a few lines; it grows when dragged */
.song-notes button[type="submit"] { justify-self: start; }

/* ---------- Home ---------- */
.home-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.home-card-head h3 { margin: 0; display: flex; align-items: center; gap: var(--s2); }
.home-card-head h3 .service-icon { width: 24px; height: 24px; margin: 0; }
.home-card-head p { display: flex; align-items: baseline; gap: var(--s2); }
button.link-button { height: auto; padding: 0; background: none; color: var(--accent-ink); font-weight: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
button.link-button:hover:not(:disabled) { filter: none; text-decoration-thickness: 2px; }
.home-progress { margin-bottom: var(--s4); }
.home-service .error, .home-listening .error { color: var(--err-text); }
/* Figures: a label above a value, a note under it */
.home-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: var(--s4); margin: 0 0 var(--s2); }
.home-figure { margin: 0; display: grid; align-content: start; gap: 2px; }
.home-figure dd { margin: 0; }
.home-figure .value { font: 700 var(--fs-page)/1.15 var(--heading-font); }
/* The tempo spread: columns from one baseline, 2px apart, at most 24px wide */
.home-tempo { margin: var(--s2) 0 0; }
.home-tempo-bars { display: flex; align-items: stretch; gap: 2px; height: 150px; border-bottom: 1px solid var(--border); }
.home-tempo-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: pointer; }
/* The bars quiet (grey), the tallest in the accent; the one pointed at or tapped too, with its count. */
.home-tempo-bar { width: 100%; max-width: 24px; height: calc(var(--size, 0) * (100% - 18px)); border-radius: 4px 4px 0 0; background: var(--bar); }
.home-tempo-col.top .home-tempo-bar, .home-tempo-col:hover .home-tempo-bar, .home-tempo-col.picked .home-tempo-bar { background: var(--accent); }
.home-tempo-count { font-size: var(--fs-caption); line-height: 18px; font-weight: 650; color: var(--muted); visibility: hidden; }
.home-tempo-count.shown, .home-tempo-col:hover .home-tempo-count, .home-tempo-col.picked .home-tempo-count { visibility: visible; }
.home-tempo-col:hover .home-tempo-count, .home-tempo-col.picked .home-tempo-count { color: var(--text); }
.home-tempo-axis { display: flex; gap: 2px; margin-top: var(--s1); font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; }
.home-tempo-axis span { flex: 1 1 0; min-width: 0; text-align: center; }
.home-tempo figcaption { margin-top: var(--s2); }
.key-chart { --key-label: 64px; margin: var(--s2) 0 0; }
.key-chart-row { display: grid; grid-template-columns: var(--key-label) repeat(12, minmax(0, 1fr)); gap: 2px; }
.key-chart-major, .key-chart-minor { height: 120px; }
/* Each key a button (the whole column, for a finger): none of a button's own look. */
.key-chart-col {
  min-width: 0; height: 100%; padding: 0; border-radius: 4px; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.key-chart-col:hover:not(:disabled) { background: transparent; filter: none; }
.key-chart-col:active:not(:disabled) { transform: none; }
.key-chart-minor .key-chart-col { flex-direction: column-reverse; justify-content: flex-end; } /* reversed: the bar hangs from the line, its count under it */
.key-chart-bar { display: block; width: 100%; max-width: 32px; height: calc(var(--size, 0) * (100% - 18px)); border-radius: 4px 4px 0 0; background: var(--bar); }
.key-chart-minor .key-chart-bar { border-radius: 0 0 4px 4px; }
.key-chart-count { font-size: var(--fs-caption); line-height: 18px; font-weight: 650; color: var(--muted); visibility: hidden; font-variant-numeric: tabular-nums; }
.key-chart-col.top .key-chart-bar, .key-chart-col.picked .key-chart-bar, .key-chart-col:hover .key-chart-bar { background: var(--accent); } /* as barChart's bars */
.key-chart-col.mixes .key-chart-bar { background: var(--key-mixes); }
.key-chart-col.top .key-chart-count, .key-chart-col.picked .key-chart-count, .key-chart-col.mixes .key-chart-count, .key-chart-col:hover .key-chart-count { visibility: visible; }
.key-chart-col.picked .key-chart-count, .key-chart-col.mixes .key-chart-count, .key-chart-col:hover .key-chart-count { color: var(--text); }
.key-chart.picking .key-chart-col.top:not(.picked, .mixes, :hover) .key-chart-bar { background: var(--bar); }
.key-chart.picking .key-chart-col.top:not(.picked, .mixes, :hover) .key-chart-count { visibility: hidden; }
.key-chart-label { align-self: end; font-size: var(--fs-caption); color: var(--muted); } /* beside the line */
.key-chart-minor .key-chart-label { align-self: start; }
.key-chart-numbers { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--s1) 0; font-size: var(--fs-caption); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.key-chart figcaption, .key-chart-picked { margin-top: var(--s2); }
/* The feel: a meter per feature, filled to its average */
.home-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3) var(--s6); }
.home-meters + .muted { margin-top: var(--s2); }
.home-meter { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); font-size: var(--fs-small); }
.home-meter-value { font-weight: 650; }
.home-meter-track { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--field-border); overflow: hidden; } /* the edge (3:1 against the page) shows where 100% is */
.home-meter-fill { display: block; height: 100%; width: calc(var(--value, 0) * 100%); border-radius: 999px; background: var(--accent); }
.home-columns[hidden] { display: none; }
.home-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 var(--s8); }
/* A top list beside a list of songs: a third for the top list, two thirds for the songs (with their chips). */
@media (min-width: 1000px) { .home-columns-songs { grid-template-columns: 1fr 2fr; } }
.home-ranked { margin: 0; padding-left: var(--s6); display: grid; gap: var(--s2); }
.home-ranked li { padding-left: var(--s1); }
.home-ranked li > * + * { margin-left: var(--s2); }
.home-list li { display: grid; gap: 2px; }
/* Stats › Year: one year at a time (the chooser scrolls sideways with many), its parts apart by space */
#year-choice { max-width: 100%; overflow-x: auto; }
.year-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.year-part { margin-top: var(--s8); }
.year-part > h3 { margin: 0 0 var(--s3); }
.year-find { margin-bottom: var(--s4); }
.year-lines { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4); margin: var(--s4) 0; }
.year-lines dt { color: var(--muted); font-size: var(--fs-small); align-self: baseline; }
.year-lines dd { margin: 0; }
.home-songs { margin-top: 0; }
/* A ▶ on a song in a list (see js/player.js) */
button.row-play { flex: 0 0 32px; width: 32px; height: 32px; }
button.row-play .play-icon { width: 12px; height: 12px; }
td > button.row-play { display: grid; place-items: center; }
@media (pointer: coarse) {
  button.row-play { flex-basis: 44px; width: 44px; height: 44px; }
  .row-play-gap { flex-basis: 44px; }
}
/* The player: a glass bar along the bottom of the page */
.player {
  position: sticky; bottom: 12px; z-index: 20; max-width: 1080px; margin: auto auto var(--s3); width: calc(100% - 64px);
  display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; grid-template-areas: "controls track progress close" "controls track source close" "controls facts facts close" "controls notes notes close" "controls next next close";
  align-items: center; gap: 2px var(--s5); padding: var(--s2) var(--s4); border-radius: 22px;
  background: color-mix(in srgb, var(--solid) 90%, transparent); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: var(--shadow);
}
.player[hidden] { display: none; }
.player-controls { grid-area: controls; display: flex; align-items: center; gap: var(--s1); }
.player-track { grid-area: track; margin: 0; display: grid; min-width: 0; }
.player-track a { font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* In a list too: the title shortens, its length and tempo stay on its line (as in the player). */
/* Where the title and its length and tempo don't fit on a line (a phone, a lead before the song),
   those move under it instead of shortening the title to a letter. */
.range-tracks .song-title { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); min-width: 0; }
.range-tracks .song-title > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.range-tracks .song-title .chip { flex: none; }
.player-track .song-title { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s2); min-width: 0; } /* the title shortens, the tempo stays */
.player-track .song-title a { min-width: 0; }
.player-track .song-title .chip { flex: none; display: inline-flex; align-items: center; padding: var(--s1) var(--s2); line-height: 1; } /* the text in the middle */
.player-track a:hover { text-decoration: underline; }
.player-track .artist { font-size: var(--fs-small); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-progress { grid-area: progress; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.player-source { grid-area: source; margin: 0; }
.player-facts { grid-area: facts; list-style: none; margin: var(--s2) 0 2px; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.player-facts[hidden] { display: none; }
.player-facts .chip { padding: var(--s1) var(--s2); font-size: var(--fs-caption); line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; } /* the same chip as beside the title */
/* Your tags and note on the song (songnotes.js), and the button to change them */
.player-notes { grid-area: notes; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: 2px 0; min-width: 0; }
.player-notes[hidden] { display: none; }
.player-notes .player-note { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The songs of the list that mix well after this one (songfacts.js nextInKey): a quiet button each */
.player-next-key { grid-area: next; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: 2px 0; min-width: 0; }
.player-next-key[hidden] { display: none; }
.player-next-key-list { display: flex; flex-wrap: wrap; gap: var(--s1); min-width: 0; }
.player-next-key-list button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Beside a song's title in a list: its length and tempo (core.js titled). */
.song-title .chip { white-space: nowrap; padding: 0 var(--s2); font-size: var(--fs-caption); font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; }
.song-title .chip[hidden] { display: none; }
#player-close { grid-area: close; }
.result > * + * { margin-top: var(--s8); }
.result > .result-title + .lead { margin-top: 0; }
/* All tracks, folded away: the range list's style, with the tempo editable */
/* One look for a part that opens: its name as a part heading (16px) in the text colour, with its ▸. */
.all-tracks summary, .change-block summary, .how summary, .smart-more summary { width: fit-content; cursor: pointer; font: 700 var(--fs-part)/1.3 var(--heading-font); padding: var(--s2) 0; }
.all-tracks[open] summary { margin-bottom: var(--s2); }
.all-list li { flex-wrap: wrap; gap: var(--s2) var(--s4); }
.all-list .stepper { flex: 0 0 76px; }
input.bpm-input {
  height: 36px; padding: 0 var(--s6) 0 var(--s2); text-align: right;
  font: 700 var(--fs-lead)/1 var(--heading-font); font-variant-numeric: tabular-nums;
}
.all-list .where { flex: 0 1 220px; display: grid; text-align: right; font-size: var(--fs-small); }
.all-list .playlist { font-weight: 600; }
.row-tools { flex: none; display: flex; gap: var(--s2); justify-content: flex-end; }
.all-list li.unsorted .playlist { color: var(--muted); font-weight: 400; }
.chip.auto { box-shadow: inset 0 0 0 1px var(--accent-ink); color: var(--accent-ink); }
/* Amber: needs a look ("check above", "Not sure"); the accent only for what is in progress. */
.chip.varies, .chip.suggest, .chip.exact, .chip.recording, .chip.similar { box-shadow: inset 0 0 0 1px var(--warn-text); color: var(--warn-text); }
.chip.broken-out { box-shadow: inset 0 0 0 1px var(--warn-text); color: var(--warn-text); } /* Broken songs: taken out */
.create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s5); padding-top: var(--s6); border-top: 1px solid var(--border); } /* buttons in line with the fields, not their labels */
.energy-split { display: grid; gap: var(--s2); } /* BPM split: calm and lively, beside who can see them */
.create p { margin: 0; flex: 1 1 280px; align-self: center; }
.results { padding-left: var(--s4); margin: var(--s4) 0 0; }
.results .new { color: var(--ok); font-weight: 600; }
.results .error { color: var(--err-text); }
.page-head h2:focus { outline: none; } /* focused on arriving at a page (main.js): a heading is not a control */
.pairs-section { margin-top: var(--s4); }
/* A page's own action above its list (New sync). */
.page-actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-start; margin: 0 0 var(--s2); }
/* The review of a sync: under its row, across the row's width. */
.pair > .sync-review { flex: 1 1 100%; margin: var(--s2) 0 var(--s1); }
/* The row whose review is open: an accent edge down the row and its review; its own button gives
   way to the review's. */
.pair.open { box-shadow: inset 3px 0 var(--accent); padding-left: var(--s4); }
.pair.open .pair-check { display: none; }
.dialog.wide { width: min(520px, calc(100vw - 32px)); } /* the Sync setup: five fields */
.dialog.wide .field { flex: none; }
/* Make playlist with a name you have already: the three choices one under another, each with what it
   does beside it; the buttons as wide as the widest. */
.make-choices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--s3); align-items: center; }
.make-choices li { display: contents; }
.make-choices button { justify-self: stretch; }
.pairs-section h3 { margin-bottom: var(--s2); }
.pairs { list-style: none; margin: var(--s3) 0 calc(-1 * var(--s2)); padding: 0; }
.pair { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--row-pad) 2px; border-top: 1px solid var(--border); }
.pair-main { flex: 1 1 320px; min-width: 0; }
.pair-main p { margin: 0; }
.pair-route { font-size: var(--fs-part); }
.pair-actions { display: flex; gap: var(--s2); flex: none; }
/* A row's actions sit at its right end, also when they wrap under the text on a phone (as
   Home's rows): Sync's pairs, Settings' services, Admin's problems. */
.pair-actions, .service-row-actions, .tasks-list li > button { margin-left: auto; }
.changes { display: grid; gap: var(--s2); }
.changes:not([hidden]) + .create { margin-top: var(--s2); border-top: 0; } /* the last song’s line is the rule above the buttons */
.change-block .range-tracks li > input[type="checkbox"] { flex: none; }
.options { border: 0; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 2px; }
.option { display: flex; align-items: center; gap: var(--s2); min-height: 40px; padding: var(--s1) var(--s2); border-radius: 8px; cursor: pointer; }
.option:hover { background: var(--accent-soft); }
.option input { flex: none; }
.option a { margin-left: var(--s1); }
#sync-checks .check { display: block; }
/* Settings: a set of choices */
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.choice legend { padding: 0; margin-bottom: var(--s2); font-size: var(--fs-small); }
.choice label { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; }

/* ---------- Tempo wave ---------- */
.wave-playlists { border: 0; margin: 0; padding: 0; }
.wave-playlists legend { padding: 0; margin-bottom: var(--s2); font-size: var(--fs-small); font-weight: 550; color: var(--muted); }
.wave-playlists .checklist { margin: 0; max-height: 220px; }
.wave-playlists .muted { margin-top: var(--s2); }
.wave-shares { border: 0; margin: var(--s1) 0 var(--s2); padding: 0; }
.wave-shares[hidden] { display: none; }
.wave-shares legend { padding: 0; margin-bottom: 2px; font-size: var(--fs-small); font-weight: 550; color: var(--muted); }
.wave-share-list { list-style: none; margin: var(--s2) 0; padding: 0; display: grid; gap: var(--s2); max-width: 520px; }
.wave-share-list li { display: grid; grid-template-columns: minmax(0, 240px) 96px auto; align-items: center; gap: var(--s2); }
#wave-share-total.off { color: var(--err-text); }
.wave-settings { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: var(--s1) 0; }
.wave-settings .stepper { width: 100%; }
/* Above the chart: the shape (each with a little picture of itself) and mixing in key; the shape's words under them. */
.wave-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin: var(--s4) 0 var(--s1); }
.wave-shape span { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
@media (max-width: 520px) { /* four don't fit in a row on a phone: two by two */
  .wave-shape { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius-sm); }
  .wave-shape span { justify-content: center; }
}
.wave-shape-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wave-in-key { display: inline-flex; align-items: center; gap: var(--s2); }
#wave-shape-about { margin: 0 0 var(--s2); }
/* A clash of keys with the song before: under the artist, where it doesn't take the title's room. */
.wave-clash { justify-self: start; width: fit-content; margin-top: var(--s1); }
/* A dot per song at its tempo, joined by a line, on a few labelled tempo lines (wave.js drawWave). */
.wave-actions { display: flex; margin: var(--s2) 0 0; }
.wave-chart { height: 224px; }
.wave-chart svg { display: block; overflow: visible; }
.wave-grid { stroke: var(--border); stroke-width: 1; }
.wave-tick { fill: var(--muted); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.wave-line { fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linejoin: round; }
.wave-dot { fill: var(--accent); stroke: var(--solid); stroke-width: 2; }
.wave-dot:hover { r: 6; }
.wave-label { fill: var(--muted); font-size: var(--fs-caption); font-weight: 650; font-variant-numeric: tabular-nums; }
.wave-list .bpm { flex-basis: 40px; }
.wave-name-field { flex: 1 1 260px; max-width: 420px; }
.import-file-field { max-width: 420px; }
.import-repeats { display: flex; align-items: center; gap: var(--s2); margin: calc(-1 * var(--s2)) 0 var(--s1); }
.import-repeats[hidden] { display: none; }
.import-list li > input[type="checkbox"] { flex: none; }
.import-line { font-size: var(--fs-small); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-none { font-weight: 600; color: var(--muted); }
.import-choice { flex: none; height: 34px; margin-top: var(--s2); width: auto; max-width: min(100%, 520px); font-size: var(--fs-small); }
.import-list .note { display: flex; align-items: center; gap: var(--s2); }
.import-list .track { flex: 1 1 140px; } /* a song not found keeps its words on a line */
.import-gig { margin: var(--s6) 0 0; padding: var(--s4) 0 0; border: 0; border-top: 1px solid var(--border); }
.import-gig[hidden] { display: none; }
.import-gig legend { float: left; width: 100%; margin-bottom: var(--s2); padding: 0; font-weight: 700; } /* under the line, as the other headings */
.import-gig legend + * { clear: both; }
.import-gig .create { border-top: 0; padding-top: var(--s2); }
.import-gig-date { flex: 0 1 180px; }
.import-gig-start { flex: 0 1 130px; }
.import-service-field { flex: 0 1 160px; }

/* ---------- Home: the summary ---------- */
/* Home: the status line, Needs you, Start something (compact tiles), Lately: on the page, no outer card. */
.home-summary { display: grid; gap: var(--s7); }
.home-summary > .status-line { margin-top: var(--s1); }
#home-connect { margin-bottom: var(--s7); } /* a new user: the connect card, then the tools */
.home-section > h3, .home-section > .section-head h3 { margin: 0 0 var(--s3); font-size: var(--fs-section); }
.home-section > .section-head { margin: 0 0 var(--s3); }
.home-section > .section-head h3 { margin: 0; }
.home-section .tool-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.tool-card-note { font-size: var(--fs-small); color: var(--text); font-weight: 550; }
.tool-card-note:empty { display: none; }
/* Compact tiles: the icon and name on one line, your note under it (the descriptions are on Tools). */
.tool-cards.compact { gap: var(--s3); }
.tool-cards.compact .tool-card { padding: var(--s4) var(--s4); gap: 2px; min-height: 0; }
.tool-cards.compact .tool-card-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 400; }
/* Home's rows are Health's (core.js stateRow), with room for a longer place and a link at the right. */
.tasks-list.home-list li.problem-row { grid-template-columns: 9px minmax(0, 11rem) minmax(0, 1fr) auto minmax(7.5rem, auto); }
.home-row-link { font-weight: 600; white-space: nowrap; justify-self: end; }
.phone-only { display: none; }
@media (max-width: 760px) {
  .not-phone { display: none; }
  .phone-only { display: inline-flex; }
}
.home-summary[hidden] { display: none; }
.home-summary > .card { margin: 0; }

/* ---------- Stats: listening history ---------- */
/* Listening: plays per month as a strip of bars (oldest left), the chosen month in the accent;
   each bar a button. Many months: the strip scrolls sideways. */
.month-figure { margin: var(--s1) 0 var(--s2); }
/* Listening's one row of choices, above everything it scopes. */
.listening-range { margin: 0 0 var(--s2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.listening-range span { white-space: nowrap; }
.month-strip {
  display: flex; align-items: stretch; gap: 2px; height: 134px; padding: 2px 2px 0; overflow-x: auto; scrollbar-width: thin;
}
/* A bar per month above its year (shown under January and the first month): both inside the strip, which clips what sticks out. */
.month-col {
  flex: 1 0 14px; max-width: 24px; height: 100%; padding: 0; border-radius: 4px 4px 0 0;
  display: flex; flex-direction: column; justify-content: flex-end; background: transparent; color: var(--muted); overflow: visible;
}
.month-col:hover:not(:disabled) { background: var(--raised); filter: none; }
.month-col:active:not(:disabled) { transform: none; }
.month-col:focus-visible { outline-offset: 0; }
.month-bar { display: block; width: 100%; height: calc(var(--size, 0) * (100% - 38px)); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--bar); box-shadow: 0 1px 0 var(--border); }
.month-col[aria-pressed="true"] .month-bar { background: var(--accent); }
.month-count { height: 18px; font-size: var(--fs-caption); font-weight: 650; line-height: 18px; color: var(--text); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.month-tick { height: 20px; padding-top: var(--s1); font-size: var(--fs-caption); line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: left; }
.month-figure figcaption { margin-top: var(--s2); }
.month-name { margin: var(--s4) 0 var(--s2); font-size: var(--fs-section); }
/* Patterns: time of day, seasons and trends, one under the other. */
.pattern + .pattern { margin-top: var(--s12); } /* sections apart by space; lines belong to lists */
.pattern > h4 { margin: 0 0 var(--s3); font-size: var(--fs-section); }
.pattern-make { margin-top: var(--s3); }
.pattern-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin-top: var(--s7); }
.pattern > .pattern-list-head:nth-child(2) { margin-top: 0; } /* first in its part: right under the title */
.pattern-list-head h4 { margin: 0; }
.pattern-list-head .home-history-sub { margin: 0; }
.home-history-sub { max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: var(--s1) 0 var(--s2); } /* one row, swiped on a phone */
.home-history-sub::-webkit-scrollbar { display: none; }
.home-history-sub span { white-space: nowrap; }
.home-history-panel h4 { margin: var(--s4) 0 var(--s2); }
.home-gigs { list-style: none; margin: 0 0 var(--s2); padding: 0; border-top: 1px solid var(--border); }
.home-gigs > li { border-bottom: 1px solid var(--border); padding: var(--row-pad) 2px; }
.home-gig-name { font-weight: 650; }
/* A set: the night as a date to scan by, its name and what it is (a button: it opens its songs), ⋯. */
.home-gig { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s4); }
.home-gig-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-left: auto; flex: none; }
.gig-date { flex: none; width: 48px; display: grid; justify-items: center; line-height: 1.1; }
.gig-date-day { font: 700 var(--fs-section)/1 var(--heading-font); }
.gig-date-weekday { font-size: var(--fs-caption); color: var(--muted); }
/* (was .gig-open: the dancers' page has a .gig-open of its own, live.css; class names are global) */
.gig-toggle {
  flex: 1; min-width: 0; min-height: 44px; display: grid; align-content: center; gap: 2px; padding: 0; border: 0; border-radius: 0;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; justify-content: start; height: auto;
}
.gig-toggle:hover .home-gig-name { text-decoration: underline; }
/* It opens and closes the songs: a chevron after the name says which, as on the menus (not a colour). */
.gig-toggle .home-gig-name::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: var(--s2); background: var(--muted);
  -webkit-mask: url(icons/chevron-down.svg) center / contain no-repeat; mask: url(icons/chevron-down.svg) center / contain no-repeat;
}
.gig-toggle[aria-expanded="true"] .home-gig-name::after { -webkit-mask-image: url(icons/chevron-up.svg); mask-image: url(icons/chevron-up.svg); }
/* Home › Get started: the first steps, each with a number (a tick in the accent once done), what it
   is, and the place to do it. */
.first-steps > .section-head { margin: 0 0 var(--s3); }
.first-steps-list { list-style: none; display: grid; gap: var(--s3); margin: 0; padding: 0; }
.first-step { display: flex; align-items: center; gap: var(--s3); }
.first-step-mark {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); font-size: var(--fs-small); font-weight: 700; color: var(--muted);
}
.first-step.done .first-step-mark { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.first-step-text { flex: 1; min-width: 0; display: grid; }
.first-step-title { font-weight: 650; }
.first-step.done .first-step-title { color: var(--muted); font-weight: 400; }
.first-step .go { flex: none; }
@media (max-width: 760px) {
  .first-step { flex-wrap: wrap; }
  .first-step .go { flex-basis: 100%; padding-left: calc(var(--s7) + var(--s3)); } /* under its text, past the number */
  label.inline { white-space: normal; } /* a long one (Admin › People's) wraps instead of overflowing */
}
.first-steps-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin: var(--s4) 0 0; }
/* Help (#help): its contents, then a card per group with its topics; a page's intro ends with its link. */
.help-link { white-space: nowrap; }
.help-contents { columns: 200px 3; column-gap: var(--s6); }
.help-contents > div { break-inside: avoid; padding-bottom: var(--s4); }
.help-contents ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.help-contents-title { margin: 0 0 var(--s1); font-size: var(--fs-small); font-weight: 650; color: var(--muted); }
.help-group, .help-topic { scroll-margin-top: var(--s20); }
.help-group > h3 { margin: 0 0 var(--s4); font-size: var(--fs-section); }
.help-topic + .help-topic { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--border); }
.help-topic h4 { margin: 0 0 var(--s1); font-size: var(--fs-part); }
.help-topic > p.muted { margin: 0 0 var(--s3); }
.help-steps { display: grid; gap: var(--s2); margin: 0; padding-left: var(--s6); }
.help-go { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin: var(--s4) 0 0; }
/* An event's schedule: a quiet heading over each night's slots, as the months over sets. */
.event-night { margin: var(--s6) 0 var(--s1); font-size: var(--fs-part); } /* a night of the schedule, its rooms under it */
.event-room-head { margin: var(--s3) 0 var(--s1); font-size: var(--fs-small); font-weight: 650; color: var(--muted); }
.slot-form .field { flex: 1 1 8rem; } /* the slot's fields share their rows evenly */
/* An event's contest: the room it is danced in, and a division's form (its fields, rounds, the spotlights). */
.contest-room-field { max-width: 20rem; margin-top: var(--s4); }
.division-form .field { flex: 1 1 8rem; }
.division-form > * + * { margin-top: var(--s3); }
.event-heats-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); }
.event-heats-head h3 { margin: 0; }
.heat-warnings { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); color: var(--warn-text); font-weight: 600; }
.heat-song-form .field { flex: 1 1 8rem; }
/* The heat list on paper: only it, light whatever the theme; a division's rounds under its name. */
.heats-print { display: none; }
@media print {
  :root:has(body.print-heats), :root[data-theme]:has(body.print-heats) { color-scheme: light; }
  body.print-heats { background: #fff; }
  body.print-heats > :not(#heats-print) { display: none; }
  body.print-heats #heats-print { display: block; }
  .heats-print h1 { margin: 0 0 var(--s1); font-size: var(--fs-page); }
  .heats-print h2 { margin: var(--s8) 0 var(--s1); font-size: var(--fs-section); break-after: avoid; }
  .heats-print h3 { margin: var(--s4) 0 var(--s2); font-size: var(--fs-part); break-after: avoid; }
  .heats-print p { margin: 0; }
  .heats-print tr { break-inside: avoid; }
  .heats-print table { table-layout: fixed; } /* the columns line up from round to round */
  .heats-print th:nth-child(1) { width: 18%; }
  .heats-print th:nth-child(2) { width: 36%; }
  .heats-print th:nth-child(4) { width: 14%; }
}
/* The months: a quiet heading over each month's sets. */
.gig-month { margin: var(--s6) 0 var(--s1); font-size: var(--fs-small); font-weight: 650; color: var(--muted); }
.gig-month:first-child { margin-top: var(--s2); }
/* A set not ended (quiet now: songs coming in put it on air again): said beside what it is. */
.gig-toggle-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.gig-toggle-badge { padding: 0 var(--s2); border: 1px solid var(--accent-ink); border-radius: 999px; color: var(--accent-ink); font-size: var(--fs-caption); font-weight: 700; line-height: 20px; }
.set-now + .set-now { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--border); }
/* The set on air now, first: its state, name and song; Open DJ view and its pages at the right. */
.set-now { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); }
.set-now-text { flex: 1 1 320px; min-width: 0; display: grid; gap: var(--s1); }
.set-now-text p { margin: 0; }
.set-now h3 { margin: 0; font-size: var(--fs-title); }
.set-now-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.set-now-badge { display: inline-flex; align-items: center; gap: var(--s2); height: 28px; padding: 0 var(--s3); border-radius: 999px; background: var(--accent-soft); font-size: var(--fs-small); font-weight: 700; }
.set-now-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.set-now-song strong { font-weight: 650; }
.set-now-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2) var(--s3); }
.set-now-actions p { margin: 0; }
@media (max-width: 760px) {
  .set-now-actions { flex: 1 1 100%; justify-content: space-between; }
  .set-now-actions > .button { flex: 1 1 100%; }
}
/* An event whose lineup you're on: a quiet line between the set on air and the list. */
.set-coming { margin: var(--s4) 0; padding: var(--s3) var(--s4); border-radius: var(--radius-sm); background: var(--tile); border: 1px solid var(--tile-edge); font-size: var(--fs-small); color: var(--muted); }
.set-coming strong { color: var(--text); font-weight: 650; }
.home-gig-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s3); flex: 1 1 100%; padding: var(--s1) 0; }
.home-gig-field:first-child, .home-gig-field:nth-child(2) { flex: 1 1 200px; } /* the name and the place */
.home-gig-field input { min-width: 0; }
.home-gig-edit-buttons { display: flex; gap: var(--s2); }
/* One line between the sets of a month: none under its last set or under a set's last song. */
#djsets-list .home-gigs { border-top: 0; margin: 0; }
#djsets-list .home-gigs > li:last-child { border-bottom: 0; }
#djsets-list .range-tracks li:last-child { border-bottom: 0; }
#djsets-card > .section-head { margin: 0 0 var(--s2); }
#djsets-card > .section-head h3 { margin: 0; font-size: var(--fs-section); }
#djsets-summary > h3 { margin: 0 0 var(--s2); font-size: var(--fs-section); } /* as Played's, below it */
.row-number { flex: 0 0 2.5ch; color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; text-align: right; }
.home-gig-songs[hidden] { display: none; }

/* ---------- Deduplicate ---------- */
.selection-tools { margin-top: var(--s4); align-items: center; }
.how { margin: var(--s2) 0; }
.how p { margin: var(--s2) 0 0; }
/* Gigs › Select: a tick box before each gig, its buttons out of the way; the bar over the list */
.select-bar { align-items: center; gap: var(--s2) var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.select-bar .select-all { padding-left: 0; }
#djsets-list:not(.selecting) .gig-select { display: none; }
#djsets-list.selecting .home-gig-actions { display: none; }
.gig-select { flex: none; width: 18px; height: 18px; margin: 0 var(--s1) 0 0; }
.select-all { padding-left: var(--s3); display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; }
.stack label.select-all { display: inline-flex; font-weight: 400; color: var(--text); } /* in a dialog's form too: a tick box, not a field's name */
.scope { border: 0; padding: 0; margin: var(--s4) 0 0; display: flex; gap: var(--s4); flex-wrap: wrap; }
.scope legend { padding: 0; margin-bottom: var(--s2); font-size: var(--fs-small); }
.scope label { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; }
.groups { display: grid; gap: var(--s4); margin-top: var(--s4); }
.group { border-radius: var(--radius-sm); padding: var(--s4); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.group h3 { font-size: var(--fs-part); margin-bottom: var(--s2); }
.group .warning { margin: 0 0 var(--s2); }
.group .range-tracks { margin-top: 0; }
.group .range-tracks li:last-child { border-bottom: 0; padding-bottom: 0; }
.group li.remove .song-title > a, .group li.remove .artist { text-decoration: line-through; opacity: .6; } /* ticked: this copy goes; its chips and ▶ stay as they are */
/* Status colours mean status: the kept copy is grey; copies to remove need a look (amber), nothing failed. */

/* ---------- Admin ---------- */
.user-cell { display: inline-flex; align-items: center; gap: var(--s2); }
.tempo-results { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.tempo-results:empty { display: none; }
.tempo-row { border-top: 1px solid var(--border); }
.tempo-row:last-child { border-bottom: 1px solid var(--border); }
.tempo-row-main {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) 88px 96px 82px auto; align-items: center; gap: var(--s1) var(--s4); padding: var(--row-pad) 2px;
}
.tempo-song-name, .tempo-value { display: grid; min-width: 0; }
.tempo-value strong { font: 700 var(--fs-lead)/1.2 var(--heading-font); font-variant-numeric: tabular-nums; }
.tempo-detail { display: grid; gap: var(--s2); margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.tempo-detail p { margin: 0; }
@media (min-width: 761px) { #tempo-search select { flex: 0 1 220px; } } /* on a phone the search stacks (full width) */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin-top: var(--s4); }
.account-head { display: flex; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s2); }
.account-text { display: grid; gap: var(--s2); min-width: 0; }
.account-text .hint { margin: 0; }
.new-link, .recovery-box { margin-top: var(--s4); padding: var(--s4); border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.new-link p { margin: 0 0 var(--s2); }
.plain-list li { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.plain-list .chip { margin-left: var(--s2); }
/* An open invite: who it is for, and by whom until when under it; Revoke at the right. */
.plain-list .invite-row { flex-wrap: nowrap; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.invite-text { flex: 1; min-width: 0; display: grid; }
.invite-row button { flex: none; }

/* ---------- Small screens ---------- */

/* ---- Two-step sign-in ---- */
.auth-card > button.wide { width: 100%; margin-top: var(--s2); }
#app-off button, #app-on button, #recovery button { margin-top: var(--s2); }
.key-list { margin: var(--s2) 0 var(--s3); }
.key-list:empty { display: none; }
.key-item { gap: var(--s1) var(--s3); padding: var(--s2) var(--s3); border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.key-name { font-weight: 600; }
.key-item .muted { flex: 1 1 auto; }
.app-setup { display: grid; gap: var(--s2); justify-items: start; }
.app-setup p { margin: 0; }
.qr { width: 184px; background: var(--paper); border-radius: var(--radius-sm); line-height: 0; }
.qr svg { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.secret { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: var(--fs-small); color: var(--text); overflow-wrap: anywhere; }
.checksum { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: var(--fs-caption); color: var(--muted); overflow-wrap: anywhere; }
.recovery-box p { margin: 0; }
.recovery-list { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--s2) var(--s4); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: var(--fs-body); }
/* A tool's steps: a number and a name above each part (Choose, Review, Make); the setup folds to
   one line once a result shows (core.js foldSetup). */
h3.step-label { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font: 700 var(--fs-small)/1.2 var(--heading-font); color: var(--muted); }
.step-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--raised); color: var(--text); font: 700 var(--fs-small)/1 var(--heading-font);
}
.result .step-label .step-num, .step-current .step-num { background: var(--accent); color: var(--accent-text); }
.step-folded {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s4); padding: var(--s4) var(--s6); /* as the cards: the numbers line up */
  border-radius: var(--radius-sm); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge);
}
.step-folded[hidden] { display: none; }
.step-name { font: 700 var(--fs-small)/1.2 var(--heading-font); color: var(--muted); }
.step-summary { flex: 1 1 240px; min-width: 0; }
.step-folded button { flex: none; }
.create > .step-label { flex: 1 1 100%; margin: 0; } /* a row of its own above the fields */
.import-gig legend .step-label { margin: 0; }
/* Go live: fill a Spotify playlist as you play. A choice in a form, not a field's name: in a row with
   its box, in the text colour (label.: as strong as ".stack label", and after it). */
label.live-playlist { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-body); font-weight: 400; color: var(--text); cursor: pointer; }
label.live-playlist[hidden] { display: none; }
.import-also { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 0; cursor: pointer; }
.import-gig .create.import-playlist { padding-top: var(--s3); }
.import-gig .row.actions { margin-top: var(--s4); }
@media (max-width: 760px) {
  .menu { display: none; }
  .topbar {
      display: flex; align-items: center; gap: var(--s2); position: sticky; top: 0; z-index: 10;
      height: 60px; padding: 0 var(--s2) 0 var(--s4); background: var(--header-bg);
      backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-bottom: 1px solid var(--border);
    }
  .topbar[hidden] { display: none; }
  .topbar-account { margin-left: auto; border-radius: 50%; }
  .topbar-account .avatar { width: 34px; height: 34px; font-size: var(--fs-small); }
  .account-menu.from-topbar { left: auto; right: 12px; top: 64px; bottom: auto; }
  /* The page's name is in the top bar; its heading stays for screen readers. */
  .page-head h2 {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
  .page-head .page-tabs { margin-top: 0; }
  /* The tabs share the row in equal parts, so five fit (Apple's HIG: at most about five on iPhone, equal
     widths, nothing cut off); a still narrower phone can swipe them. */
  .page-tabs { gap: 0; }
  .page-tabs a { flex: 1 1 0; min-width: max-content; justify-content: center; padding: 0 var(--s1); font-size: var(--fs-small); }
  /* The places along the bottom, clear of the phone's home bar. */
  .tabbar {
      display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
      padding: 0 var(--s1) env(safe-area-inset-bottom); background: var(--header-bg);
      backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-top: 1px solid var(--border);
    }
  .tabbar[hidden] { display: none; }
  .tool-cards, .home-section .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); } /* two side by side, on Home and Tools */
  /* Your work going on: a strip just above the tab bar; the message above that. */
  .activity-phone:not([hidden]) {
      display: grid; grid-template-columns: 1fr auto; position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar) + 6px); z-index: 24;
      margin: 0; background: var(--solid); box-shadow: var(--shadow);
    }
  .activity-phone .activity-bar { grid-column: 1 / -1; grid-row: 2; }
  .toast { left: 16px; right: 16px; bottom: calc(var(--tabbar) + 12px); max-width: none; }
  body:has(#player:not([hidden])) .toast { bottom: calc(var(--tabbar) + 150px); }
  .tabbar a {
      flex: 1 1 0; min-width: 0; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1);
      color: var(--muted); font-size: var(--fs-caption); font-weight: 650; text-decoration: none;
    }
  .tabbar a.active { color: var(--accent-ink); }
  .tabbar .menu-icon { width: 22px; height: 22px; }
  html:has(#player:not([hidden])) { scroll-padding-bottom: calc(var(--tabbar) + 150px); }
  .page-head { margin: var(--s4) 0 var(--s4); }
  .auth-card { padding: var(--s6); }
  .result { padding: var(--s5) var(--s4); margin: var(--s4) 0 0; } /* as the cards on a phone */
  .step-folded { padding: var(--s3) var(--s4); }
  .listen { padding-left: 0; }
  .check-text { flex-basis: 160px; }
  .check-actions { flex: 1 1 100%; flex-wrap: wrap; }
  .check-actions .stepper { flex: 1 1 100%; } /* its own line: the two buttons stay a pair */
  .tempo-map { height: 200px; gap: var(--s1); }
  .tempo-range .level { height: calc(var(--size, 0) * 140px); }
  .tempo-range .count { font-size: var(--fs-body); }
  .tempo-range .axis { font-size: var(--fs-caption); }
  .range-tracks .note { max-width: 40%; font-size: var(--fs-caption); } /* the list's own note stays, smaller */
  /* A song's state on a line of its own, at the right: the song's name gets the row's width. */
  .import-list li { flex-wrap: wrap; row-gap: var(--s1); }
  .import-list .note { display: flex; flex-direction: column; align-items: flex-end; }
  .import-list .note:not(:empty) { flex-basis: 100%; max-width: none; }
  .import-list .note .chip { white-space: nowrap; font-size: var(--fs-caption); }
  /* Deduplicate: the song gets the row's width; whether it is kept goes under it, at the right
       (where it is in the playlist is left out, as in a narrow table). */
  .group { padding: var(--s3) var(--s2); } /* its rows nearly as wide as the other lists' */
  .dup-list li { flex-wrap: wrap; row-gap: var(--s1); }
  .dup-list .track { flex: 1 1 calc(100% - 160px); }
  .dup-list .note { display: none; }
  .dup-list li > .chip { margin-left: auto; }
  /* Set prep's six filters: on two lines, none out of sight. */
  .setprep-filter { flex-wrap: wrap; overflow-x: visible; border-radius: var(--radius-sm); }
  /* Broken songs: the song keeps the row, why and what happens to it under it. */
  .broken-list li { flex-wrap: wrap; row-gap: var(--s1); }
  .broken-list .track { flex: 1 1 calc(100% - 160px); }
  .broken-list .note { flex: 1 1 100%; text-align: left; }
  .broken-list li > .chip { margin-left: auto; }
  .tempo-row-main { grid-template-columns: 32px minmax(0, 1fr) auto auto; } /* ▶, song, tempo, Edit on one line; the song gets the room */
  .tempo-song-name strong, .tempo-song-name .muted { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .tempo-fix { grid-column: 2 / -1; grid-row: 2; }
  .tempo-energy, .tempo-fix:empty { display: none; }
  /* The song fills the first row (after ▶, the tempo and the artwork); where it goes and its
       buttons share the second, under the tempo. */
  .all-list .track { flex: 1 1 calc(100% - 216px); }
  .all-list .where { flex: 1 1 0; order: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); padding-left: var(--s14); text-align: left; }
  .all-list .note { display: block; text-align: left; }
  .all-list .where .chip { white-space: nowrap; }
  .row-tools { min-width: 0; order: 4; }
  .player {
      /* Floating above the page with room all around, clear of the phone's home bar */
      bottom: calc(10px + var(--tabbar)); width: calc(100% - 32px); margin-bottom: calc(var(--s2) + var(--tabbar));
      gap: var(--s2) var(--s2); padding: var(--s3) var(--s4); border-radius: 24px;
      grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "track controls close" "progress progress progress" "source source source" "facts facts facts" "notes notes notes" "next next next";
    }
  /* The song facts on one line you swipe sideways, fading out at the edges (a mask: only its
       transparency counts, not its colour) */
  .player-facts {
      flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
      margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4) var(--s7);
      -webkit-mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 28px), transparent);
      mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 28px), transparent);
    }
  .player-facts::-webkit-scrollbar { display: none; }
  .player-facts li { flex: none; white-space: nowrap; }
  .key-chart { --key-label: 48px; } /* the twelve columns get the room */
  .key-chart-col.mixes .key-chart-count { visibility: hidden; } /* a phone: no room for four counts side by side; the line under the chart says them */
  .home-tempo-axis .phone-skip { visibility: hidden; } /* barChart's thin: every other label, never the tallest bar's */
}

/* ---------- Library ---------- */
/* The search, filter and count, then the column names, stay put while the list scrolls: pinned
   under the top bar (on a phone), across the card's full width, on the card's colour. */
.library-head {
  position: sticky; top: var(--sticky-top); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4);
  margin: 0; padding: var(--s3) 0; background: var(--bg); /* pinned over the list: opaque, as the page */
}
.library-head input[type="search"] { flex: 1 1 160px; min-width: 0; }
.library-head select { flex: 0 0 auto; width: auto; }
.library-head select[hidden] { display: none; }
.library-head p { margin: 0; flex: 1 1 100%; }
#library-note:not([hidden]) + .library-head { margin-top: 0; }
.library-wrap { margin: 0; }
.library-table th {
  position: sticky; top: calc(var(--sticky-top) + var(--library-head, 0px)); z-index: 4;
  background: var(--bg); border-bottom: 0; box-shadow: inset 0 -1px var(--border);
}
.library-table th:first-child, .library-table td:first-child { padding-left: var(--s1); }
.library-table th:last-child, .library-table td:last-child { padding-right: var(--s1); }
.library-table th.num { text-align: right; }
/* A column the list can be sorted on: the name is a button, the arrow says which way. */
.sort-button {
  all: unset; cursor: pointer; border-radius: 4px; color: inherit; font: inherit;
}
.sort-button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; } /* says it can be clicked */
.sort-button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
th[aria-sort="ascending"] .sort-button, th[aria-sort="descending"] .sort-button { color: var(--text); }
th[aria-sort="ascending"] .sort-button::after { content: " ↑"; }
th[aria-sort="descending"] .sort-button::after { content: " ↓"; }
.library-table td { white-space: normal; }
.library-table td.nowrap { white-space: nowrap; }
/* With one service connected, the Service column says nothing: left out. */
.library-table.one-service .service-col, .library-table.no-created .created-col { display: none; }
/* What the columns left out on a phone say, under the name: only there. */
.library-name-text { display: grid; min-width: 0; }
.library-title-line { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.library-title-line > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-title-line .chip { flex: none; padding: 0 var(--s2); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; } /* a song's tempo, as in the song rows */
.phone-sub { display: none; font-size: var(--fs-small); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-sort-phone { display: none; }
.library-sort-phone .row-menu-list { left: auto; right: 0; }
.library-sort-phone summary::after { content: none; } /* the arrow beside the column says the way */
.library-sort-phone .row-menu-list button.active { color: var(--accent-ink); }
/* An iPad held upright: the songs' Album and Length are left out (seven columns made the page scroll sideways). */
@media (max-width: 900px) { .library-table .roomy { display: none; } }
@media (max-width: 760px) { /* the card's padding is 18px there */
  .library-table .opt { display: none; }
  /* A two-line list: the name, and under it what the columns said; no column names, a sort button instead. */
  .library-table thead { display: none; }
  .phone-sub { display: block; }
  .library-sort-phone { display: inline-block; flex: none; order: 2; } /* on the count's line, at the right */
  .library-head p { flex: 1 1 60%; order: 1; } /* too wide for the first row: the second, beside the sort button */
  .library-head input[type="search"] { flex: 1 1 100px; }
  .library-table td:has(.library-name) { max-width: 0; width: 100%; } /* the name cell takes the room; its lines are shortened */
  /* A playlist, album or artist opens here: the whole row is its link, with a chevron to say so. */
  .library-table tr:has(a[href^="#library/"]) { position: relative; }
  .library-table .library-name a[href^="#library/"]::after { content: ""; position: absolute; inset: 0; }
  .library-name:has(a[href^="#library/"])::after {
      content: ""; flex: none; width: 16px; height: 16px; margin-left: auto; padding-left: var(--s2); background: var(--muted);
      -webkit-mask: url(icons/chevron-right.svg) right center / 16px no-repeat; mask: url(icons/chevron-right.svg) right center / 16px no-repeat;
    }
  .library-name-text { flex: 1 1 auto; }
}
.library-table td:first-child { width: auto; }
.library-table a { font-weight: 600; text-decoration: none; }
.library-table a:hover { text-decoration: underline; }
#library-more { margin-top: var(--s3); }
.library-problems { margin-bottom: var(--s4); } /* a check that failed: above the pinned head */
/* Service names in the text colour: Spotify allows its green only on black or white, and no other greens. */
.cover {
  flex: none; display: inline-block; width: 40px; height: 40px; overflow: hidden;
  border-radius: 6px; background: var(--raised); vertical-align: middle;
}
.cover.round { border-radius: 50%; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-large { width: 64px; height: 64px; border-radius: 10px; }
.library-name { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.library-table td { padding-top: var(--s2); padding-bottom: var(--s2); }
.library-item-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s1); }
.library-item-head p { margin: 0; }
.library-albums li { display: flex; align-items: center; gap: var(--s3); }
.library-back { display: inline-flex; align-items: center; gap: 2px; margin-bottom: var(--s2); font-size: var(--fs-small); }
.library-back::before {
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url(icons/chevron-left.svg) center / contain no-repeat; mask: url(icons/chevron-left.svg) center / contain no-repeat;
}
.library-back[hidden] { display: none; }
@media (max-width: 760px) { .library-back { display: none; } } /* the top bar has the back link there */
#library-item h3 { margin: 0 0 var(--s1); font-size: var(--fs-section); font-weight: 800; }
#library-item h4 { margin: var(--s5) 0 var(--s2); }

/* ---------- Admin: background tasks ---------- */
:where(#tasks-admin) h3 { margin: var(--s6) 0 var(--s2); } /* 20px, as every section (above); :where, so a part's own heading (.section-head h3) wins */
#tasks-figures { margin: var(--s1) 0 0; }
#tasks-pace { margin: -2px 0 var(--s2); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin: var(--s6) 0 var(--s2); }
.section-head h3 { margin: 0; }
.section-head + .muted { margin: 0 0 var(--s2); }
.tasks-list, .about-services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.tasks-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: var(--row-pad) 2px; border-bottom: 1px solid var(--border); }
.tasks-list .chip { flex: none; min-width: 72px; text-align: center; }
.tasks-list li.task-row { flex-wrap: nowrap; align-items: baseline; }
.task-error { color: var(--err-text); overflow-wrap: anywhere; }
.task-stuck { color: var(--warn-text); font-weight: 600; }
.task-what .progress { margin: var(--s2) 0 2px; max-width: 420px; }
.state-dot.run { box-shadow: inset 0 0 0 3px var(--accent-ink); } /* a ring: not the solid red of a failure */
.state-dot.wait { box-shadow: inset 0 0 0 1.5px var(--muted); }

/* ---------- Admin: status ---------- */
.menu-count { margin-left: var(--s2); min-width: 20px; padding: 0 var(--s2); border-radius: 999px; background: var(--err-bg); color: var(--err-text); font-size: var(--fs-caption); font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.menu-count[hidden] { display: none; }
.menu-count.tasks-count { background: var(--accent-soft); color: var(--text); } /* work going on, not a problem; the text colour: accent ink on the soft tint is 4.2:1 in light mode */
#status-admin h3 { margin: var(--s6) 0 var(--s2); }
/* Is all well, and the backups: one line at the top. */
.status-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s7); }
.status-line p { margin: 0; }
.status-summary { display: inline-flex; align-items: baseline; gap: var(--s2); font: 700 var(--fs-lead)/1.3 var(--heading-font); }
.status-summary.ok { color: var(--ok); }
.status-summary.problems { color: var(--text); } /* the dot is red; the sentence stays readable, not a red sentence */
.status-backups { color: var(--muted); }
.status-backups.err { color: var(--err-text); font-weight: 600; }
.status-backups.warn { color: var(--warn-text); }
/* A problem: dot, place, what failed and its message, when, and its action. A phone puts when and the
   action under the message, on one line. */
.tasks-list li.problem-row { display: grid; grid-template-columns: 9px minmax(0, 9.5rem) minmax(0, 1fr) auto 7.5rem; grid-template-areas: "dot place what when action"; align-items: baseline; gap: var(--s1) var(--s4); }
.problem-row > .state-dot { grid-area: dot; }
.problem-place { grid-area: place; font-weight: 600; overflow-wrap: anywhere; }
.problem-row > .task-what { grid-area: what; }
.problem-when { grid-area: when; text-align: right; }
.problem-row > button, .problem-row > a, .problem-action { grid-area: action; justify-self: end; margin: 0; }
/* Gigs › Bridges: Pause and the ⋯ of one of your bridges, side by side in the action's place */
.problem-row > .bridge-actions { grid-area: action; justify-self: end; display: inline-flex; align-items: center; gap: var(--s2); }
.problem-message { overflow-wrap: anywhere; }
/* Up to an iPad held upright: the place and when on the first line, the message under it with the room. */
@media (max-width: 900px) { .tasks-list li.problem-row, .tasks-list.home-list li.problem-row { grid-template-columns: 9px minmax(0, 1fr) auto; grid-template-areas: "dot place when" ". what action"; } }
@media (max-width: 640px) {
  .tasks-list li.problem-row, .tasks-list.home-list li.problem-row { grid-template-columns: 9px minmax(0, 1fr) auto; grid-template-areas: "dot place place" ". what what" ". when action"; }
  .problem-when { text-align: left; }
}
.status-limits { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.status-limits th, .status-limits td { padding: var(--s2) var(--s3) var(--s2) 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--border); white-space: nowrap; }
.status-limits thead th { color: var(--muted); font-weight: 550; font-size: var(--fs-small); border-top: 1px solid var(--border); }
.status-limits td.limit-advice { white-space: normal; min-width: 16rem; }
.status-limits .limit-advice.warn { color: var(--warn-text); }
/* A phone: each service a short block, the column's name before each value. */
@media (max-width: 640px) {
  .status-limits thead { display: none; }
  .status-limits tr { display: block; padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
  .status-limits th, .status-limits td { display: block; padding: 2px 0; border: 0; white-space: normal; }
  .status-limits td.limit-advice { min-width: 0; }
  .status-limits td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
#status-fixed-part { margin-top: var(--s4); }
/* Settings › Services: the export's file field, a little apart from the text above it. */
.history-file-field { margin-top: var(--s4); max-width: 560px; }

/* ---------- About ---------- */
/* The services, one row each: the name, what it is for, what it is sent and its terms. */
.about-services > li { padding: var(--row-pad) 2px; border-bottom: 1px solid var(--border); }
.about-services p { margin: 0 0 var(--s1); }
.about-services p:last-child { margin-bottom: 0; }
/* A card heading's mark: the services' logos and the Gigs mark, one size. */
.home-card-head h3 .menu-icon { width: 24px; height: 24px; }
/* A service named as a heading on About: its mark before its name, as on Overview and Settings. */
.about-services h4 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s1); }
.about-services h4 .service-icon { margin: 0; width: 22px; height: 22px; }
/* On a phone a row of four figures is 2 + 2 (three stay in one row). */
@media (max-width: 760px) { .home-figures:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Admin › Tempos: the line to ask FreqBlog about the rest, under the search. */
.tempo-freqblog { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s2) 0 0; }
.tempo-freqblog button { margin-left: auto; } /* at the row's right end, as every row's action */
/* A sync's row: an automatic sync that was held, or failed, in its colour. */
.pair-warn { color: var(--warn-text); }
.pair-error { color: var(--err-text); }
/* The schedule dialog: the four choices under each other (the first is a sentence). */
.schedule-every { display: grid; gap: 0; }
/* Off: the when and the note keep their place, unseen, so the dialog doesn't jump under the pointer. */
#schedule-form.off .schedule-when, #schedule-form.off #schedule-note { visibility: hidden; }
/* What happens on removal: the three choices under each other, each with what it means. */
.removal-choices { display: grid; gap: var(--s1); }
.removal-choices legend { font-size: var(--fs-small); font-weight: 550; color: var(--muted); }
.removal-choices label { align-items: flex-start; min-height: 0; padding: var(--s2) 0; font-weight: 400; color: var(--text); }
.removal-choices .choice-text > :first-child { font-weight: 600; }
.removal-choices input { margin-top: var(--s1); }
.removal-choices .choice-text { display: grid; gap: 2px; }
/* The review's buttons stacked on a phone: the primary first. */
@media (max-width: 760px) { #sync-apply { order: -1; } }
@media (max-width: 760px) { /* the open sync row: its ⋯ alone would take a line, so it sits on the route's */
  .pair.open { position: relative; }
  .pair.open > .pair-actions { position: absolute; right: 2px; top: var(--row-pad); }
  .pair.open .pair-route { padding-right: var(--s14); }
}

/* ---------- Live gigs in the app ---------- */
/* Go live: the date and start time side by side. */
.live-when { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
/* A live gig's recap on Gigs, above its songs; the dancers through the night as the setlist's tempo. */
.gig-recap { margin: var(--s1) 0 var(--s4); padding: var(--s4) var(--s4); border-radius: var(--radius); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-edge); }
.gig-recap h3 { margin: 0 0 var(--s2); font-size: var(--fs-part); }
.gig-recap p { margin: 0 0 var(--s2); }
.gig-recap-figure { width: min(100%, max(160px, calc(var(--bars) * 18px))); margin: var(--s2) 0 var(--s3); } /* as wide as its bars: the times under the first and last */
.gig-recap-bars { display: flex; align-items: flex-end; gap: 2px; height: 56px; border-bottom: 1px solid var(--field-border); }
.gig-recap-bar { flex: 1; min-width: 2px; height: max(2px, calc(var(--size) * 100%)); border-radius: 2px 2px 0 0; background: var(--bar); }
.gig-recap-bar.peak { background: var(--accent); }
.gig-recap-axis { display: flex; justify-content: space-between; margin-top: var(--s1); font-size: var(--fs-caption); color: var(--muted); }
.gig-recap-loved { margin: 0 0 var(--s2); padding-left: 0; list-style: none; display: grid; gap: var(--s1); }
.gig-recap-days summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: var(--fs-small); }
/* Gigs › a live gig's songs: what each was found as, under its artist; a maybe with its check. */
.live-founds { display: flex; flex-wrap: wrap; gap: 2px var(--s4); font-size: var(--fs-small); }
.live-found { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.live-found a { white-space: nowrap; } /* "On TIDAL" in one piece */
.track .live-found a { text-decoration: underline; text-underline-offset: 2px; } /* a link, not a state ("Not on TIDAL" isn't one) */
.live-maybe { color: var(--warn-text); flex-basis: 100%; }
.live-check { display: inline-flex; gap: var(--s2); }
.live-check button { white-space: nowrap; }
/* A maybe: a line of its own; its songs to choose from one per line, each with its That's it. */
.live-option { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s2); }
.live-option a { white-space: normal; }
.live-option button, .live-maybe > .live-check { flex: none; }
.live-songs li.live-hidden .song-title > span:first-child { color: var(--muted); }

/* ---------- Spotify access (Admin › People; Settings › Services) ---------- */
.spotify-people { margin: var(--s2) 0 var(--s1); }
.spotify-changes { margin-top: var(--s4); }
.spotify-changes h4 { margin-top: 0; }
.spotify-changes .row { margin-top: var(--s2); }
.spotify-change { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); padding: var(--s1) 0; overflow-wrap: anywhere; }
.spotify-change .chip { min-width: 64px; text-align: center; }
.spotify-email { display: grid; gap: var(--s2); margin-top: var(--s4); max-width: 560px; }
.spotify-email p, .spotify-email h4 { margin: 0; } /* a part of Connected services, with its heading (the grid spaces them) */
.spotify-email input { flex: 1 1 240px; min-width: 0; }
/* The set card (js/setcard.js): the canvas at its own shape, as high as the window allows */
.card-dialog canvas { display: block; width: auto; height: min(62vh, 640px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---- Events: an event with rooms (js/events.js) ---- */
/* Rows of events, rooms and DJs: the name takes the room, the action stays on its line. */
.events-list li { flex-wrap: nowrap; }
.events-list li > .task-what { flex: 1; min-width: 0; }
.events-list .task-what a { white-space: nowrap; } /* a room's Venue screen link */
.events-list li > :last-child { margin-left: auto; flex: none; }
.events-list .row { flex: 1; } /* a room's Rename form */
/* Sets: a row per set (its line and Songs), its songs opening under it */
.event-sets-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.event-sets-list > li { padding: var(--row-pad) 2px; border-bottom: 1px solid var(--border); }
.event-set-line { display: flex; align-items: center; gap: var(--s3); }
.event-set-line > :first-child { flex: 1; min-width: 0; }
.event-set-songs { margin: var(--s2) 0 0; }
.event-set-songs[hidden] { display: none; }
.event-room-now > .state-dot { margin-right: var(--s2); } /* Overview: who plays in the room now; inline, by its first line */
/* The event's head: its name and days, Edit details beside; editing, the form takes its place. */
.event-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3) var(--s4); }
.event-head > div { flex: 1 1 16rem; } /* a phone: Edit details under the name, not squeezed beside it */
.event-head p { margin: 0; }
.event-head .event-page-line { margin-top: var(--s2); overflow-wrap: anywhere; }
.event-head > button { white-space: nowrap; }
.event-edit { display: grid; gap: var(--s5); }
.event-edit-buttons, .event-edit-save { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.event-edit-buttons { justify-content: space-between; gap: var(--s4); }
#event-page label.inline { white-space: normal; } /* Dancers see it, DJs on the lineup can add …: wrap on a phone */
/* A list's add form: apart from the list above it. */
.list-add { margin-top: var(--s4); }
