:root {
  --mo-accent: #2c7a7b;                  /* teal — music/album semantic color */
  /* Bird palette + role accent — OPERATOR (dev) defaults: warm (Looner).
     spec-musicorgan-operator-player-organ-banner. .mo-player overrides below.
     Role (warm/cool) drives the accent + bird palette only; surfaces come from
     the tokens below. */
  --mo-bird-body: #ff905f;
  --mo-bird-shade:#e76a39;               /* deeper tone */
  --mo-bird-tint:  #ffaf8f;
  --mo-bird-accent:#4aa3ff;              /* opposite-hue accent */
  --mo-bird-eye:  #ffffff;
  --mo-bird-pupil:#2b3b47;
  --mo-role-accent: #ff8c42;             /* warm — Operator */

  /* ===== Style system — semantic tokens (spec-musicorgan-style-system) =====
     LIGHT ONLY (Kris 2026-11-02): one theme. Every bespoke color in this sheet
     should reference a token; no new raw hex outside this block. */
  --mo-surface:    #f6f8fb;              /* page background */
  --mo-surface-2:  #ffffff;              /* cards / elevated panels */
  --mo-surface-3:  #eef2f7;             /* inset / row hover */
  --mo-border:     #d8e0ea;
  --mo-text:       #1a202c;
  --mo-text-muted: #5b6b7f;
  --mo-banner-bg:    linear-gradient(#ffffff, #eef2f7);
  --mo-banner-text:  #1a202c;
  --mo-banner-muted: #5b6b7f;
  --mo-cta-bg:       #ffffff;            /* LIGHT cta button — not a dark fill */
  --mo-cta-text:     #1a202c;
  --mo-cta-border:   #cbd5e0;
  --mo-cta-hover-bg: #eef2f7;
  --mo-stage-bg:     #eef2f7;            /* now-playing stage */
  --mo-stage-text:   #1a202c;
  --mo-stage-muted:  #5b6b7f;
  --mo-text-faint:   #a0aec0;            /* id chips, quiet captions */
  --mo-accent-tint:  #e6f0f0;            /* accent-washed table head */
  --mo-warn-tint:    #fff3cd;            /* highlighted column head */
  --mo-sig-teal:     #0d9488;            /* provenance / state badges */
  --mo-sig-amber:    #d97706;
  --mo-sig-violet:   #7c3aed;
  --mo-amber-deep:   #b45309;            /* folders-to-empty / magnet icon */
  --mo-cardinal:     #c41e3a;            /* the cleanup cardinal */
  /* ONE card shape: --mo-card-radius and --mo-card-shadow are defined once, in foundation.css
     (Design System fold); every card and panel here takes them. Pills, round avatars, icon tiles
     and the player's own shapes keep their own. */
}
/* PLAYER (Fly public read-only, King Fisher): cool/blue palette + accent. Role only — no
   banner or surface color here (that lives in the tokens above). */
.mo-player {
  --mo-bird-body: #5aa9ff;
  --mo-bird-shade:#2f7fd6;               /* deeper tone */
  --mo-bird-tint:  #9fccff;
  --mo-bird-accent:#ff8a4c;              /* opposite-hue accent */
  --mo-bird-eye:  #ffffff;
  --mo-bird-pupil:#16263a;
  --mo-role-accent: #38bdf8;             /* cool — Player */
}
body { background: var(--mo-surface); color: var(--mo-text); }
.navbar-brand i { color: var(--mo-accent); }
/* banner text reads from theme tokens (we drop Bootstrap's navbar-dark) */
.mo-banner .navbar-brand, .mo-banner .navbar-brand .fw-bold,
.mo-banner .nav-link, .mo-banner .navbar-toggler { color: var(--mo-banner-text); }
.mo-banner .navbar-toggler { border-color: var(--mo-border); }

/* ---- banner + role badge ---- */
.mo-banner { background: var(--mo-banner-bg); }
.mo-role-badge {
  display:inline-flex; align-items:center; gap:.3rem;
  font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  padding:.12rem .55rem; border-radius:1rem; margin-left:.55rem; color:#fff;
  background: var(--mo-role-accent); border:1px solid rgba(255,255,255,.28);
  white-space:nowrap;
}

/* ---- operator catalog switcher (spec-musicorgan-operator-catalog-switcher) ---- */
/* A compact navbar selector sitting beside the role badge: shows the ACTIVE
   catalog's label; the dropdown lists the operator's choices grouped by archive,
   with the active one checked. Operator-only (the includer guards on !read_only). */
.mo-catalog-switch .dropdown-toggle {
  font-size:.72rem; font-weight:600; max-width:14rem;
  border-color: var(--mo-border); color: var(--mo-banner-text);
}
.mo-catalog-switch .mo-catalog-active-label {
  max-width:9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.mo-catalog-menu { max-height:70vh; overflow-y:auto; min-width:16rem; }
.mo-catalog-menu .dropdown-item.active,
.mo-catalog-menu .dropdown-item.active:focus {
  background: var(--mo-role-accent); color:#fff;
}
.mo-catalog-menu form { display:block; }

/* ---- the role's bird: brand lockup + home hero (Aviary SPRING, wave W2) ----
   King Fisher fronts the Player and Looner the Operator, drawn by the aviary tag
   (animated SVG, still twin for reduced motion). Only the size lives here. */
.mo-brand-bird { width: 2.6rem; height: 2.6rem; display:block; }
/* hero variant on the home dashboard: large, centered, soft drop shadow */
.mo-hero-bird-img { width: clamp(8rem, 22vw, 13rem); height: auto; display:block;
  margin-inline:auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,.18)); }
.mo-role-badge--hero { font-size:.8rem; padding:.3rem .85rem; margin-left:0; }

/* ---- organ manual: large black & white keys, hover-depress ---- */
/* navbar-expand-lg forces flex-wrap:nowrap at >=992px, which squeezed the keys
   onto the content row. Make the sticky banner a plain BLOCK stack instead:
   the inner .container-fluid keeps Bootstrap's own display:flex (brand/search
   row), and .mo-keys + #mo-progress fall below it full-width. A block sticky
   element avoids the flex-direction:column + position:sticky resize glitch
   (banner drifting down, whitespace above). */
.mo-banner.navbar { display: block; }
/* no hamburger (spec-musicorgan-banner-no-hamburger): the banner row stays inline
   at every width, so let it wrap on narrow screens instead of overflowing. */
.mo-banner > .container-fluid { flex-wrap: wrap; row-gap: .3rem; }
.mo-keys { position: relative; width: 100%; height: 24px; user-select: none; border-top: 2px solid var(--mo-role-accent); }
.mo-keys-white { display: flex; height: 100%; }
.mo-key-w {
  flex: 1 1 0; background: linear-gradient(#fff, #ededed);
  border-right: 1px solid #b9b9b9; border-bottom: 2px solid rgba(0,0,0,.28);
  transform-origin: top; transition: transform .08s ease, background .08s ease;
}
.mo-key-w:last-child { border-right: 0; }
.mo-key-w:hover { background: linear-gradient(var(--mo-role-accent), #fff); transform: scaleY(.9); border-bottom-width: 1px; }
.mo-keys-black { position: absolute; inset: 0 0 auto 0; height: 62%; pointer-events: none; }
.mo-key-b {
  position: absolute; top: 0; width: 4.3%; height: 100%;
  background: linear-gradient(#3a3a3a, #050505); border-radius: 0 0 3px 3px;
  box-shadow: 0 2px 2px rgba(0,0,0,.5); pointer-events: auto;
  transform-origin: top; transition: transform .08s ease, background .08s ease;
}
.mo-key-b:hover { background: linear-gradient(var(--mo-role-accent), #1a1a1a); transform: scaleY(.88); }
.mo-key-b:nth-child(1) { left: 4.99%; }
.mo-key-b:nth-child(2) { left: 12.14%; }
.mo-key-b:nth-child(3) { left: 26.42%; }
.mo-key-b:nth-child(4) { left: 33.56%; }
.mo-key-b:nth-child(5) { left: 40.71%; }
.mo-key-b:nth-child(6) { left: 54.99%; }
.mo-key-b:nth-child(7) { left: 62.14%; }
.mo-key-b:nth-child(8) { left: 76.42%; }
.mo-key-b:nth-child(9) { left: 83.56%; }
.mo-key-b:nth-child(10){ left: 90.71%; }
.table-hover tbody tr:hover { background: #f0fbfb; }
.count-badge { font-variant-numeric: tabular-nums; }

/* htmx in-flight bar under the navbar */
.mo-progress { height: 2px; background: transparent; }
.mo-progress.htmx-request { background: linear-gradient(90deg, var(--mo-accent), #4fd1c5); animation: mo-pulse 1s ease-in-out infinite; }
@keyframes mo-pulse { 0%,100% { opacity:.4 } 50% { opacity:1 } }

/* ---- persistent player bar (now a static row inside the sticky top header) ---- */
.mo-topbar { z-index: 1030; background: var(--mo-surface); }  /* banner + Now Playing pin together at top; OPAQUE so the scrolling list never bleeds through (spec-musicorgan-now-playing-opaque-header) */
/* top-of-list == bottom of the player: any scrollIntoView/anchor jump lands the
   target BELOW the sticky header, not hidden behind the Now-Playing widget.
   --mo-topbar-h is measured live in mo-player.js (trackTopbarHeight). */
html { scroll-padding-top: var(--mo-topbar-h, 0px); }
/* now-playing stage — scoped to #mo-player so these layout/color rules never
   bleed onto body.mo-player (the role class shares the name). Themed via stage
   tokens; the dark-stage utility classes inside are re-skinned just below. */
#mo-player {
  background: var(--mo-stage-bg); color: var(--mo-stage-text);
  min-height: 20vh; display: flex; flex-direction: column; justify-content: center;
  gap: .35rem; padding-block: .6rem;
}
/* re-skin the player bar's Bootstrap light-outline utilities through tokens
   without editing the template's utility classes. */
#mo-player .btn-outline-light { color: var(--mo-stage-text); border-color: var(--mo-border); }
#mo-player .btn-outline-light:hover, #mo-player .btn-outline-light:focus-visible {
  background: var(--mo-role-accent); border-color: var(--mo-role-accent); color: #fff;
}
#mo-player .text-light { color: var(--mo-stage-text) !important; }
#mo-player .text-secondary { color: var(--mo-stage-muted) !important; }
.mo-player-stage { width: 100%; }
/* big control satellites around the now-playing portlet */
.mo-pbtn { font-size: 1.5rem; line-height: 1; padding: .35rem .6rem; border-radius: .6rem; }
.mo-pbtn-lg { font-size: 2.4rem; padding: .2rem .75rem; border-radius: 50%; }
.mo-pbtn .badge { font-size: .6rem; }
/* now-playing portlet (centre): big art + big title */
.mo-portlet { min-width: 0; max-width: 42vw; cursor: pointer; }
.mo-portlet-art { height: clamp(72px, 13vh, 132px); width: clamp(72px, 13vh, 132px); object-fit: cover; background:#e6fffa; }
.mo-portlet-title { font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.mo-portlet-sub { font-size: 1.05rem; }
.mo-status-line { font-size: .82rem; opacity: .85; }
/* THE single control bar (spec-musicorgan-single-unified-player-transport):
   headless engine renders nothing; the transport + scrubber + time + volume ARE
   its UI. The native <audio controls> bar (the old "second player") is gone. */
.mo-audio-headless { display: none; }
/* full-width scrubber row under the stage */
#mo-player .mo-seek {
  flex: 1 1 auto; width: auto; min-width: 120px; max-width: none;
  height: 6px; accent-color: var(--mo-role-accent); cursor: pointer; margin: 0;
}
/* The track is drawn by us so it can show two shares: played (accent) and loaded (lighter). mo-player.js
   writes --mo-seek-played and --mo-seek-loaded; the thumb stays the browser's own, tinted by accent-color. */
#mo-player .mo-seek { --mo-seek-played: 0%; --mo-seek-loaded: 0%; }
#mo-player .mo-seek::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right,
    var(--mo-role-accent) 0 var(--mo-seek-played),
    rgba(26, 32, 44, .22) var(--mo-seek-played) var(--mo-seek-loaded),
    rgba(26, 32, 44, .1) var(--mo-seek-loaded) 100%);
}
#mo-player .mo-seek::-webkit-slider-thumb { margin-top: -5px; }
#mo-player.mo-thin .mo-seek::-webkit-slider-runnable-track { height: 4px; }
#mo-player.mo-thin .mo-seek::-webkit-slider-thumb { margin-top: -6px; }
#mo-player .mo-seek::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(26, 32, 44, .1); }
#mo-player .mo-seek::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--mo-role-accent); }
.mo-player-controls { position: relative; }
.mo-seek-tip {
  position: absolute; bottom: 100%; transform: translateX(-50%); pointer-events: none; z-index: 2;
  padding: .1rem .4rem; border-radius: .25rem; background: #212529; color: #fff;
  font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mo-time { font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
/* LEFT zone: transport stacked over volume; the slider fills the transport width */
.mo-player-center { min-width: 0; }      /* let the card title truncate inside flex */
#mo-player .mo-vol { width: 124px; accent-color: var(--mo-role-accent); cursor: pointer; margin: 0; }
#mo-player .mo-volume .mo-pbtn { font-size: 1.1rem; padding: .2rem .4rem; }
/* RIGHT zone — queue / favourite / locate / info, sitting to the right of the
   now-playing card (spec-musicorgan-single-unified-player-transport). Spatially
   separated, so no divider needed. */
.mo-player-utils .mo-pbtn { font-size: 1.2rem; padding: .25rem .45rem; }
/* absorbed album card — filled when the on-screen album IS the one playing; the
   AlbumView hero is suppressed so it shows once, in the player. */
.mo-now-album { max-width: 34vw; padding-left: 1rem; border-left: 1px solid var(--mo-border); }
.mo-now-album-title { font-size: 1.15rem; }
.mo-now-album-sub { font-size: 1.05rem; }
/* !important: the hero keeps Bootstrap's .d-flex (display:flex !important), which
   would otherwise win (leaning-bootstrap-d-flex-overrides-hidden-attr). */
body.mo-merged #mo-av-header { display: none !important; }

/* MERGED layout (Kris 2026-06-14, spec-musicorgan-player-absorbs-album-merge amend):
   the absorbed album block STACKS ABOVE the now-playing track (not side-by-side).
   #mo-now-album sits on top (order:-1) carrying album title·year·id·Play album; the
   track portlet renders below. order: keeps the DOM (clone target last) but paints
   album first. Drop the side divider; left-align the stack. */
body.mo-merged .mo-player-center { flex-direction: column; align-items: flex-start; gap: .35rem; }
body.mo-merged #mo-now-album { order: -1; max-width: 100%; padding-left: 0; border-left: 0; }
body.mo-merged .mo-now-album-line { white-space: normal; }

/* ---- COMPACT player (spec-musicorgan-player-card-reduce-enlarge-contextual-shrink) ----
   GET_SMALL: a slim single row for browsing/lab. Keeps art thumb + title + core
   transport (prev/play/next) + scrubber/time + the reduce/enlarge toggle. Hides
   the volume stack, the utils cluster, the absorbed-album card, and the queue
   drawer; the queue toggle stays (collapsed to its icon) so up-next is reachable.
   The headless #mo-audio engine is untouched — playback stays gapless. */
.mo-size-toggle {
  display: inline-flex; align-items: center; gap: .4rem; margin-left: 0;   /* full size: the utils cluster's ms-auto owns the free space */
  font-size: 1rem; font-weight: 600; line-height: 1; padding: .5rem .8rem; border-radius: .6rem;
  background: var(--mo-role-accent); border: 2px solid var(--mo-role-accent); color: #fff; white-space: nowrap;
}
.mo-size-toggle .fa-solid { font-size: 1.25rem; }
.mo-size-toggle:hover, .mo-size-toggle:focus-visible { filter: brightness(1.12); color: #fff; }
.mo-size-toggle:focus-visible { outline: 2px solid var(--mo-stage-text); outline-offset: 2px; }
/* smooth height/padding transition between sizes; motion-safe only */
#mo-player { transition: min-height .22s ease, padding-block .22s ease; }
@media (prefers-reduced-motion: reduce) {
  #mo-player { transition: none; }
}
#mo-player.mo-compact {
  min-height: 0;
  padding-block: .3rem;
  gap: .15rem;
}
/* COMPACT ROW ORDER: transport -> now-playing card (hugging the transport) ->
   flex spacer -> the solid size control at the row's far right, IN THE FLOW (its own
   margin-left:auto, below). It used to be absolutely positioned over the stage's right edge,
   which put it on top of the time readout and the end of the subtitle (Kris
   2026-11-06); in the flow the card truncates (min-width:0) before it, nothing overlaps. */
#mo-player.mo-compact .mo-player-stage {
  gap: .5rem;
  justify-content: flex-start;
}
#mo-player.mo-compact .mo-size-toggle { margin-left: auto; }   /* the utils cluster is hidden here */
/* hide the heavy zones — volume stack, right-side utils, absorbed album card */
#mo-player.mo-compact .mo-volume,
#mo-player.mo-compact .mo-player-utils,
#mo-player.mo-compact #mo-now-album { display: none !important; }
/* the absorbed-album merge stacks the centre column — in compact, force the
   single-row card back (the album block is hidden anyway) */
body.mo-player-compact.mo-merged .mo-player-center { flex-direction: row; align-items: center; }
/* shrink the now-playing portlet to a slim thumb + one-line title */
#mo-player.mo-compact .mo-portlet-art { height: 40px; width: 40px; }
#mo-player.mo-compact .mo-portlet-title { font-size: 1rem; }
#mo-player.mo-compact .mo-portlet-sub { font-size: .82rem; }
/* drop the secondary readouts that eat vertical space in compact */
#mo-player.mo-compact #mo-now-album-id,
#mo-player.mo-compact .mo-status-line { display: none; }
/* tighten the scrubber row */
#mo-player.mo-compact .mo-player-controls { padding-bottom: .25rem; }
#mo-player.mo-compact .mo-time { font-size: .8rem; }
/* smaller transport satellites for the slim row */
#mo-player.mo-compact .mo-pbtn { font-size: 1.2rem; padding: .2rem .45rem; }
#mo-player.mo-compact .mo-pbtn-lg { font-size: 1.7rem; padding: .15rem .55rem; }
/* The queue toggle (with its count badge) STAYS in compact so up-next is still
   reachable; the drawer keeps its default hidden state and opens on demand via
   MO.toggleDrawer() — we don't force it shut, only let it not occupy space. */

/* ---- THIN player (Kris 2026-10-10, spec-musicorgan-player-card-reduce-enlarge-
   contextual-shrink amend) ---- ONE row of about 40 px, the default on /cleanup/
   (data-mo-player-default="thin" on the CLEANUP partials' root; mo-player.js
   applyContextualSize). Left to right: [play/pause][next] + 24 px art + one-line
   title + the scrubber INLINE (flex-grow) + time + the size toggle far right.
   CSS ONLY: the template's DOM is the full layout's, untouched. The stage, its
   left zone and the transport become display:contents, so their children join
   #mo-player's own flex row beside the scrubber row (.mo-player-controls), and
   `order` lines them up. Hidden here: prev, the queue toggle, volume, utils, the
   absorbed album, every status line. The headless #mo-audio engine is untouched. */
#mo-player.mo-thin {
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: center;   /* the base #mo-player is a column */
  justify-content: flex-start; gap: .4rem; min-height: 0; padding: .2rem .6rem;
}
#mo-player.mo-thin[hidden] { display: none !important; }   /* the idle/no-context hide still wins */
/* !important: all three carry Bootstrap's .d-flex (display:flex !important), which
   would otherwise win and keep the stage a full-width row of its own
   (leaning-bootstrap-d-flex-overrides-hidden-attr, same shape) */
#mo-player.mo-thin .mo-player-stage,
#mo-player.mo-thin .mo-player-left,
#mo-player.mo-thin .mo-transport { display: contents !important; }
/* hide the heavy zones and the extras a one-row player has no room for */
#mo-player.mo-thin #mo-prev,
#mo-player.mo-thin #mo-queue-toggle,
#mo-player.mo-thin .mo-volume,
#mo-player.mo-thin .mo-player-utils,
#mo-player.mo-thin #mo-now-album,
#mo-player.mo-thin .mo-portlet-sub,
#mo-player.mo-thin #mo-now-album-id,
#mo-player.mo-thin .mo-status-line,
#mo-player.mo-thin #mo-transcode-badge { display: none !important; }
/* the absorbed-album merge stacks the centre column — in thin, force the row back */
body.mo-player-thin.mo-merged .mo-player-center { flex-direction: row; align-items: center; }
/* small transport: play/pause + next only */
#mo-player.mo-thin .mo-pbtn { font-size: 1rem; line-height: 1; padding: .15rem .4rem; }
#mo-player.mo-thin .mo-pbtn-lg { font-size: 1.3rem; padding: .1rem .45rem; border-radius: 50%; }
/* 24 px art thumb + one-line truncated title, hugging the transport */
#mo-player.mo-thin .mo-player-center { order: 1; flex: 0 1 auto; min-width: 0; max-width: 40%; }
#mo-player.mo-thin .mo-portlet { gap: .5rem !important; max-width: none; }
#mo-player.mo-thin .mo-portlet-art { height: 24px; width: 24px; }
#mo-player.mo-thin .mo-portlet-title { font-size: .95rem; font-weight: 500; line-height: 1.25; }
/* the scrubber row joins the SAME row and takes the slack */
#mo-player.mo-thin .mo-player-controls {
  order: 2; flex: 1 1 140px; min-width: 120px;
  padding: 0 !important; gap: .5rem !important;
}
#mo-player.mo-thin .mo-seek { min-width: 80px; height: 4px; }
#mo-player.mo-thin .mo-time { font-size: .75rem; }
/* the size toggle, far right of the single row (in the flow in every size) */
#mo-player.mo-thin .mo-size-toggle { order: 3; margin: 0 0 0 auto; padding: .15rem .45rem; }
#mo-player.mo-thin .mo-size-label { display: none; }   /* icon only in the 40 px row; the title and aria-label still say it */
#mo-player.mo-thin .mo-size-toggle .fa-solid { font-size: 1rem; }
/* the ID reveal and the up-next drawer keep a full-width row of their own below */
#mo-player.mo-thin #mo-now-id,
#mo-player.mo-thin #mo-queue-drawer { order: 9; flex: 1 1 100%; }

/* OWL · Metadata operator card (spec-musicorgan-owl-metadata-operator-card) */
.mo-owl-card .card-header { background: var(--mo-surface-2, rgba(0,0,0,.03)); }
.mo-owl-flabel { width: 5.5rem; flex: 0 0 5.5rem; }
.mo-owl-input { max-width: 24rem; }
.mo-owl-genre-add { width: 9rem; }
.mo-owl-genre-x { cursor: pointer; color: inherit; line-height: 1; }
.mo-owl-field + .mo-owl-field { border-top: 1px dashed var(--mo-border); }
/* click-to-edit fields: value reads as plain text, hints editable on hover */
.mo-owl-display { cursor: text; border-bottom: 1px dashed transparent; padding: 0 1px; }
.mo-owl-display:hover { border-bottom-color: var(--mo-border); }
.mo-owl-row .mo-owl-input { max-width: 22rem; min-width: 8rem; }
.mo-owl-overdot { font-size: .72rem; }
.mo-owl-altlabel { white-space: nowrap; }
/* Narrow phones (spec-musicorgan-narrow-header-shrink): shrink the banner +
   player chrome so the header stops wrapping onto extra rows. Drop the
   Operator/Player badge, trim the brand mark, and make the player control
   satellites + portlet smaller — reduce button size rather than line-wrap. */
@media (max-width: 480px) {
  .mo-role-badge { display: none; }
  /* Catalog badge keeps the album count but drops the '· updated Xm ago' tail
     on narrow phones — shrink, don't wrap the header
     (spec-musicorgan-narrow-header-shrink / -banner-no-hamburger). */
  .mo-catalog-ago { display: none; }
  .mo-brand-bird { width: 2.1rem; height: 2.1rem; }
  #mo-player .mo-player-stage { gap: .5rem; }
  #mo-player .mo-player-stage > .d-flex { gap: .3rem; }
  .mo-size-label { display: none; }   /* icon only on phones; the title and aria-label still say it */
  .mo-size-toggle { padding: .35rem .5rem; }
  .mo-pbtn { font-size: 1.15rem; padding: .2rem .4rem; }
  .mo-pbtn-lg { font-size: 1.55rem; padding: .15rem .5rem; }
  .mo-portlet-art { height: 48px; width: 48px; }
  .mo-portlet-title { font-size: 1.05rem; }
  .mo-portlet-sub { font-size: .82rem; }
  .mo-now-album { max-width: 60vw; padding-left: .5rem; }
  .mo-now-album-title { font-size: .95rem; }
  .mo-now-album-sub { font-size: .82rem; }
  .mo-player-utils { padding-left: .4rem; }
  /* keep the single control bar on ONE row — shrink rather than wrap: drop the
     volume slider (mute button stays), tighten the scrubber + time. */
  #mo-player .mo-volume .mo-vol { display: none; }
  #mo-player .mo-seek { min-width: 64px; }
  .mo-time { font-size: .78rem; }
}
/* current-track ID reveal under the strip (own classes; not the canonical mo-id-chip) */
.mo-now-id { display: flex; }
.mo-nowid-text { color: var(--mo-stage-muted); }
.mo-nowid-copy.mo-nowid-copied { color: #34d399; border-color: #34d399; }
/* "show in list" locate flash on the target row */
.mo-row-flash { animation: mo-row-flash 1.3s ease-out; }
@keyframes mo-row-flash { 0%,25% { background: #ffe9a8 !important; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .mo-row-flash { animation: none !important; } }
.mo-now { min-width: 0; }
.mo-now-art { height: 38px; width: 38px; object-fit: cover; }
/* album-art thumbnails in cards/grids */
.mo-art { object-fit: cover; background: #e6fffa; }
.mo-art-card { width: 56px; height: 56px; flex: 0 0 56px; }
.mo-art-detail { width: 72px; height: 72px; }
#mo-player .btn-outline-light.active { background: var(--mo-accent); border-color: var(--mo-accent); color:#fff; }

/* up-next drawer */
.mo-queue-drawer { background:var(--mo-surface-3); color:var(--mo-stage-text); max-height: 45vh; overflow-y:auto; }
.mo-queue-list li { display:flex; align-items:center; gap:.5rem; padding:.25rem .75rem; cursor:pointer; border-bottom:1px solid var(--mo-border); }
.mo-queue-list li:hover { background:var(--mo-surface-2); }
.mo-queue-list li.mo-current { background:color-mix(in srgb, var(--mo-accent) 20%, transparent); }
.mo-queue-list li.mo-current .mo-q-title { color:var(--mo-accent); font-weight:600; }
.mo-queue-list .mo-q-title { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mo-queue-list .mo-q-sub { color:var(--mo-stage-muted); font-size:.8em; }
.mo-queue-list .mo-q-rm { color:var(--mo-stage-muted); }
.mo-queue-list .mo-q-rm:hover { color:#f56565; }

/* ---- NESTING (spec-musicorgan-cloud-player-client-prefetch-buffer) ----
   Aviary-themed client prefetch buffer chrome: the utils-zone chip (nested
   count), the drawer's NEST bar (total MB · nest-ahead limit · Nest now), and
   the per-queued-track egg indicator (pending / downloading %% / nested). All
   of it is revealed by mo-player.js only when NESTING is relevant (direct R2
   srcs / a non-empty nest) — Operator/dev (local srcs) never sees it. */
.mo-nest-chip { font-size: 1.05rem; }
.mo-nest-chip .mo-nest-count { font-size: .8rem; }
.mo-nest-bar { background: var(--mo-surface-3); color: var(--mo-stage-text); }
.mo-nest-label { color: var(--mo-stage-muted); white-space: nowrap; }
#mo-player .mo-nest-limit {
  width: 4.4rem; padding: .1rem .35rem;
  background: var(--mo-surface-2); color: var(--mo-stage-text);
  border-color: var(--mo-border);
}
.mo-queue-list .mo-nest-state {
  flex: 0 0 auto; min-width: 2.4rem; text-align: right;
  font-size: .78em; font-variant-numeric: tabular-nums;
  color: var(--mo-stage-muted);
}
.mo-queue-list .mo-nest-state[data-nest-state="nested"] { color: var(--mo-accent); }
.mo-queue-list .mo-nest-state[data-nest-state="na"] { min-width: 0; }

/* NESTING egg status on ALBUM TRACK LISTS (spec-musicorgan-queue-owns-the-
   transport-and-eggs-on-track-lists). The drawer rules above are flex-item rules
   scoped to .mo-queue-list; a table cell needs its own inline treatment. A slot
   that is dormant ("na") or not yet painted (empty) must occupy NOTHING — the
   Operator surface is all-local srcs, so it gains no chrome at all. */
tr[data-track-id] .mo-nest-state {
  display: inline-flex; align-items: center; gap: .2rem;
  margin-left: .25rem; vertical-align: middle;
  font-size: .78em; font-variant-numeric: tabular-nums;
  color: var(--mo-stage-muted);
}
tr[data-track-id] .mo-nest-state[data-nest-state="nested"] { color: var(--mo-accent); }
tr[data-track-id] .mo-nest-state:empty,
tr[data-track-id] .mo-nest-state[data-nest-state="na"] { display: none; }

/* play/now-playing affordances in lists — SLICE 3 now-playing treatment
   (spec-musicorgan-playback-focus-and-nav-prominence): clear accent bar + tint +
   a small animated equaliser glyph injected by highlightPlaying(). Visual only. */
tr.mo-row-playing { background:#e6fffa !important; }
tr.mo-row-playing td:first-child { box-shadow: inset 4px 0 0 var(--mo-accent); }
tr.mo-row-playing td.fw-medium, tr.mo-row-playing .fw-medium { color: var(--mo-accent); }
.mo-eq {
  color: var(--mo-accent); margin-right:.3rem; font-size:1rem; vertical-align:-0.1em;
  animation: mo-eq-pulse 1.1s ease-in-out infinite;
}
@keyframes mo-eq-pulse { 0%,100% { opacity:.45; transform:scaleY(.78); } 50% { opacity:1; transform:scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .mo-eq { animation: none; opacity:1; } }

/* SLICE 2 — sibling-album badges in the artist header (compact wrap-row of small
   owl chips; NOT full cards). TAP the chip = focus (hx-get); the play glyph on it
   = play the album (.mo-play-list) without changing focus. Keep chips dense. */
.mo-album-badge-row { display:flex; flex-wrap:wrap; gap:.4rem .5rem; align-items:center; }
.mo-album-badge-wrap { display:inline-flex; align-items:center; }
.mo-album-badge {
  display:inline-flex; align-items:center; gap:.15rem;
  padding:.2rem .5rem; border:1px solid var(--mo-border); border-radius:1rem;
  background:var(--mo-surface-2); color:var(--mo-text); font-size:.82rem; line-height:1.2;
  max-width:16rem; transition:border-color .12s ease, background .12s ease;
}
.mo-album-badge:hover, .mo-album-badge:focus-visible { border-color:var(--mo-accent); background:var(--mo-surface-3); color:var(--mo-text); }
.mo-album-badge-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mo-album-badge-yr { color:var(--mo-text-muted); font-variant-numeric:tabular-nums; }
.mo-album-badge-play {
  display:inline-flex; align-items:center; justify-content:center;
  width:1.7rem; height:1.7rem; margin-left:-.55rem;
  border:1px solid var(--mo-border); border-left:0; border-radius:0 1rem 1rem 0;
  background:var(--mo-surface-2); color:var(--mo-accent); cursor:pointer; font-size:.9rem;
}
.mo-album-badge-play:hover, .mo-album-badge-play:focus-visible { background:var(--mo-accent); color:#fff; border-color:var(--mo-accent); }

/* SLICE 4 — inline "You might like" pinned under the focused tracklist. */
.mo-you-might-like { background:var(--mo-surface-2); }

/* inline track-detail expansion row */
tr.mo-detail-row > td { background:#f8fafc; }
.mo-facts { display:grid; grid-template-columns: repeat(auto-fill, minmax(11rem,1fr)); gap:.35rem 1.25rem; }
.mo-facts dt { font-size:.7rem; text-transform:uppercase; letter-spacing:.04em; color:#718096; margin:0; }
.mo-facts dd { margin:0 0 .35rem 0; font-size:.9rem; }
.mo-mb { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.72rem; }

/* star rating widget */
.mo-stars { display:inline-flex; cursor:pointer; }
.mo-stars i { color:var(--mo-cta-border); }
.mo-stars i.on { color:#ecc94b; }

/* row-ID affordance — tiny muted chip + inline copy popover (no layout shift) */
.mo-id-chip { display:inline-flex; align-items:center; gap:.2rem; vertical-align:baseline; }
.mo-id-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.68rem; color:var(--mo-text-faint); line-height:1; white-space:nowrap; }
.mo-id-info { font-size:.72rem; color:var(--mo-text-faint) !important; line-height:1; text-decoration:none; }
.mo-id-info:hover { color:var(--mo-accent) !important; }
.mo-id-pop { display:inline-flex; align-items:center; }
.mo-id-copy { font-size:.68rem; line-height:1.1; }
.mo-id-copy.mo-id-copied { color:#22863a; border-color:#22863a; }

/* alpha jump bar */
.mo-alpha { display:flex; flex-wrap:wrap; gap:.15rem; }
.mo-alpha a { width:1.7rem; text-align:center; }
.mo-alpha a.active { background:var(--mo-accent); color:#fff; border-color:var(--mo-accent); }

/* transcode status badge on the now-playing portlet
   (spec-musicorgan-transcode-web-rendition) — appended block, do not reorder */
.mo-transcode-badge {
  margin-top:.15rem; font-size:.72rem; line-height:1.2; font-weight:600;
  display:inline-flex; align-items:center; gap:.3rem;
  padding:.1rem .45rem; border-radius:.6rem;
}
.mo-transcode-wait { color:#0c2b34; background:#7fd1de; }
.mo-transcode-fail { color:#fff; background:#b23a48; }
.mo-transcode-wait::before { content:"\f252"; font-family:"Font Awesome 6 Free"; font-weight:900; animation:mo-tc-pulse 1.2s ease-in-out infinite; }
.mo-transcode-fail::before { content:"\f057"; font-family:"Font Awesome 6 Free"; font-weight:900; }
@keyframes mo-tc-pulse { 0%,100% { opacity:.4; } 50% { opacity:1; } }

/* ============ Browse CTAs — always-on Artists/Albums/Genres/Search ===========
   spec-musicorgan-responsive-browse-cta. One partial, two placements: inline in
   the banner at >=lg, a full-width touch bar at <lg (never in the hamburger). */
.mo-aviary { vertical-align: -0.18em; }

/* Aviary size ladder (spec-musicorgan-character-forward-lists-and-unified-controls):
   applied through the aviary tag's cls= with the matching size=; browse pages only.
   Dense operator surfaces keep small inline sizes. */
.mo-aviary-inline { width: 20px; height: 20px; }          /* breadcrumbs, group heads: 16-20 */
.mo-row-emblem    { width: 34px; height: 34px; }          /* list name-marker: 32-36 */
.mo-aviary-hero   { width: 64px; height: 64px; }          /* page header emblem: 56-88 */
.mo-aviary-xl     { width: 96px; height: 96px; }          /* hero / empty / loading: 64-120 */
@media (max-width: 575.98px) {
  .mo-aviary-hero { width: 56px; height: 56px; }
  .mo-aviary-xl   { width: 72px; height: 72px; }
}

/* One list control bar (spec-musicorgan-character-forward-lists-and-unified-controls):
   A-Z bar, sort group, pager and the album control row share .mo-ctl (rhythm) and
   .mo-ctl-btn (tap target: 44px on a phone). .mo-row-gutter keeps list rows 44px tall. */
.mo-ctl { gap: .4rem; }
.mo-row-gutter { min-height: 44px; }
a.mo-row-gutter { display: inline-flex; align-items: center; }
.mo-genre-card.mo-row-gutter { display: flex; }
tr.mo-row-gutter > td { height: 44px; }
.mo-kind { opacity: .7; }
@media (max-width: 575.98px) {
  .mo-ctl-btn { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .mo-alpha a.mo-ctl-btn { width: auto; }
}

/* Chester's note and primer (ruled 2026-11-19): upright, the page's own colour, a readable measure.
   The album note shows three lines; mo-note.js reveals the More button only when the note is longer. */
.mo-note { max-width: 70ch; font-style: normal; color: inherit; }
.mo-note-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.mo-note-label { max-width: 70ch; }
.mo-note-more { text-decoration: none; }

/* ============ Genres enrichment (spec-musicorgan-genres-enrichment) =========
   Curated-icon cards on the index + an artist word-cloud on the detail page.
   All token-themed (light only). */
.mo-genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; }
.mo-genre-card {
  display: flex; align-items: center; gap: .7rem; text-decoration: none;
  padding: .7rem .8rem; border-radius: var(--mo-card-radius); box-shadow: var(--mo-card-shadow);
  background: var(--mo-surface-2); border: 1px solid var(--mo-border); color: var(--mo-text);
  transition: border-color .12s ease, background .12s ease;
}
.mo-genre-card:hover, .mo-genre-card:focus-visible { border-color: var(--mo-accent); background: var(--mo-surface-3); }
.mo-genre-card-icon, .mo-genre-head-icon {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: .55rem; color: var(--mo-accent);
  background: color-mix(in srgb, var(--mo-accent) 14%, transparent);
}
.mo-genre-card-icon { width: 2.2rem; height: 2.2rem; font-size: 1.15rem; }
.mo-genre-head-icon { width: 3rem; height: 3rem; font-size: 1.6rem; border-radius: .7rem; }
.mo-genre-card-body { display: flex; flex-direction: column; min-width: 0; }
.mo-genre-card-name { font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-genre-card-counts { font-size: .78rem; color: var(--mo-text-muted); }

/* LIGHT cta buttons (spec-musicorgan-style-system): light fill + dark text +
   defined border; the role accent is a hover/focus tint, never a dark fill. */
.mo-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  text-decoration: none; color: var(--mo-cta-text);
  border: 1px solid var(--mo-cta-border); border-radius: .5rem;
  background: var(--mo-cta-bg); white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.mo-cta:hover, .mo-cta:focus-visible {
  color: var(--mo-cta-text); border-color: var(--mo-role-accent);
  background: var(--mo-cta-hover-bg);
}
.mo-cta .mo-cta-icon { flex: 0 0 auto; }
.mo-cta i.mo-cta-icon { font-size: 1.05rem; color: var(--mo-role-accent); }

/* ALBUM PAGE Play album button: bold and large (Kris 2026-11-08). Chester opens the album page in a new tab, nothing
   autoplays (spec-musicorgan-cta-prominence-and-no-autoplay), so the driver taps this. Phone (< lg): the whole row.
   lg and up: a large button sized to its content. The icon is an <i> that mo-player.js swaps play/pause, so it
   follows this font-size. Light theme only; btn-success keeps the colour. */
.mo-play-cta {
  flex: 1 1 100%; min-height: 56px; padding: .6rem 1.5rem;
  font-size: 1.35rem; font-weight: 700; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.mo-play-cta i.fa-solid { font-size: 1.6rem; }
@media (min-width: 992px) {
  .mo-play-cta { flex: 0 0 auto; width: auto; }
}

/* NAVIGATOR bar — ONE large always-on band below the banner at EVERY width
   (spec-musicorgan-playback-focus-and-nav-prominence SLICE 1). The retired
   .mo-cta-inline navbar fork is gone (the 992px bug). "More icon, less box":
   the glyph dominates and the chrome is trimmed, while the tap target stays
   >=44px. It's now a direct child of <header> (not inside .navbar), so the
   old 100vw breakout is unneeded — a plain full-width flex band suffices. */
.mo-cta-bar {
  display: flex; gap: .25rem;
  padding: .3rem .4rem;
  width: 100%; box-sizing: border-box;
  background: var(--mo-stage-bg); border-top: 1px solid var(--mo-border);  /* OPAQUE — blends into the player stage tone; list must not scroll behind the nav verbs (spec-musicorgan-now-playing-opaque-header) */
}
.mo-cta-bar .mo-cta {
  flex: 1 1 0; min-width: 0; min-height: 56px; overflow: hidden;
  flex-direction: column; gap: .1rem; padding: .25rem .2rem;
  font-size: .8rem; font-weight: 600; line-height: 1.05;
  border: 0; background: transparent; border-radius: .4rem;
  color: var(--mo-cta-text);
  transition: background .12s ease, color .12s ease;
}
/* bigger glyph, tighter chrome — the 22→28 bump wasn't enough; push to 40px. */
.mo-cta-bar .mo-cta .mo-aviary { width: 40px; height: 40px; transition: transform .12s ease; }
.mo-cta-bar .mo-cta i.mo-cta-icon { font-size: 1.9rem; }
.mo-cta-bar .mo-cta-label { line-height: 1; max-width: 100%; }
/* hover = raised chip. The band now sits on the stage tone, so the old
   --mo-cta-hover-bg (== stage tone in light) would vanish; lift to the elevated
   surface instead, which contrasts against the band. */
.mo-cta-bar .mo-cta:hover, .mo-cta-bar .mo-cta:focus-visible {
  background: var(--mo-surface-2); color: var(--mo-cta-text); border-color: transparent;
}
/* FOLDED on CLEANUP pages (card q-cta-fold, Kris 2026-10-10): banner + thin player stay, the bar's 73 px go to the
   cards. Set by the shell (mo_cta_fold) and mo-player.js applyCtaFold (the partial's data-mo-cta="fold"). */
.mo-cta-bar.mo-cta-folded { display: none; }
.mo-cta-bar .mo-cta:hover .mo-aviary,
.mo-cta-bar .mo-cta:focus-visible .mo-aviary { transform: translateY(-2px) scale(1.06); }
.mo-cta-bar .mo-cta:hover .mo-cta-label,
.mo-cta-bar .mo-cta:focus-visible .mo-cta-label {
  text-decoration: underline; text-underline-offset: 3px;
}
/* iPhone-SE / very narrow: trim a hair but keep glyph dominant + label readable. */
@media (max-width: 360px) {
  .mo-cta-bar { gap: .2rem; padding: .25rem .25rem; }
  .mo-cta-bar .mo-cta { min-height: 50px; padding: .2rem .1rem; font-size: .74rem; }
  .mo-cta-bar .mo-cta .mo-aviary { width: 32px; height: 32px; }
  .mo-cta-bar .mo-cta i.mo-cta-icon { font-size: 1.55rem; }
}

/* Search landing hero + on-page field
   (spec-musicorgan-player-usability-icons-search-crosslinks B). */
.mo-search-form { max-width: 38rem; }
.mo-search-hero .mo-aviary { filter: drop-shadow(0 4px 10px rgba(0,0,0,.12)); }

/* ============ Cloud-player cold-start "Music Organ is waking" cue ==================
   spec-musicorgan-player-cold-start-waking. While the Fly machine is cold (a
   transport click queued, awaiting first backend response) the transport wears a
   light, NON-BLOCKING waking state: a slim themed strip at the top of the player
   ("Music Organ is waking…") + a dimmed, busy-cursor look on the gated buttons. The
   action is queued, not dropped — this is purely the visual cue. Cleared the
   instant the backend responds (stream headers / healthz 200). Lair motif
   via the moon-stars owl glyph + the bird accent. Reduced-motion -> static. */
.mo-waking {
  display: flex; align-items: center; gap: .45rem;
  padding: .2rem .75rem; font-size: .78rem; font-weight: 600;
  color: var(--mo-bird-eye, #fff);
  background: linear-gradient(90deg, var(--mo-bird-shade, #2f7fd6), var(--mo-bird-accent, #4aa3ff));
  letter-spacing: .01em;
}
.mo-waking[hidden] { display: none; }
.mo-waking-owl { display: inline-flex; }
.mo-waking-owl .fa-solid { animation: mo-waking-rouse 1.4s ease-in-out infinite; transform-origin: center; }
@keyframes mo-waking-rouse {
  0%, 100% { opacity: .55; transform: translateY(0) rotate(-6deg); }
  50%      { opacity: 1;   transform: translateY(-1px) rotate(6deg); }
}
/* Gated transport buttons read as "rousing": dimmed + busy cursor, gentle pulse.
   Still clickable (a second click just re-queues the latest intent). */
.mo-waking-btn { opacity: .6; cursor: progress; animation: mo-waking-pulse 1.4s ease-in-out infinite; }
@keyframes mo-waking-pulse { 0%, 100% { opacity: .5; } 50% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) {
  .mo-waking-owl .fa-solid, .mo-waking-btn { animation: none !important; }
  .mo-waking-btn { opacity: .6; }   /* static dim — the label still reads "waking…" */
}

/* === spec-musicorgan-browse-grid-polish (appended; do not merge above) =======
   Defect 2: long card titles bled into the neighbor column. Bootstrap 5.3 has
   no `min-w-0` utility, so the flex child kept min-width:auto and refused to
   shrink below intrinsic content width, defeating the truncate. Define the
   utility once (benefits every flex child carrying `min-w-0`), and switch the
   card title from single-line ellipsis to a 2-line wrapping clamp (operator
   prefers wraps over ellipsis). `h-100` on the card keeps 1- and 2-line cards
   equal height in a row. */
.min-w-0 { min-width: 0 !important; }
.mo-card-title {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;          /* break rare unbroken tokens before bleeding */
  /* !important so Bootstrap's d-* display utilities (display:…!important) can't
     defeat the -webkit-box clamp if the title <a> ever carries one. */
  display: -webkit-box !important;
  -webkit-line-clamp: 2;            /* wrap to 2 lines, then ellipsis */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Shows / Sets browse — GONZO/STAINED_GLASS polish (appended; do not merge) ==
   spec-musicorgan-sets-phase3-browse-impl visual pass. /sets/ index gains real
   year groups, cover thumbnails, a source-type colour language + legend, and an
   illustrated Ravon empty state; /set/<id>/ gains a signal-chain provenance block
   + cross-link rail. All token-themed (light only).
   No new data/routes — purely the SCOUT/GONZO layer over the shipped contract. */

/* --- source-type colour language (SBD/AUD/MTX/FM/UNK) ----------------------
   ONE legible palette shared by the index chips, the legend, and the show
   header, so a taper's source reads at a glance. Keyed by data-src so the
   view's Bootstrap source_class stays the rendered fallback (and the SBD/AUD
   text the verifier asserts is untouched). */
.mo-src {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  padding: .12rem .4rem; border-radius: .45rem; line-height: 1.1;
  border: 1px solid transparent; font-variant-numeric: tabular-nums;
}
.mo-src::before { font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .9em; }
.mo-src[data-src="SBD"] { color:#0b3d1e; background:#bff0cf; border-color:#7bd69a; }  /* clean board feed — green */
.mo-src[data-src="SBD"]::before { content:"\f1e6"; }   /* plug — board */
.mo-src[data-src="AUD"] { color:#0a3a45; background:#bfe9f2; border-color:#7fcfe0; }  /* stealth mic — cyan */
.mo-src[data-src="AUD"]::before { content:"\f130"; }   /* mic */
.mo-src[data-src="MTX"] { color:#2a1b52; background:#d8cffb; border-color:#b3a3f0; }  /* matrix blend — violet */
.mo-src[data-src="MTX"]::before { content:"\f1de"; }   /* sliders — blend */
.mo-src[data-src="FM"]  { color:#3a2c0a; background:#f7e6b0; border-color:#e6cf73; }  /* broadcast — amber */
.mo-src[data-src="FM"]::before { content:"\f519"; }    /* broadcast */
.mo-src[data-src="UNK"] { color:var(--mo-text-muted); background:var(--mo-surface-3); border-color:var(--mo-border); }
.mo-src[data-src="UNK"]::before { content:"\3f"; }   /* question */

.mo-src-legend { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem .5rem; }
.mo-src-legend .mo-src { cursor:default; }

/* --- availability badge (ONLINE vs ARCHIVES) — make the duality unmistakable */
.mo-avail {
  display:inline-flex; align-items:center; gap:.3rem;
  font-size:.72rem; font-weight:700; letter-spacing:.02em;
  padding:.14rem .5rem; border-radius:1rem; line-height:1.1; white-space:nowrap;
}
.mo-avail-online { color:#0b3d1e; background:#c8f2d6; border:1px solid #7bd69a; }
.mo-avail-online .fa-solid { color:#138a4a; }
.mo-avail-archive { color:#4a3503; background:#fbeec2; border:1px solid #e6cf73; }
.mo-avail-archive .fa-solid { color:#9a6b00; }

/* --- /sets/ year groups — collapsible section headers with counts + Ravon ---- */
.mo-set-group + .mo-set-group { margin-top: .9rem; }
.mo-set-group-head {
  display:flex; align-items:center; gap:.55rem; width:100%;
  padding:.45rem .7rem; cursor:pointer; text-align:left;
  background:var(--mo-surface-2); color:var(--mo-text);
  border:1px solid var(--mo-border); border-radius: var(--mo-card-radius); box-shadow: var(--mo-card-shadow);
  transition:border-color .12s ease, background .12s ease;
}
.mo-set-group-head:hover, .mo-set-group-head:focus-visible {
  border-color:var(--mo-accent); background:var(--mo-surface-3);
}
.mo-set-group-head .mo-aviary { flex:0 0 auto; }
.mo-set-group-yr { font-weight:700; font-size:1.05rem; font-variant-numeric:tabular-nums; }
.mo-set-group-meta { color:var(--mo-text-muted); font-size:.8rem; }
.mo-set-group-chev { margin-left:auto; color:var(--mo-text-muted); transition:transform .15s ease; }
.mo-set-group[open] .mo-set-group-chev { transform:rotate(90deg); }
.mo-set-group-head::-webkit-details-marker { display:none; }
.mo-set-group > summary { list-style:none; }
.mo-set-group > .card { margin-top:.4rem; }

/* --- /sets/ row thumbnail (reuse the AlbumArt cascade keyed by album_id) ----- */
.mo-set-thumb { width:38px; height:38px; flex:0 0 38px; object-fit:cover; border-radius:.35rem; background:var(--mo-surface-3); }

/* --- /sets/ mobile card reflow (<lg the table stacks into rows) -------------- */
.mo-set-card {
  display:block; padding:.6rem .7rem; text-decoration:none; color:var(--mo-text);
  border:1px solid var(--mo-border); border-radius: var(--mo-card-radius); box-shadow: var(--mo-card-shadow); background:var(--mo-surface-2);
}
.mo-set-card + .mo-set-card { margin-top:.4rem; }
.mo-set-card:hover, .mo-set-card:focus-visible { border-color:var(--mo-accent); background:var(--mo-surface-3); }
.mo-set-card-title { font-weight:600; line-height:1.2; }
.mo-set-card-meta { font-size:.8rem; color:var(--mo-text-muted); }

/* --- illustrated empty state -------------------------------------------------- */
.mo-set-empty { text-align:center; padding:2.5rem 1rem; color:var(--mo-text-muted); }
.mo-set-empty .mo-aviary { opacity:.85; filter:drop-shadow(0 6px 14px rgba(0,0,0,.14)); margin-bottom:.6rem; }

/* --- /set/<id>/ provenance signal-chain block ------------------------------- */
.mo-prov {
  border:1px solid var(--mo-border); border-radius: var(--mo-card-radius); box-shadow: var(--mo-card-shadow);
  background:var(--mo-surface-2); padding:.7rem .85rem;
}
.mo-prov-title { font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; color:var(--mo-text-muted); display:flex; align-items:center; gap:.35rem; margin-bottom:.5rem; }
.mo-prov-grid { display:grid; grid-template-columns:max-content 1fr; gap:.3rem .75rem; align-items:baseline; }
.mo-prov-grid dt { font-size:.74rem; color:var(--mo-text-muted); text-transform:uppercase; letter-spacing:.03em; margin:0; }
.mo-prov-grid dd { margin:0; font-size:.9rem; }
/* the lineage rendered as a signal chain: tokens split on > with chevrons */
.mo-chain { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem .15rem; }
.mo-chain-node {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.78rem;
  padding:.05rem .4rem; border-radius:.35rem;
  background:var(--mo-surface-3); border:1px solid var(--mo-border); color:var(--mo-text);
}
.mo-chain-arrow { color:var(--mo-accent); font-size:.8rem; }

/* --- /set/<id>/ cross-link rail --------------------------------------------- */
.mo-xlinks { display:flex; flex-wrap:wrap; gap:.4rem; }
.mo-xlink {
  display:inline-flex; align-items:center; gap:.3rem; text-decoration:none;
  font-size:.8rem; padding:.22rem .55rem; border-radius:1rem;
  background:var(--mo-surface-2); border:1px solid var(--mo-border); color:var(--mo-text);
  transition:border-color .12s ease, background .12s ease;
}
.mo-xlink:hover, .mo-xlink:focus-visible { border-color:var(--mo-accent); background:var(--mo-surface-3); color:var(--mo-text); }
.mo-xlink .fa-solid { color:var(--mo-accent); }

/* --- archive Request CTA — a clear call to action, not a dead button -------- */
.mo-set-request {
  display:inline-flex; align-items:center; gap:.4rem;
  font-weight:600; padding:.4rem .9rem; border-radius:.5rem;
  color:#4a3503; background:#fbeec2; border:1px solid #e6cf73; text-decoration:none;
  transition:filter .12s ease;
}
.mo-set-request:hover, .mo-set-request:focus-visible { filter:brightness(.96); color:#4a3503; }

/* ---------- CATALOG_TRIAGE: click-to-enlarge refused candidate ------------
   The lane thumb is 88px under object-fit:cover — good for scanning, useless
   for reading a sleeve. <details> gives us expand/collapse with no modal and
   no inline event handler; this styles the summary so it reads as a control
   and lets the opened panel show the full-resolution image big enough to read.
   (operator 2026-08-19: "make it possible to click the cover art suggestion
   and have it expand to a large zoomable image so we can read the text on it") */
.mo-cand-zoom > summary.mo-cand-summary {
  position: relative;
  cursor: zoom-in;
  list-style: none;
  display: inline-block;
  line-height: 0;              /* no baseline gap under the thumb */
}
.mo-cand-zoom > summary.mo-cand-summary::-webkit-details-marker { display: none; }
.mo-cand-zoom[open] > summary.mo-cand-summary { cursor: zoom-out; }
.mo-cand-hint {
  position: absolute;
  right: 2px; bottom: 2px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  border-radius: .2rem;
  font-size: .68rem;
  line-height: 1;
  padding: .15rem .25rem;
}
.mo-cand-zoom[open] > summary .mo-cand-hint { opacity: .35; }
/* The opened panel escapes the 88px flex column so the art gets real width.
   max-height + auto overflow means a taller-than-viewport sleeve PANS rather
   than pushing the whole lane down the page. */
.mo-cand-full {
  overflow: auto;
  max-height: 78vh;
  max-width: min(92vw, 620px);
}
.mo-cand-full img {
  width: 100%;
  height: auto;
  display: block;
  background: #eee;
}

/* ================================================ login wall — onboarding v2 (S1)
   spec-musicorgan-cloud-player-onboarding-invite-wall-htmx-welcome-email-tab-reuse
   pattern-htmx-smooth-transitions-swap-settle-focus-reduced-motion.
   Scoped to the standalone login.html; none of this reaches the app shell. */

/* Rule 3 — HOLD THE LAYOUT. The panel reserves its height so the card below it
   (the song-nod footer) does not jump when the form becomes a message. Sized to
   the tallest state, the why-copy + form. */
.mo-invite-panel { min-height: 21rem; }

/* Rule 2 — FADE THROUGH SWAP AND SETTLE, 150ms each way (under the 200ms
   ceiling; longer reads as lag). htmx puts .htmx-swapping on the OUTGOING node
   and .htmx-settling on the INCOMING one, so the incoming node must start at
   opacity 0 and fade UP to the base rule as the class is removed — settling
   pinned at 1 would be a no-op fade-in. */
.mo-invite-panel { opacity: 1; transition: opacity 150ms ease-in; }
.mo-invite-panel.htmx-swapping { opacity: 0; transition: opacity 150ms ease-out; }
.mo-invite-panel.htmx-settling { opacity: 0; }

/* Rule 3 — the busy state shows IN PLACE on the button, never as a page-level
   bar. htmx marks the requesting form .htmx-request for the life of the call. */
.mo-invite-busy-label { display: none; }
.mo-invite-panel form.htmx-request .mo-invite-idle-label { display: none; }
.mo-invite-panel form.htmx-request .mo-invite-busy-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.mo-invite-panel form.htmx-request button[type="submit"] {
  pointer-events: none;
  opacity: .75;
}

/* Rule 4 — the one-shot highlight that carries the eye from the sent card to the
   passphrase field. mo-invite-panel.js adds .mo-flash and removes it on
   animationend, so the next add genuinely restarts the animation. */
@keyframes mo-flash {
  0%   { box-shadow: 0 0 0 .28rem rgba(44, 122, 123, .45); }
  100% { box-shadow: 0 0 0 .28rem rgba(44, 122, 123, 0); }
}
.mo-flash { animation: mo-flash 1.2s ease-out 1; }

/* The destination card. Bootstrap utilities carry the layout; only the icon
   fallback tint needs a rule of its own. */
.mo-destination-icon { color: var(--mo-accent); }

/* Rule 6 — RESPECT REDUCED MOTION. The reduced path is an INSTANT swap, not a
   broken one: opacity is pinned at 1 in every phase so content is never left
   invisible, and the highlight simply does not animate. */
@media (prefers-reduced-motion: reduce) {
  .mo-invite-panel,
  .mo-invite-panel.htmx-swapping,
  .mo-invite-panel.htmx-settling { transition: none; opacity: 1; }
  .mo-flash { animation: none; }
}

/* ============================================================= rarity (S2/S3)
   spec-musicorgan-streamer-presence-chips-and-rarity-tiers-on-album-surfaces.
   Chips + tier chip + Check-now + override form + grid-card dot + track line.
   OPERATOR-only surfaces (mo_extras.rarity_* filters + the album/card/panel
   templates all gate on `not read_only`); never seen on the Cloud Player. */

/* --- grid-card / accordion-panel corner dot — quiet: unchecked paints nothing */
.mo-rarity-corner { position: absolute; top: .35rem; right: .35rem; z-index: 2; }
.mo-rarity-dot {
  display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--mo-surface-2);
}
.mo-rarity-dot-everywhere { background: var(--mo-text-muted); }
.mo-rarity-dot-tidal-only { background: #0dcaf0; }
.mo-rarity-dot-rare,
.mo-rarity-dot-operator-rare { background: #ffc107; }

/* --- album-page rarity panel (chips + tier + Check-now + override form) --- */
.mo-rarity-panel { min-height: 2rem; }
.mo-rarity-svc { text-decoration: none; }
.mo-rarity-check-form,
.mo-rarity-override-form { display: inline-flex; align-items: center; gap: .3rem; }
.mo-rarity-override-form select,
.mo-rarity-override-form input[type="text"] { font-size: .8rem; }
.mo-rarity-override-form select { max-width: 9rem; }
.mo-rarity-override-form input[type="text"] { max-width: 12rem; }

/* Smooth swap/settle for the Check-now round-trip (pattern-htmx-smooth-
   transitions-swap-settle-focus-reduced-motion, rule 2 — CORRECTED polarity:
   .htmx-swapping fades the OUTGOING node out; .htmx-settling holds the
   INCOMING node invisible so it rises into the base rule's fade-in as the
   class is removed). Worked reference: .mo-invite-panel above. */
.mo-rarity-panel { opacity: 1; transition: opacity 150ms ease-in; }
.mo-rarity-panel.htmx-swapping { opacity: 0; transition: opacity 150ms ease-out; }
.mo-rarity-panel.htmx-settling { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .mo-rarity-panel,
  .mo-rarity-panel.htmx-swapping,
  .mo-rarity-panel.htmx-settling { transition: none; opacity: 1; }
}

/* --- Flare affordance (S4) — the tier-driven Flare pre-state -----------------
   One region (#mo-flare-<id>), four states: the plain Flare button, the
   two-step confirm for an album the streamers already carry, 'Check streamers
   first' when nothing has been checked, and the 'On Cloud Player' badge. The
   states differ in WIDTH, so the region reserves a min-height and the header
   row does not reflow vertically as it swaps between them (transitions rule 3:
   hold the layout). Operator-only — never rendered on the Cloud Player. */
.mo-flare-affordance { min-height: 2rem; }
.mo-flare-check-first { display: inline-flex; align-items: center; }
.mo-flare-confirm-note { max-width: 22rem; line-height: 1.2; }
.mo-flare-cancel { text-decoration: underline; }

/* Same swap/settle polarity as the rarity panel above — this region is swapped
   by its own confirm/cancel GETs AND out of band by the Check-now poll and the
   override POST, so it needs the fade in every direction. */
.mo-flare-affordance { opacity: 1; transition: opacity 150ms ease-in; }
.mo-flare-affordance.htmx-swapping { opacity: 0; transition: opacity 150ms ease-out; }
.mo-flare-affordance.htmx-settling { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .mo-flare-affordance,
  .mo-flare-affordance.htmx-swapping,
  .mo-flare-affordance.htmx-settling { transition: none; opacity: 1; }
}

/* ---- stock Bootstrap cards take the one card shape too ---- */
.card { border-radius: var(--mo-card-radius); box-shadow: var(--mo-card-shadow); }

/* ---- in-place confirm (no browser dialog, no modal): a native <details> whose
   summary is the action button; the panel opens in the flow right under it and
   holds the consequence, the real hx-post button and Cancel. In the flow, never
   floating, so a scrolling table wrapper or a phone screen cannot clip it. ---- */
.mo-confirm { display: inline-block; text-align: left; white-space: normal; }
.mo-confirm[open] { display: block; }
.mo-confirm > summary { list-style: none; cursor: pointer; display: inline-block; }
.mo-confirm > summary::-webkit-details-marker { display: none; }
.mo-confirm-panel {
  margin-top: .35rem; padding: .5rem .6rem; width: min(18rem, 80vw);
  background: var(--mo-surface-2); border: 1px solid var(--mo-border);
  border-radius: var(--mo-card-radius); box-shadow: var(--mo-card-shadow);
}
.mo-confirm-text { margin: 0 0 .45rem; font-size: .85rem; color: var(--mo-text); }

/* ---- static utilities replacing inline style="" (Design System tidy) ---- */
.mo-accent-outline { border-color:var(--mo-accent);color:var(--mo-accent); }
.mo-bar-accent { background-color:var(--mo-accent); }
.mo-bg-accent-tint { background:var(--mo-accent-tint); }
.mo-bg-amber { background:var(--mo-sig-amber);color:#fff; }
.mo-bg-teal { background:var(--mo-sig-teal);color:#fff; }
.mo-bg-violet { background:var(--mo-sig-violet);color:#fff; }
.mo-bg-warn-tint { background:var(--mo-warn-tint); }
.mo-border-accent { border-color:var(--mo-accent) !important; }
.mo-break-all { word-break:break-all; }
.mo-btn-accent { background-color:var(--mo-accent);border-color:var(--mo-accent); }
.mo-btn-teal { background:var(--mo-sig-teal);border-color:var(--mo-sig-teal);color:#fff; }
.mo-fs-sm { font-size:.8rem; }
.mo-h-0-5rem { height: 0.5rem; }
.mo-h-0-6rem { height: 0.6rem; }
.mo-h-14px { height: 14px; }
.mo-icon-lg-accent { font-size:2.5rem;color:var(--mo-accent); }
.mo-logo-h { max-height:2.5rem;width:auto; }
.mo-maxw-11rem { max-width: 11rem; }
.mo-maxw-14rem { max-width: 14rem; }
.mo-maxw-16rem { max-width: 16rem; }
.mo-maxw-18rem { max-width: 18rem; }
.mo-maxw-22rem { max-width: 22rem; }
.mo-maxw-24rem { max-width: 24rem; }
.mo-maxw-28rem { max-width: 28rem; }
.mo-maxw-30rem { max-width: 30rem; }
.mo-maxw-34rem { max-width: 34rem; }
.mo-maxw-40pct { max-width: 40%; }
.mo-maxw-44rem { max-width: 44rem; }
.mo-maxw-48rem { max-width: 48rem; }
.mo-maxw-6rem { max-width: 6rem; }
.mo-maxw-9rem { max-width: 9rem; }
.mo-minw-1-6rem { min-width: 1.6rem; }
.mo-minw-14rem { min-width: 14rem; }
.mo-minw-5-5rem { min-width: 5.5rem; }
.mo-minw-9rem { min-width: 9rem; }
.mo-offscreen { position:absolute;width:0;height:0;overflow:hidden; }
.mo-ph-140 { width:140px;height:140px;background:var(--mo-surface-3); }
.mo-ph-32 { width:32px;height:32px;background:var(--mo-surface-3); }
.mo-pointer { cursor:pointer; }
.mo-pop-18 { z-index:1050;width:18rem; }
.mo-pre-line { white-space:pre-line; }
.mo-pre-wrap { white-space:pre-wrap; }
.mo-scroll-13 { max-height:13rem;overflow:auto; }
.mo-scroll-14 { max-height:14rem;overflow:auto; }
.mo-span-all { grid-column:1/-1; }
.mo-table-fixed { table-layout:fixed; }
.mo-text-accent { color:var(--mo-accent); }
.mo-text-amber-deep { color:var(--mo-amber-deep); }
.mo-text-cardinal { color:var(--mo-cardinal); }
.mo-thumb-140 { width:140px;height:140px;object-fit:cover;background:var(--mo-surface-3); }
.mo-thumb-220 { width:220px;height:220px;object-fit:cover;background:var(--mo-surface-3); }
.mo-thumb-32 { width:32px;height:32px;object-fit:cover; }
.mo-thumb-56 { width:56px;height:56px;object-fit:cover; }
.mo-thumb-88 { width:88px;height:88px;object-fit:cover;background:var(--mo-surface-3); }
.mo-w-11rem { width: 11rem; }
.mo-w-12pct { width: 12%; }
.mo-w-12rem { width: 12rem; }
.mo-w-18rem { width: 18rem; }
.mo-w-2-2rem { width: 2.2rem; }
.mo-w-2-5rem { width: 2.5rem; }
.mo-w-20rem { width: 20rem; }
.mo-w-24pct { width: 24%; }
.mo-w-2rem { width: 2rem; }
.mo-w-3-4rem { width: 3.4rem; }
.mo-w-30pct { width: 30%; }
.mo-w-34pct { width: 34%; }
.mo-w-3rem { width: 3rem; }
.mo-w-46px { width: 46px; }
.mo-w-5-5rem { width: 5.5rem; }
.mo-w-5rem { width: 5rem; }
.mo-w-6-5rem { width: 6.5rem; }
.mo-w-6rem { width: 6rem; }
.mo-w-7-5rem { width: 7.5rem; }
.mo-w-7rem { width: 7rem; }
.mo-w-8rem { width: 8rem; }
.mo-w-9rem { width: 9rem; }

/* repeat-one: Font Awesome Free has no repeat-1 glyph, so the repeat arrows carry a small 1 */
.mo-repeat-one { position: relative; }
.mo-repeat-one::after { content: "1"; position: absolute; right: -.2em; bottom: -.25em; font: 700 .55em/1 var(--ds-font, system-ui); }

/* phone: the scrubber and volume sliders keep a 44px touch row (the native track stays thin inside it) */
@media (max-width: 767.98px) {
  #mo-player .mo-seek, #mo-player.mo-thin .mo-seek, #mo-player .mo-vol { height: 44px; background: transparent; }
}

/* ============ Add a record: pressing cards, stacked tables (HILLS, 2026-11-19) =========
   features/hills/wax_wing_sums_up_the_facts_every_line_has_a_short_form_and_pressings_are_multi_line_cards_on_a_phone.feature
   Below md a pressing is a card of four wrapping lines (label and catalog number; year, country, format;
   have and Discogs link; Compare, Expand, Choose at 44px). From md up the four groups dissolve into the
   one-line row, because display: contents hands their children to the row. Same markup, same htmx. */
@media (min-width: 768px) {
  .mo-press > .mo-press-row > .mo-press-grp { display: contents !important; }
}
@media (max-width: 767.98px) {
  .list-group-flush > .list-group-item.mo-press {
    border: 1px solid var(--bs-border-color) !important; border-radius: .5rem; margin-bottom: .5rem;
  }
  .mo-press-ctl { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .mo-press-ctl input[type="checkbox"], .mo-press-ctl input[type="radio"] { width: 1.4rem; height: 1.4rem; }
  /* A table that stacks: each row a block, each cell led by its column name; nothing is hidden. */
  .mo-stack, .mo-stack thead, .mo-stack tbody, .mo-stack tr, .mo-stack th, .mo-stack td { display: block; width: auto; }
  .mo-stack .mo-stack-corner, .mo-stack thead.mo-stack-colhead { display: none; }
  .mo-stack tr { border-bottom: 1px solid var(--bs-border-color); padding: .25rem 0; }
  .mo-stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
}

/* Add a record: a button that asks Discogs answers at once. hx-disabled-elt disables the form's submit button for
   the life of the call, and the working line shows only while it is disabled. It keys on the disabled button, not
   on .htmx-request: the body's hx-indicator sends that class to the page progress bar, never to the form. */
.mo-busy { display: none; font-size: .875em; color: var(--bs-secondary-color); }
form:has(.mo-go:disabled) .mo-busy { display: inline; }
.mo-go:disabled { cursor: progress; }
