/* Three themes. DesTours is the default: it applies when no theme was chosen,
   before any script runs. The attribute is set on <html> by index.html from the
   saved choice, so a chosen theme paints on the first frame. */
:root {
  --radius: 10px;
}

:root,
[data-theme="destours"] {
  color-scheme: light;
  --bg: #dca3d0;
  /* The page is the logo's gradient, softened, under a faint dark veil that
     deepens it without shifting its hues. --bg is its middle stop, for
     anything that needs a flat colour. */
  --page: linear-gradient(rgba(30, 10, 45, .08), rgba(30, 10, 45, .08)),
          linear-gradient(160deg, #efbdb4 0%, #dca3d0 50%, #bd8ae6 100%);
  --field: #f5e7f4;
  --panel: #fdf6fb;
  --panel-2: #f5e7f4;
  --line: #e6cce6;
  --ink: #231a2e;
  /* Darker than on a plain panel would need: hints also sit straight on the
     pink page, outside any card. */
  --muted: #4a3a5c;
  /* Dimmer than --muted, which labels use: a placeholder is an example, and
     must never be mistaken for a value already typed in. */
  --placeholder: #ab9db8;
  --accent: #7a3fe0;
  --accent-ink: #ffffff;
  --accent-line: #cdb5f3;
  --ok: #157a5c;
  --ok-bg: #e2f4ed;
  --ok-line: #a9d9c8;
  --warn: #8a6100;
  --warn-bg: #f8eed6;
  --warn-line: #e2cb8f;
  --err: #c22f45;
  --err-bg: #fbe5e9;
  --err-line: #ebb4be;
  --shadow: 0 12px 28px rgba(70, 20, 110, .22);
  --overlay: rgba(60, 20, 90, .45);
  /* The pink-to-violet half of the logo's gradient under a violet veil: white
     text on its peach end would not be readable. */
  --header: linear-gradient(rgba(50, 15, 90, .3), rgba(50, 15, 90, .3)),
            linear-gradient(120deg, #d58fa8 0%, #b279c5 45%, #9051e7 100%);
  --header-ink: #ffffff;
  --header-muted: rgba(255, 255, 255, .82);
  --header-active: rgba(255, 255, 255, .2);
  --header-line: transparent;
  /* Pills that sit straight on the page (the wizard's steps) need a backing on
     the pink; the flat themes leave them see-through. */
  --on-page: rgba(253, 246, 251, .6);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11131a;
  --page: var(--bg);
  --field: #11131a;
  --panel: #181b24;
  --panel-2: #1f2331;
  --line: #2c3142;
  --ink: #e8eaf0;
  --muted: #9aa2b8;
  --placeholder: #51586a;
  --accent: #7aa2ff;
  --accent-ink: #10131c;
  --accent-line: #445887;
  --ok: #4ec9a5;
  --ok-bg: #17322b;
  --ok-line: #307662;
  --warn: #e3b341;
  --warn-bg: #3a2f16;
  --warn-line: #866a29;
  --err: #ff7a85;
  --err-bg: #3a1d22;
  --err-line: #93474f;
  --shadow: 0 12px 28px rgba(0, 0, 0, .45);
  --overlay: rgba(8, 10, 16, .72);
  --header: var(--panel);
  --header-ink: var(--ink);
  --header-muted: var(--muted);
  --header-active: var(--panel-2);
  --header-line: var(--line);
  --on-page: transparent;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --page: var(--bg);
  --field: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #eff1f5;
  --line: #dfe2e8;
  --ink: #1a1d26;
  --muted: #5b6273;
  --placeholder: #a2a8b5;
  --accent: #3d63d6;
  --accent-ink: #ffffff;
  --accent-line: #b7c6ef;
  --ok: #157a5c;
  --ok-bg: #e2f4ed;
  --ok-line: #a9d9c8;
  --warn: #8a6100;
  --warn-bg: #f8eed6;
  --warn-line: #e2cb8f;
  --err: #c22f45;
  --err-bg: #fbe5e9;
  --err-line: #ebb4be;
  --shadow: 0 12px 28px rgba(20, 30, 60, .14);
  --overlay: rgba(26, 29, 38, .38);
  --header: var(--panel);
  --header-ink: var(--ink);
  --header-muted: var(--muted);
  --header-active: var(--panel-2);
  --header-line: var(--line);
  --on-page: transparent;
}

* { box-sizing: border-box; }

/* What the user's role is refused (app/core/role.js): above every rule
   that shows an element, and whatever its `hidden` says. Nobody signed in
   reaches no mark. */
body:not([data-viewer="team"], [data-viewer="admin"]) [data-role="team"],
body:not([data-viewer="admin"]) [data-role="admin"] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page) fixed;
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--header-line);
  background: var(--header);
  color: var(--header-ink);
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 { margin: 0; }
/* A soft shadow lifts the logo off the DesTours theme's purple header, whose
   colours are close to its own. */
header h1 .brand-logo { display: block; height: 30px; width: auto; filter: drop-shadow(0 1px 2px rgba(30, 10, 60, .3)); }

nav { display: flex; gap: 4px; margin-left: auto; }

nav button {
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
nav button:hover { color: var(--ink); }
nav button.active { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
header nav button { color: var(--header-muted); }
header nav button:hover { color: var(--header-ink); }
header nav button.active { background: var(--header-active); color: var(--header-ink); border-color: var(--header-line); }

/* Who is signed in, right of the navigation behind a thin rule: a chip that
   opens the user's menu (app/core/user-menu.js). The menu sits on a
   panel, in the page's colours, not the header's. */
header .session { position: relative; display: flex; align-items: center; gap: 16px; font-size: 13px; }
header .session::before {
  content: "";
  width: 1px;
  height: 22px;
  background: var(--header-muted);
  opacity: .35;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--header-active);
  border-radius: 999px;
  padding: 3px 12px 3px 3px;
  color: var(--header-ink);
  font: inherit;
  cursor: pointer;
}
.user-chip:hover { background: var(--header-active); }
/* Open, or on a page the menu leads to: Comptes, Paramètres. */
.user-chip[aria-expanded="true"],
.user-chip.current { border-color: var(--accent); }
.user-chip .caret { font-size: 10px; color: var(--header-muted); }

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--ok));
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
}
.avatar.large { width: 40px; height: 40px; font-size: 14px; }

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.user-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.user-head .tag { margin: 3px 0; }
.user-name { font-weight: 600; }
.user-email { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.user-group { border-top: 1px solid var(--line); padding: 8px 0; }
.user-label {
  padding: 2px 16px 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.user-group > button {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  padding: 7px 16px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.user-group > button:hover,
.user-group > button:focus-visible { background: var(--panel-2); }
#sign-out.danger { color: var(--err); }

/* Three segments, the theme on screen lit. */
.theme-switch {
  display: flex;
  margin: 2px 16px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.theme-switch button {
  flex: 1;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.theme-switch button + button { border-left: 1px solid var(--line); }
.theme-switch button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); font-weight: 600; }
/* The same segments in Settings, for the person's preferences: without the
   menu's margins, and no wider than a few choices need. */
.settings-prefs .theme-switch { margin: 0; max-width: 320px; }
/* And in the wizard's step 1, for a release's medium. */
.medium-switch.theme-switch { margin: 0; max-width: 320px; }
.settings-pref + .settings-pref { margin-top: 16px; }
.settings-pref-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.settings-pref .msg { margin: 8px 0 0; }
/* The password card: the sign-in form's fields, as wide as there. */
.settings-password { max-width: 380px; }
.settings-password label { margin-top: 12px; }
.settings-password label:first-of-type { margin-top: 0; }
.settings-password .hint { margin: 12px 0 0; }
.settings-password .msg { margin: 12px 0 0; }
.settings-password button[type="submit"] { margin-top: 16px; }

/* ---- Sign-in screen ---- */

/* Over everything the app may have open — a modal, the player bar — on the
   theme's page background. The header stays above it, without its navigation
   or session: nobody is signed in to use them. The activation screen is drawn
   the same, in the sign-in screen's place. */
#login,
#activate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 90px 16px 24px;
  overflow: auto;
  background: var(--page) fixed;
}
#login[hidden],
#activate[hidden] { display: none; }
/* Until the server has said who is signed in, and for somebody who is, until
   the first page is filled (app/main.js): the page background alone, then
   everything at once. Hidden rather than removed, so nothing moves when it
   shows. */
body.booting main,
body.booting > header { visibility: hidden; }
/* Just signed in, while the first page fills (app/main.js): the header stays,
   as it was over the sign-in screen; the page under it waits. */
body.loading main { visibility: hidden; }
body.signed-out header { z-index: 210; }
/* Invisible rather than removed, as while booting: they give the header its
   height, which then stays the same signed in or out. Invisible is neither
   clicked nor reached with the Tab key. */
body.signed-out header nav,
body.signed-out header .session { visibility: hidden; }

.login-card {
  width: 100%;
  max-width: 380px;
  box-sizing: border-box;
  margin: 0;
  box-shadow: var(--shadow);
}
.login-logo { display: block; width: 230px; height: auto; margin: 6px auto 20px; }
.login-card label { margin-top: 12px; }
.login-password { position: relative; }
.login-password input { padding-right: 84px; }
/* Inside the field, at its right end. */
.login-eye {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.login-eye:hover { color: var(--ink); }
.login-card input.invalid { border-color: var(--err); }
.login-msg .msg { margin: 14px 0 0; }
.login-submit { width: 100%; margin-top: 16px; }
.login-help-row { display: flex; justify-content: center; margin-top: 14px; }
/* The screen's languages: the one spoken stands out, and is no link. */
.login-locales {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.login-locales button.link { color: var(--muted); }
.login-locales button.link:disabled { opacity: 1; color: var(--ink); font-weight: 600; cursor: default; }
/* The forms' "?", larger, its bubble centred above it. */
.help.login-help {
  width: 22px;
  height: 22px;
  margin: 0;
  background: var(--panel-2);
  font-size: 12.5px;
  cursor: pointer;
}
.login-help .bubble {
  left: 50%;
  transform: translateX(-50%);
  max-width: 260px;
  background: var(--panel);
  text-align: center;
}

/* Read by screen readers, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main { padding: 24px; max-width: 1100px; margin: 0 auto; }

.view { display: none; }
.view.active { display: block; }

h2 { font-size: 16px; margin: 0 0 4px; }
h3 { font-size: 13px; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

input, select, textarea {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 7px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
/* A field locked on the sheet must not look like one waiting to be typed in:
   faded like the disabled controls, and no focus colour to suggest otherwise. */
#fiche input[readonly],
#recording-modal input[readonly],
#user-sheet input[readonly] { opacity: .55; cursor: default; }
#fiche input[readonly]:focus,
#recording-modal input[readonly]:focus,
#user-sheet input[readonly]:focus { border-color: var(--line); }

/* Chrome's default placeholder grey sits too close to typed text in the dark
   theme; every theme sets its own, clearly dimmer than a real value.
   `opacity: 1` because Firefox applies its own on top. */
input::placeholder, textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}
/* Date and time fields keep the browser's own hint: an empty one that is not
   required still matches :valid, so CSS has no state to hook onto, and
   "jj/mm/aaaa" reads as a format rather than as a value anyway. */

/* One reference height for every control: the text field's. Left alone, a
   select renders 33px and a button 37.5px against its 35.5px. */
input:not([type="checkbox"]):not([type="file"]),
select,
button.primary,
button.ghost,
a.button.ghost {
  height: 36px;
}

/* The native select chrome is what makes it shorter, so it is replaced. */
select {
  appearance: none;
  padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Every menu of the tool opens on a list drawn like the party and instrument
   fields' suggestions, not the system's. Chrome and Edge draw it so
   (customizable select); elsewhere a menu keeps the system's list, and works
   the same. The arrow stays the one drawn above. */
select,
select::picker(select) { appearance: base-select; }
select::picker-icon { display: none; }
/* Drawn so, a menu no longer cuts the chosen option's text as the system's
   did: a narrow one — the distribution's prices, its offers — cuts it
   itself, at the edge of its content, so that the text stops short of the
   arrow drawn in the padding on its right instead of running under it. */
select { overflow: clip; overflow-clip-margin: content-box; white-space: nowrap; }
/* Under the menu, always, as the suggestion lists open — Chrome would take
   the side with more room, and change sides as the page scrolls. Near the
   bottom of the window it gets shorter instead, and scrolls: its height is
   capped by the room under the menu. */
select::picker(select) {
  position-area: block-end span-inline-end;
  position-try-fallbacks: none;
  margin-top: 4px; padding: 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  max-height: min(260px, calc(100% - 12px)); overflow-y: auto;
  box-shadow: var(--shadow);
}
select option {
  padding: 7px 10px; border-radius: 6px;
  color: var(--ink); font-size: 13px; font-weight: 400; cursor: pointer;
}
select option::checkmark { display: none; }
select option:hover,
select option:focus-visible { background: var(--panel); outline: none; }
select option:checked { color: var(--accent); }
select option:disabled { color: var(--muted); cursor: default; }
/* A group's name — the territories' "Pays", "Regroupements" — above its
   options, as a heading rather than one of them. */
select optgroup { color: var(--muted); font-size: 11.5px; font-weight: 600; }

input[type="checkbox"] { width: auto; }
input[type="file"] { padding: 6px 9px; }

.check { display: flex; align-items: center; gap: 7px; margin-top: 18px; }
.check label { margin: 0; }
/* Beside the writers' button: the box that stands for the writer nobody
   knows. */
.t-traditional-check { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 16px; vertical-align: middle; }
.t-traditional-check .help { margin-left: 0; }

/* a.button: a link drawn as a button — a download is a link, which the
   browser follows, names and shows the progress of. */
button.primary, button.ghost, a.button.ghost {
  border-radius: 7px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--line);
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.ghost, a.button.ghost { background: var(--panel-2); color: var(--ink); }
a.button {
  display: inline-flex; align-items: center; gap: 6px;
  box-sizing: border-box; text-decoration: none; white-space: nowrap;
}
a.button[hidden] { display: none; }
button:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* A step's or a modal's buttons, under what they act on. */
.row-end { margin-top: 16px; }
/* A cell of a .grid as wide as the grid. */
.cell-wide { grid-column: 1 / -1; }
/* After .hint, which they adjust: a hint on a line or in a head of its own,
   without the gap under it; a hint under the field it is about. */
.hint-tight { margin: 0; }
.hint-under { margin: 8px 0 0; }
/* The space between two blocks, where no rule of theirs sets it. */
.space-above-10 { margin-top: 10px; }
.space-above-12 { margin-top: 12px; }
.space-above-14 { margin-top: 14px; }
.space-below-12 { margin-bottom: 12px; }

.release {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
}
.release img, .cover-none {
  width: 120px; height: 120px; border-radius: 8px; object-fit: cover;
  background: var(--panel-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; text-align: center;
}

.tag {
  display: inline-block;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 4px 4px 0;
}
.tag.ok { color: var(--ok); border-color: var(--ok-line); }
.tag.warn { color: var(--warn); border-color: var(--warn-line); }
.tag.err { color: var(--err); border-color: var(--err-line); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
td.num { color: var(--muted); width: 32px; }
tr:last-child td { border-bottom: none; }

.block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--panel-2);
}
.block header { all: unset; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.block h4 { margin: 0; font-size: 13px; }

.msg { padding: 10px 13px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; white-space: pre-wrap; }
.msg.err { background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); }
.msg.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.msg.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.msg.info { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }

/* One line as long as it fits. Narrower, the save button goes under the chips
   — then the chips themselves — rather than being squeezed or scrolled out of
   sight: the row with the button needs about 1070px. */
.steps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.steps div[data-step] {
  display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap;
  font-size: 12px; color: var(--muted);
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--on-page);
}
.steps div.current { color: var(--ink); background: var(--panel-2); border-color: var(--accent); }
/* Reached steps invite a click; the ones ahead are not doors yet. */
.steps div.reachable { cursor: pointer; }
.steps div[data-step]:not(.reachable) { opacity: .5; }
/* The distribution's chip, hidden for a physical edition: `display` above
   beats the `hidden` attribute. */
.steps div[data-step][hidden] { display: none; }
/* The save button: a button like "Suite", beside it, with the chips' dot —
   amber while something is to be saved, green once it is. */

.empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 13px; }

h4.group {
  font-size: 13px;
  margin: 24px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
h4.group:first-of-type { margin-top: 6px; padding-top: 0; border-top: none; }
h4.group + .hint { margin-top: -4px; }

/* Every control on one line, bottom-aligned: the cell without a label — the
   remove button — lands level with the fields instead of needing a margin. */
.contributor-line { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.contributor-line > div { flex: 1 1 170px; min-width: 0; }
.contributor-line > .instrument-cell { flex: 2 1 260px; }
.contributor-line > .remove-cell { flex: 0 0 auto; }
.instrument-cell .row { flex-wrap: nowrap; }
.instrument-cell .row > .instrument-picker { flex: 1 1 auto; min-width: 0; }
.instrument-cell .row > button { flex: none; }

/* A party field is a text input with our own suggestion list under it, and no
   button beside it: creating an intervenant is the last row of the list. The
   instrument field's list is drawn the same. */
.party-cell input.unknown { border-color: var(--warn); }
.party-picker,
.instrument-picker,
.release-picker { position: relative; }
.party-picker > input,
.instrument-picker > input,
.release-picker > input { width: 100%; }
.party-options,
.instrument-options,
.release-options {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  /* Eight rows or so, then it scrolls: a catalogue's worth of names would run
     off the bottom of the screen. */
  max-height: 260px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.party-option,
.instrument-option,
.release-option {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.party-option:hover, .party-option.active,
.instrument-option:hover, .instrument-option.active,
.release-option:hover, .release-option.active { background: var(--panel); }
.party-option .precision,
.release-option .precision { color: var(--muted); }
/* Said once, under the rows, when more names match than the list shows; and
   in place of the rows when no release is offered. */
.party-more,
.release-none { padding: 6px 10px; color: var(--muted); font-size: 12px; }
/* Last and set apart: it is an action, not one of the names above it. */
.party-option.new-party {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  border-radius: 0 0 6px 6px;
}

/* Inline help: a "?" after a label, opening a bubble on hover or on focus.
   The text sits in the DOM rather than in a data attribute, so a screen reader
   can reach it and the bubble can hold markup — an example in code, say. */
.help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10.5px;
  cursor: help;
  vertical-align: middle;
}
/* :focus rather than :focus-visible — a click or a tap must open the bubble
   too, and this carries no action that a stray focus could trigger. */
.help:hover, .help:focus {
  color: var(--ink);
  border-color: var(--accent);
  outline: none;
}

.help .bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 9px);
  left: -10px;
  width: max-content;
  max-width: 300px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 50;
  /* The label above is muted, small and uppercase in places: reset it all, or
     the bubble inherits a style meant for a one-word caption. */
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  cursor: auto;
}
.help:hover .bubble, .help:focus .bubble { display: block; }
.help .bubble code {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}
/* A help bubble's headings: "C'est quoi ?", "Quoi mettre ?"… one line each,
   above their text. */
.help .bubble .bubble-head {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.help .bubble .bubble-head:first-child { margin-top: 0; }

/* Reordering the display artists. Only the handle carries `draggable`: making
   the whole row draggable would stop the party field's text from being
   selectable with the mouse. */
/* `.contributor-line > div` sets flex: 1 1 170px and beats a lone class on
   specificity, so the selector has to match the way .remove-cell does. */
.contributor-line > .handle-cell { flex: 0 0 auto; }
.handle-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
  height: 36px;
}
.drag-handle {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: grab;
  font-size: 15px;
  line-height: 1;
  padding: 6px 4px;
}
.drag-handle:hover { color: var(--ink); }
.drag-handle:focus-visible { outline: none; border-color: var(--accent); color: var(--ink); }
.drag-handle:active { cursor: grabbing; }
.drag-handle[disabled] { cursor: default; opacity: .35; }
.handle-cell .position {
  color: var(--muted);
  font-size: 12.5px;
  min-width: 12px;
  text-align: right;
}
/* The artist and credit rows go unframed, wherever they are listed: the
   space under each, a block's, is kept. */
.artist-row,
.contributor-row { padding: 0; border: 0; background: none; }
/* An artist's handle sits at the right end of its row, past "Retirer", as a
   track's does on its line: the number, then the handle — in a cell of one
   width, whatever the number. */
.artist-row .contributor-line > .handle-cell { order: 1; flex-direction: row-reverse; width: 44px; }
/* The credits listed under the artists — a track's, step 3's — keep that
   cell's room and the gap before it free on their right: their "Retirer"
   lines up with the artists'. */
.t-credits .contributor-line,
#release-credits .contributor-line { padding-right: 56px; }
/* One rule for every list that reorders: artists, the tracks' table. */
.dragging { opacity: .45; }

/* Deal block: each zone takes a full row of the grid, its controls on one
   line. Left to the auto-fit columns they scatter with wide gaps between. */
/* Step 6 and the sheet's modal share this form: two columns where there is
   room, one where there is not — the grid decides, no code. */
.dist-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 24px; }
.dist-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.deal-zone .row { flex-wrap: nowrap; }
/* Date, time, synchronisation and timezone: too many for a narrow column. */
.deal-zone .row.start-row { flex-wrap: wrap; }
.deal-zone .row > select.mode-select { flex: 0 0 120px; }
.deal-zone .row > select { flex: 1 1 auto; min-width: 0; }
.deal-zone .row > button { flex: none; }
.deal-zone .row > input[readonly] {
  flex: 0 0 150px;
  background: var(--panel-2);
  color: var(--muted);
  cursor: default;
}
.deal-zone .row > input[type="time"] { flex: 0 0 120px; }
.deal-zone .row > .check { flex: none; margin-top: 0; }
/* Two long controls side by side: they wrap rather than overflow. */
.platforms .row { flex-wrap: wrap; }
/* The mode, then the picker twice as wide. The mode's selector outweighs
   `.deal-zone .row > select` above. */
.deal-zone .row > select.d-channel-mode { flex: 1; min-width: 190px; }
.d-dsp-picker { flex: 2; min-width: 230px; }
.d-dsp-input { flex: 1; min-width: 150px; }
.period-line { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.period-line > .type-cell { flex: 0 1 240px; }
.period-line > div { flex: 1 1 auto; min-width: 0; }
.period-line > .remove-cell { flex: 0 0 auto; }

/* One line per DisplayTitle/SubTitle. */
.sub-title-line { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.sub-title-line > .text-cell { flex: 1 1 auto; min-width: 0; }
.sub-title-line > .type-cell { flex: 0 1 150px; }
.sub-title-line > .remove-cell { flex: 0 0 auto; }
.sub-title-line .check { margin-top: 0; }
.sub-title-line .check label { white-space: nowrap; }

/* The derived title: shown, never typed. */
.derived { margin-top: 12px; }

/* One line per PartyId/ProprietaryId, inside the create-party modal. */
.identifier-line { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.identifier-line > div { flex: 1 1 auto; min-width: 0; }
.identifier-line > .namespace-cell { flex: 0 1 150px; }
/* A known partner's namespace reads as a label, not as an editable field. */
.identifier-line .fixed-namespace { display: block; font-size: 13px; padding: 7px 0; }
/* Keeps the fixed rows' columns aligned with the free ones, which have a button. */
.identifier-line > .remove-cell { flex: 0 0 auto; min-width: 74px; }
/* The value, and the link to the page it names — shown only once there is an
   identifier to open. */
.identifier-line > .value-cell { display: flex; align-items: center; gap: 8px; }
.identifier-line .i-value { flex: 1 1 auto; min-width: 0; }
.open-identifier {
  flex: 0 0 auto; font-size: 12px; color: var(--accent); text-decoration: none;
}

/* The short list a click on "Rechercher" opens: a thumbnail, the identifier
   that would be stored, and a link to check with before anything is written
   into the field. */
.identifier-search-results {
  margin: -4px 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}
.search-result { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.search-result + .search-result { border-top: 1px solid var(--line); }
.search-result-thumb {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto; background: var(--panel);
  /* Only ever holds the initial, when there is no picture to put here. */
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-transform: uppercase;
}
.search-result-info { flex: 1 1 auto; min-width: 0; }
.search-result-name { display: block; font-size: 13px; }
.search-result-meta { font-size: 12px; color: var(--muted); }
.search-result-meta a { color: inherit; }

/* Table-row buttons: the 36px reference height belongs to form controls and
   would make every row of the party list tall. */
button.primary.small, button.ghost.small, a.button.ghost.small {
  height: 28px;
  padding: 0 11px;
  font-size: 12.5px;
}
td.actions { text-align: right; white-space: nowrap; }
td.actions button + button { margin-left: 6px; }
em.muted { color: var(--muted); font-style: normal; }

/* A name that opens its edit modal. A button rather than a link or a click on
   the row: it takes the focus and answers Enter without any extra code, and it
   reads as text until hovered. */
button.link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
/* The colour says it, no underline: the same everywhere in the tool. */
button.link:hover { color: var(--accent); }
/* One that erases says so, hovered or not. */
button.link.danger, button.link.danger:hover { color: var(--err); }
button.link:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* A card's title and its create button, on one line. */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.card-head h3 { margin: 0; }
/* Also a page's title and its create button (Catalogue): the hint's margin
   moves onto the head, or the button would be centred on a block ending in
   18px of nothing. */
.view > .card-head { margin-bottom: 18px; }
.view > .card-head .hint { margin: 0; }
/* On a narrow screen the title wraps, never the button: a 28px button on two
   lines spills out of itself. */
.card-head > button { flex: none; white-space: nowrap; }

/* The "Cancel" / "Confirm" of an armed delete button: laid out as if they
   stood in the button's place. */
.delete-asked { display: contents; }

/* Author styles beat the browser's `[hidden] { display: none }`, so every
   flex or grid container toggled with `hidden` needs its own line — without
   it the modal overlay or the platform picker would stay on screen for
   ever. */
.modal[hidden],
.row[hidden],
.chips[hidden],
.masters-strip[hidden],
.kind-row[hidden],
.tag[hidden],
.link-box[hidden],
label.choice[hidden],
#m_disambiguation_hint[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card h3 { margin-bottom: 14px; }

/* The wizard's own dialog, native: the look of the modal cards, the top layer
   and Escape of a <dialog>. The UA's colour and size are the ones to undo. */
.wizard-dialog { color: var(--ink); width: min(560px, 92vw); }
/* Custom properties reach ::backdrop only in recent browsers: the fallback is
   the dark theme's own veil. */
.wizard-dialog::backdrop { background: var(--overlay, rgba(8, 10, 16, .86)); }
.wizard-dialog .dialog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wizard-dialog .dialog-head h3 { margin: 0; }
.wizard-dialog .dialog-body ul { margin: 6px 0 14px 18px; }
.wizard-dialog .dialog-body li { margin: 2px 0; }
.wizard-dialog .dialog-foot {
  display: flex; justify-content: flex-end;
  padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line);
}
/* Two fields: at the party modal's width they would float in empty space. */
.modal-card.narrow { max-width: 420px; }
/* A window's message, just above its buttons: next to the click it answers. */
.modal-msg > .msg { margin: 14px 0 0; }

/* "Fusionner…": a column per party in its table of values, wider than the
   others. The cards of the parties wrap on a narrow window, the table
   scrolls sideways. */
.merge-card { max-width: 760px; }
/* Its labels hold a choice, not a field's name: the text's own size and
   colour. Its radio buttons are not text fields: without this they take the
   fields' full width and 36px height, and push their text aside. */
.merge-card label { margin: 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.merge-card input[type="radio"] {
  flex: none; width: auto; height: auto; padding: 0; margin: 2px 0 0; accent-color: var(--accent);
}
.merge-fiches { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.merge-fiche {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px;
}
.merge-fiche small { display: block; margin-top: 2px; }
.merge-fiche.kept { border-color: var(--accent); background: var(--panel-2); }
.merge-values-wrap { overflow-x: auto; }
/* A column is a party: its name as written, its account under it — not the
   small capitals of a table's headings, which the fields' names keep. */
.merge-values thead th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--ink); vertical-align: bottom; }
.merge-values thead small { font-size: 12px; font-weight: 400; }
.merge-values th[scope="row"] { white-space: nowrap; vertical-align: top; }
.merge-values td { vertical-align: top; }
.merge-values label { display: flex; align-items: flex-start; gap: 8px; }
.merge-values .mono { overflow-wrap: anywhere; }
.merge-values td.chosen { background: var(--panel-2); }
.merge-values em.muted { font-style: italic; }
.merge-after { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.merge-after li { display: flex; align-items: baseline; gap: 8px; }
.merge-after li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); transform: translateY(-1px);
}
.merge-after li.warn::before { background: var(--warn); }

/* "Doublons possibles": the cards' buttons in the warning's colours, and the
   window's groups, the buttons going under the names on a phone. */
button.ghost.duplicates-button {
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); font-weight: 600;
}
.duplicates-card { max-width: 640px; }
.duplicate-groups { display: grid; gap: 8px; }
.duplicate-group {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.duplicate-group .muted { font-size: 12.5px; margin: 2px 0 6px; }
.duplicate-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 520px) {
  .duplicate-group { grid-template-columns: minmax(0, 1fr); }
  .duplicate-actions { justify-content: flex-start; }
}

/* "Livrer…": wider than the others, for its tables of platforms and of
   packages; each scrolls sideways rather than squeezed on a narrow screen. */
.delivery-card { max-width: 1180px; width: min(1180px, 96vw); }
#delivery-platforms, #delivery-history { overflow-x: auto; }
.delivery-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.delivery-head-text { flex: 1; min-width: 0; }
.delivery-head h3 { margin: 0 0 2px; }
.delivery-head .tag { margin: 0; }
.delivery-cover { width: 56px; height: 56px; }
#delivery-blocking ul { margin: 6px 0 0 18px; }
.delivery-table { margin: 4px 0 12px; }
.delivery-table td:first-child { width: 28px; }
.delivery-table input[type="checkbox"] { width: auto; height: auto; }
.delivery-table .tag { margin: 0; white-space: normal; }
/* The table scrolls sideways, which clips what leaves it: a bubble opened
   upwards from the first row would be cut, so these open down and leftwards. */
.delivery-table .help .bubble { top: calc(100% + 9px); bottom: auto; left: auto; right: -10px; }
.delivery-table .help .bubble ul { margin: 6px 0 0; padding-left: 18px; }
.delivery-actions { align-items: center; gap: 10px; }
.delivery-send { display: inline-flex; flex-direction: column; align-items: center; }
.delivery-send small { color: var(--muted); font-size: 11px; }
/* What a package does: an update in the accent, nothing new dimmed. */
.tag.update { color: var(--accent); border-color: var(--accent-line); }
.tag.idle { opacity: .6; }
.delivery-history-actions { white-space: nowrap; }
/* What the last preparation wrote: a line per package, its path to copy. */
.delivery-packages { white-space: normal; }
.delivery-package { margin-top: 10px; }
.delivery-package .link-box { margin-top: 6px; }
/* A sending under way: its bar under its figures. */
.delivery-bar { display: block; margin-top: 4px; max-width: 200px; }
.delivery-acks { margin-bottom: 4px; }
/* "Refusé…": the reason asked in the row's own cell. */
.delivery-reject { flex-wrap: nowrap; gap: 6px; }
.delivery-reject input { min-width: 180px; }
/* A platform's key saved: its public half, to copy for the platform. */
#pm-key-saved textarea { margin: 6px 0; font-family: ui-monospace, monospace; font-size: 11px; }
#pm_private_key { font-family: ui-monospace, monospace; font-size: 11px; }

/* The tool's yes-or-no question, native like the wizard's dialog and drawn
   like the narrow modals: a title, the question, the two answers. */
.confirm-dialog { color: var(--ink); width: min(420px, 92vw); }
.confirm-dialog::backdrop { background: var(--overlay, rgba(8, 10, 16, .86)); }
.confirm-dialog p { margin: 0; }
.confirm-dialog p + p { margin-top: 10px; }
.confirm-dialog .row { margin-top: 16px; }

/* The notes under a party's name: a homonym, a rename. Neither blocks. */
.name-notes { grid-column: 1 / -1; }
.name-notes p { margin: 0; font-size: 12.5px; color: var(--muted); }
.name-notes p + p { margin-top: 4px; }
.name-notes p.homonym { color: var(--warn); }

/* Under the field it asks to fill, and in the warning colour: it is not a hint
   but an obligation, and it names the parties already stored. */
#m_disambiguation_hint {
  display: block; margin-top: 4px; font-size: 12px; color: var(--warn);
}
/* The legal name under the name in the party tables, where `em.muted` above
   serves the missing-name placeholder. */
small.muted { color: var(--muted); }

/* One line per LanguageOfPerformance. Centre-aligned rather than bottom-
   aligned: no cell on the row carries a label of its own. */
.language-line {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px;
}
/* A floor for the menu: the last line also carries « Ajouter une langue »,
   which would otherwise squeeze it down to its arrow on a narrow screen. The
   buttons wrap under it instead. */
.language-line > .code-cell { flex: 0 1 260px; min-width: 180px; }
.language-line > .remove-cell,
.language-line > .add-cell { flex: 0 0 auto; }
.language-line .check { margin-top: 0; }
/* The label wraps its box, so clicking « Principale » ticks it. */
.language-line .check label {
  display: flex; align-items: center; gap: 7px;
  margin: 0; white-space: nowrap; cursor: pointer;
}
/* .check is a flex box: without this, `hidden` would not hide it. */
.language-line > [hidden] { display: none; }

/* Lyrics: a language line like the audio languages', with its text under it.
   The label wraps its box, so clicking « Originale » ticks it. */
.lyrics-line { margin-bottom: 12px; }
/* Same floor as the audio languages' menu; on a narrow screen the buttons
   wrap under it rather than squeezing it. */
.lyrics-line > .row { gap: 8px 12px; }
.lyrics-line > .row > .code-cell { flex: 0 1 260px; min-width: 180px; }
/* .check is a flex box: without this, `hidden` would not hide it. */
.lyrics-line > .row > [hidden] { display: none; }
.lyrics-line .check { margin-top: 0; }
.lyrics-line .check label {
  display: flex; align-items: center; gap: 7px;
  margin: 0; white-space: nowrap; cursor: pointer;
}
/* Under the text it counts, so the language line keeps room for its buttons. */
.lyrics-line .ly-count { display: block; text-align: right; color: var(--muted); font-size: 12px; margin-top: 2px; }
.lyrics-line .ly-text { margin-top: 6px; resize: vertical; }

/* The mode governs the whole list — a DealTerms carries an inclusion list or
   an exclusion list, never both — so the chips are tinted together. Colouring
   them one by one would suggest they can differ, which is the very shape the
   xs:choice forbids. */
.chips.including .chip { border-color: var(--ok-line); color: var(--ok); }
.chips.excluding .chip { border-color: var(--warn-line); color: var(--warn); }
.territory-summary { margin: 9px 0 0; color: var(--ink); font-size: 12.5px; }
.territory-warning { margin: 8px 0 0; color: var(--warn); font-size: 12.5px; }
.territory-notice > .msg { margin: 8px 0 0; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; min-height: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--field); border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 6px 3px 11px; font-size: 12px;
}
.chip button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px;
}
.chip button:hover { color: var(--err); }

/* The offers' families, each under its title. */
.offer-family { margin-top: 12px; }
/* A video release has no AI offer; a platform that takes no clip, named on
   one, is greyed. */
.offer-family[hidden] { display: none; }
.chips .chip.disabled { opacity: 0.5; text-decoration: line-through; }
.offer-family-title {
  display: flex; align-items: center; gap: 6px; margin: 0 0 2px;
  font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.offer-family-title .help { margin-left: 0; }
/* One offer, one line, three columns: the box and its name; what the offer
   lets the operator narrow (scope, policy or price tiers); the tracks it
   reaches — and a fourth for Content ID's block before release day. Fixed
   columns, so the "Pistes" menus of a family line up. The settings stay in
   the flow and only show once the box is ticked: the line keeps its height,
   the column its place. Everything under .offer: the preview has an
   .offer-name of its own. */
.offer {
  display: grid; grid-template-columns: minmax(240px, 1fr) 220px auto auto;
  align-items: center; gap: 0 12px; min-height: 36px;
}
/* The fields at the tool's height: one offer's menus would touch the next
   one's without this space between the lines. */
.offer + .offer { margin-top: 6px; }
.offer .offer-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.offer label.offer-check {
  display: flex; align-items: center; gap: 8px;
  margin: 0; font-size: 13px; color: var(--ink); cursor: pointer;
}
.offer .help { margin-left: 0; }
.offer .offer-mid select { width: 100%; max-width: 220px; font-size: 12px; }
.offer .offer-mid { display: flex; align-items: center; gap: 4px; min-width: 0; }
.offer .offer-prices { display: flex; gap: 6px; flex: 1; min-width: 0; }
.offer .offer-mid .offer-prices select { flex: 1; width: auto; min-width: 0; }
/* The "?" of the middle and last columns sits near the card's right edge,
   which clips: their bubbles open leftwards. */
.offer :is(.offer-mid, .offer-extra) .help .bubble { left: auto; right: -10px; }
.offer .offer-tracks { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.offer:not(.on) .offer-mid, .offer:not(.on) .offer-tracks, .offer:not(.on) .offer-extra { visibility: hidden; }
/* Content ID's block before release day, after its tracks. */
.offer .offer-extra { display: flex; align-items: center; gap: 4px; }
.offer .offer-extra label.offer-check { font-size: 12.5px; color: var(--muted); }
.d-ai-model-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 0 22px; }
.d-ai-model-row > label { margin: 0; font-size: 12.5px; color: var(--muted); }
.d-ai-model-row > select { width: auto; max-width: 240px; font-size: 12px; }
.d-ai-model-row[hidden] { display: none; }
@media (max-width: 720px) {
  .offer { grid-template-columns: 1fr; gap: 4px 0; }
  .offer:not(.on) .offer-mid, .offer:not(.on) .offer-tracks, .offer:not(.on) .offer-extra { display: none; }
  .offer .offer-extra { grid-column: 1 / -1; justify-content: flex-end; }
}
/* Before the release: one line per thing that may happen early, under the
   release date it precedes. */
.before-title { margin-top: 14px; }
/* Space above and below each line, by padding — margins would merge into
   one: two lines' fields never touch. */
.before-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  min-height: 42px; padding: 3px 0;
}
.before-line[hidden] { display: none; }
.before-line > input[type="date"] { width: 150px; }
.before-line > select { width: auto; max-width: 260px; }
.before-line .help { margin-left: 0; }
.before-word { font-size: 12.5px; color: var(--muted); }
.before-word[hidden], .before-line > .o-tracks[hidden] { display: none; }
/* Unticked, its menu waits like the date beside it. */
.before-line > .o-tracks.disabled { opacity: .5; pointer-events: none; }
/* A line that only concerns one family of offers names it at its end. */
.before-tag {
  margin-left: auto; display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--panel);
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.before-line label.offer-check {
  display: flex; align-items: center; gap: 8px;
  margin: 0; font-size: 13px; color: var(--ink); cursor: pointer;
}
.before-panel { margin: 6px 0 4px 22px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.before-panel[hidden] { display: none; }
.vis-row { display: grid; grid-template-columns: 180px 170px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.vis-row > label { margin: 0; font-size: 12.5px; }
.vis-row > select { font-size: 12px; }
.vis-row > input { width: auto; }
.vis-row > input[hidden] { display: none; }
@media (max-width: 720px) {
  .vis-row { grid-template-columns: 1fr; }
}
/* An offer's "Pistes" menu: folded, a line that reads like the menus beside
   it; open, the tracks float under it, so the offers below do not move. */
.o-tracks { position: relative; }
.o-tracks > summary {
  /* One width whatever it says — "Toutes les pistes", "Sauf la piste 2-03",
     "Aucune piste": ticking a track must not move the line, nor the page. */
  width: 160px; overflow: hidden; justify-content: space-between;
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 9px;
  background: var(--field); border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink); font-size: 12px; white-space: nowrap; cursor: pointer; list-style: none;
}
.o-tracks > summary::-webkit-details-marker { display: none; }
.o-tracks > summary::after { content: "▾"; color: var(--muted); }
.o-tracks-list {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 20;
  width: max-content; max-width: 320px; max-height: 260px; overflow-y: auto; padding: 6px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow);
}
.o-tracks-list label {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 3px 0; font-size: 13px; color: var(--ink); cursor: pointer;
}
.o-tracks-list .hint { margin: 4px 0 0; }

/* Folded zones: one summary line that says the state. */
.dist-fold { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dist-fold summary {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; list-style: none; font-size: 13px;
}
.dist-fold summary::-webkit-details-marker { display: none; }
.dist-fold summary::before { content: "▸"; color: var(--muted); font-size: 12px; width: 14px; }
.dist-fold[open] summary::before { content: "▾"; }
.dist-fold summary .help { margin-left: 0; }
.fold-title { font-size: 12px; color: var(--muted); }
.fold-state { color: var(--muted); }
.fold-state b { color: var(--ink); }
.dist-fold .d-preview-list { margin-top: 4px; }

/* "Ce qui sera envoyé": codes, in a fixed-width face, because they are read to
   be checked — and they are what a DSP will quote in a ticket. */
.preview-deal {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  margin-top: 6px;
  background: var(--field);
}
.preview-deal .codes { font-family: ui-monospace, monospace; font-size: 12.5px; }
.preview-deal .offer-name { color: var(--muted); font-size: 12px; }
.preview-deal .tag { margin: 0; }
.preview-deal.ai { border-left: 3px solid var(--warn); }

/* The masters strip: with the step chips, outside every step container, so it
   survives the first "Suite" — which is exactly when it starts being useful. */
.masters-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 12.5px;
}
.masters-strip-count { color: var(--muted); white-space: nowrap; }
.masters-strip-current {
  color: var(--muted); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 260px;
}
.masters-bar {
  flex: 0 1 160px; height: 5px; border-radius: 3px;
  background: var(--panel-2); overflow: hidden;
}
.masters-bar > div { height: 100%; background: var(--accent); transition: width .15s; }

/* Absolutely positioned so folding it back does not shift the form. A panel
   that pushes content moves every field under the cursor on each toggle,
   which is how an operator clicks the wrong thing. */
.masters-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow-y: auto;
}

/* One file of the masters, on the model of a track's file card: its format,
   its number, title and state; under them its name and what the state has
   to say — facts, a bar, a refusal, the recording reused. */
.master-line { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 12.5px; }
.master-line + .master-line { border-top: 1px solid var(--line); }
.master-line .file-badge { width: 44px; height: 44px; }
.file-badge.err { border-color: var(--err-line); }
.file-badge.err b { color: var(--err); }
.master-body { flex: 1 1 auto; min-width: 0; }
.master-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.master-n { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.4em; }
.master-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.master-head .muted { white-space: nowrap; }
.master-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin-top: 4px; color: var(--muted);
}
.master-file { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.master-sub .masters-bar { display: block; flex: 0 1 160px; }
.master-sub .masters-bar > span { display: block; height: 100%; background: var(--accent); transition: width .15s; }
.master-msg { margin: 4px 0 0; }
.master-msg.warn { color: var(--warn); }
.master-msg.err { color: var(--err); }
.master-actions { flex: none; display: inline-flex; gap: 6px; }

.masters-lines:not(:empty) { margin-bottom: 10px; }
/* The drop zone: large while there is nothing, a strip under the lines
   afterwards. A button, so the keyboard reaches it with nothing added. */
.masters-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 150px; padding: 18px;
  border: 1.5px dashed var(--line); border-radius: 12px;
  background: var(--field); color: var(--ink); font: inherit; text-align: center; cursor: pointer;
}
.masters-drop.over, .masters-drop:focus-visible { border-color: var(--accent); background: var(--panel-2); outline: none; }
.masters-drop-icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.masters-drop.over .masters-drop-icon { border-color: var(--accent); color: var(--accent); }
.masters-drop-text { display: flex; flex-direction: column; gap: 3px; }
.masters-drop-title { font-size: 14px; }
.masters-drop-sub { color: var(--muted); font-size: 12.5px; }
.masters-drop.compact { flex-direction: row; justify-content: flex-start; min-height: 64px; padding: 12px 16px; text-align: left; }
.masters-drop.compact .masters-drop-icon { width: 36px; height: 36px; }
.masters-drop.compact .masters-drop-icon svg { width: 18px; height: 18px; }

/* The state of one file, in one glyph: grey waiting, blue moving, green
   landed, red refused. */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.busy { background: var(--accent); }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--err); }
.dot.wait { background: var(--placeholder); }

/* Step 4: the menus above the tracks' table. */
.tracks-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.track-actions { position: relative; }
.track-actions .add-track-menu { display: flex; align-items: center; gap: 6px; }
/* Over the table and the open form, under its button. */
.track-actions .menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
  display: flex; flex-direction: column;
  min-width: 100%; width: max-content; max-width: 300px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow);
}
.track-actions .menu[hidden] { display: none; }
/* The entries of the other kind of release — a track's on a video one. */
.track-actions .menu button[hidden] { display: none; }
.track-actions .menu button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  height: auto; padding: 8px 10px;
  background: none; border: 0; border-radius: 6px;
  color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.track-actions .menu button small { color: var(--muted); font-size: 11.5px; }
.track-actions .menu button:hover,
.track-actions .menu button:focus-visible { background: var(--panel-2); outline: none; }

/* The tracks' table, step 4's and the sheet's (components/track-table.js).
   The widths are the <col>s': on several discs the first row is a disc's
   heading, one cell wide, where a fixed layout would find none. Borders kept
   apart: the open form's frame has rounded corners, which collapsed borders
   cannot draw. */
.track-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.track-table col.c-num { width: 40px; }
.track-table col.c-isrc { width: 140px; }
.track-table col.c-dur { width: 62px; }
.track-table col.c-file { width: 130px; }
.track-table col.c-dot { width: 22px; }
.track-table col.c-act { width: 86px; }
/* The sheet's narrower column. */
.track-table.compact col.c-num { width: 34px; }
.track-table.compact col.c-isrc { width: 118px; }
.track-table.compact col.c-dur { width: 50px; }
.track-table.compact col.c-file { width: 108px; }
.track-table.compact col.c-dot { width: 18px; }
.track-table.compact col.c-act { width: 80px; }
.track-table th {
  padding: 4px 8px; border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; text-align: left; white-space: nowrap; overflow: hidden;
}
.track-table td {
  padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* The number against the left edge, the title right after it. */
.track-table td.num, .track-table th:first-child { padding-right: 2px; }
.track-table td.tt, .track-table th:nth-child(2) { padding-left: 2px; }
.track-table td.num { color: var(--muted); font-variant-numeric: tabular-nums; }
.track-table td.isrc { font-size: 12px; }
.track-table td.dur, .track-table td.file { color: var(--muted); }
.track-table .warn-text { color: var(--warn); }
.track-table td.state { padding-left: 2px; padding-right: 2px; text-align: center; }
.track-table td.state .dot { display: inline-block; }
.track-table .tt-open { display: block; width: 100%; min-width: 0; }
.track-table .tt-title,
.track-table .tt-artist { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-table .tt-artist { font-size: 11.5px; color: var(--muted); }
.track-table .tt-artist .shared { color: var(--warn); }
.track-table tr.track-row { cursor: pointer; }
.track-table tr.track-row:hover td { background: var(--panel-2); }
/* A line with the keyboard's focus is lit like a line under the pointer, not
   ringed: the ring around its title doubled the open line's own rules. */
.track-table .tt-open:focus-visible { outline: none; }
.track-table tr.track-row:has(.tt-open:focus-visible) td { background: var(--panel-2); }
/* The open track's line, a bold rule on either side, and its form under it
   in a thin frame. The line loses its bottom border, which would cut the
   rules where the form starts. */
.track-table tr.track-row.open td { background: var(--panel-2); border-bottom: 0; }
.track-table tr.track-row.open td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.track-table tr.track-row.open td:last-child { box-shadow: inset -3px 0 0 var(--accent); }
.track-table tr.track-open > td {
  padding: 12px 14px 16px; overflow: visible; white-space: normal;
  background: var(--panel);
  border: 1px solid var(--accent); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
/* A step-4 block, framed by its row already. */
.track-table tr.track-open #tracks > .block { margin: 0; padding: 0; border: 0; background: none; }
/* ▶, ⋯ and ⠿, inside the column's width in the sheet's narrower one too,
   clear of the open line's rule; the menu goes over the rows below. */
.track-table td.act { overflow: visible; text-align: right; padding: 0 6px 0 2px; }
.track-table td.act > * { vertical-align: middle; }
.track-table td.act > * + * { margin-left: 2px; }
.track-table .play-slot { display: inline-flex; width: 22px; justify-content: center; }
.track-table .drag-handle { padding: 2px 3px; }
/* Square, as small as the handle: the table's own buttons' size would push
   it out of the column. */
.track-table button.ghost.row-menu { width: 24px; height: 24px; padding: 0; }
.menu-anchor { position: relative; display: inline-block; }
.row-menu-list {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 20;
  display: flex; flex-direction: column; width: max-content; max-width: 320px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); text-align: left; white-space: normal;
}
.row-menu-list[hidden] { display: none; }
/* An entry, or — the deletion asked — Annuler and Confirmer in its place. */
.row-menu-list .menu-entry { display: flex; gap: 6px; }
.row-menu-list [role="menuitem"] {
  height: auto; padding: 8px 10px; background: none; border: 0; border-radius: 6px;
  color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.row-menu-list [role="menuitem"]:hover,
.row-menu-list [role="menuitem"]:focus-visible { background: var(--panel-2); outline: none; }
.row-menu-list [data-action="delete"] { color: var(--err); }

/* A classical album: a work's heading above its movements — its title wide,
   its numbers narrow, its composer — on one line, wrapping where the column
   is narrow. The fields' help is said on the first heading only. */
.track-table tr.work-head td {
  padding: 12px 8px 6px; border-bottom: 0; overflow: visible; white-space: normal;
}
.work-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.work-heading > b { font-variant: small-caps; letter-spacing: .04em; font-weight: 600; font-size: 12.5px; }
.work-heading > .dot { display: inline-block; }
.work-heading .w-cell {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--muted);
}
.work-heading .w-title-cell { flex: 1 1 260px; }
.work-heading .w-title-cell input { width: 100%; }
.work-heading .w-opus-cell input { width: 70px; }
.work-heading .w-catalogue-cell input { width: 120px; }
.work-heading .w-composer-cell { flex: 0 1 220px; min-width: 170px; }
.work-heading .w-composer-cell label { display: none; }
.track-table tr.work-head ~ tr.work-head .work-heading .help { display: none; }
/* Under a movement's title, the formal title the platforms will show. */
.t-formal { margin: 4px 0 0; }

/* A release on several discs: a heading above each disc. */
.track-table tr.disc-head td {
  padding: 14px 8px 4px; border-bottom: 0; overflow: visible;
  font-size: 11.5px; color: var(--muted);
}
.track-table tr.disc-empty td {
  padding: 10px; border: 1px dashed var(--line); color: var(--muted); text-align: center;
}
.disc-head-line { display: inline-flex; align-items: center; gap: 6px; width: 100%; }
.disc-head b { font-variant: small-caps; letter-spacing: .04em; font-weight: 600; }
.disc-head .remove-disc { height: 22px; padding: 0 6px; }
/* The disc's name, typed in its heading: a short field that reads as text.
   Outweighs the form's reference height and width for inputs. */
.disc-head .disc-head-text {
  display: inline-flex; align-items: center; gap: 6px; width: 320px; max-width: 70%; min-width: 0;
}
.disc-head input.disc-title {
  flex: 1 1 auto; width: auto; min-width: 0; height: 22px; padding: 0 4px;
  border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; background: none;
  font: inherit; font-size: 12.5px; font-style: italic; color: var(--ink);
}
.disc-head input.disc-title::placeholder { font-style: normal; color: var(--muted); }
.disc-head input.disc-title:focus { outline: none; border-bottom-color: var(--accent); }
.dot.warn { background: var(--warn); }
/* Hi-Res, read on the stereo master: the one pill in the accent. */
.tag.file-pill.pill-hi { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* Every block stays in #tracks — publication, the saves and the unsaved check
   walk them all — and so does every form of the sheet's tracks: only the open
   one is displayed. A class, not `hidden`, so no display rule can quietly win
   over it. */
#tracks > .track,
.track-forms > .track-form { display: none; margin-bottom: 0; }
#tracks > .track.selected,
.track-forms > .track-form.selected { display: block; }

/* A form's tabs stay in view while its panes scroll under them: under the
   app bar on a page, whose height the script measures into --topbar; at the
   top of the recording editor's scrolling form. */
.track-form > .t-tabs { position: sticky; top: var(--topbar, 0px); z-index: 4; background: var(--panel); }
#rec-form > .t-tabs { top: 0; }

/* The editor's header says what the platforms will show: the title, then,
   lighter, " par" and the artist. Read as the platforms will show it, not as
   a card title in capitals. */
#rec-title-label { text-transform: none; letter-spacing: normal; }
#rec-title-label .muted { color: var(--muted); font-weight: 400; }
#rec-title-label .warn-text { color: var(--warn); font-weight: 400; }

@media (max-width: 760px) {
  .file-card { flex-wrap: wrap; }
  .file-actions { width: 100%; }
}

/* A track's files: one card each, drawn by wizard/file-card.js — and the
   card is where a file is dropped. */
.file-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 14px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.file-card.empty { border-style: dashed; }
.file-card.warn { border-color: var(--warn-line); }
.file-card.over { border-color: var(--accent); background: var(--panel-2); }
/* An empty track card opens the file picker wherever it is clicked. Not the
   cover's card, which shares the class but opens from its badge only. */
.t-master-cell.empty, .t-immersive-cell.empty { cursor: pointer; }
.t-master-cell.empty:hover, .t-immersive-cell.empty:hover { border-color: var(--accent); }
.file-badge {
  flex: none; width: 52px; height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
}
.file-badge b { font-size: 13px; }
.file-badge small { font-size: 10px; color: var(--muted); }
.file-body { flex: 1 1 auto; min-width: 0; }
.file-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 13.5px; font-weight: 600;
}
.file-title .fc-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-title .fc-sub { font-size: 12px; font-weight: 400; }
.fc-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; }
.file-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.file-pill { margin: 0; font-size: 12px; }
/* Shown whole when the clipboard refuses it: 64 characters, wrapped. */
.file-hash { font-family: ui-monospace, monospace; color: var(--muted); overflow-wrap: anywhere; }
.file-warning { flex-basis: 100%; margin: 0; color: var(--warn); }
.fc-facts .file-progress { flex: 1 1 100%; }
.file-actions { flex: none; display: flex; align-items: center; gap: 8px; }
/* The wizard does not show the MP3 card: its list of tracks has the play
   button, and says when a conversion is in progress. Hidden, not taken out
   of the block — it is the card's own follow-up of the conversion that tells
   the list when the MP3 is there. */
#tracks .t-listening-head, #tracks .t-listening-cell { display: none; }
/* A video clip's form is a track's: what a clip does not have goes, what
   only a clip has comes. Above the `hidden` the code sets on some of them. */
.track-form:not(.video) .t-video-only,
.track-form.video .t-not-video,
.track-form:not(.sourced) .t-sourced-only { display: none !important; }
/* What a clip taken from a track reads there: shown, greyed, out of reach
   (the code sets `inert` on it). */
.track-form.sourced .t-from-track { opacity: 0.6; }
.t-source .row { align-items: center; gap: 8px; }
.t-source-text { flex: 1 1 auto; }
.t-subtitles .file-card { margin-bottom: 8px; }
.file-card.disabled { opacity: 0.6; pointer-events: none; }
/* The MP3 card: the only file card that never takes a file, and the only
   one with a failed state. */
.t-listening-cell .file-badge b { color: var(--accent); }
.file-card.err { border-color: var(--err-line); }
.file-error { flex-basis: 100%; margin: 0; color: var(--err); }
.listen-busy { flex: 1 1 100%; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.listen-busy > div {
  width: 35%; height: 100%; border-radius: 2px; background: var(--accent);
  animation: listen-busy 1.2s ease-in-out infinite;
}
@keyframes listen-busy { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .listen-busy > div { animation: none; margin-left: 30%; } }
.file-actions .t-immersive-isrc { width: 210px; }
.file-actions .t-immersive-isrc[hidden],
.fc-remove-slot[hidden] { display: none; }
/* The excerpt's start, on one line under the master's card, level with its
   text rather than its badge. */
.excerpt-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 8px 0 0 66px; font-size: 12.5px; color: var(--muted);
}
.excerpt-line .t-excerpt-start { width: 80px; }

/* A track's credit line, under its artist rows — as at step 3. */

/* Step 3's credits, a template: set apart from the artists above by the same
   rule a group heading draws, since the first heading inside loses its own. */
#release-credits {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
/* A track's credit families, under its Crédits heading. */
.subgroup { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.t-kept-note { margin: 0 0 8px; }

/* ---- Catalogue ---- */
.catalogue-head { align-items: center; gap: 12px; flex-wrap: wrap; }
.catalogue-head h2 { margin: 0; }
.catalogue-head .hint { margin: 0; }
/* The Contributors page's tabs sit in its head, beside the title. */
.catalogue-head .tabs { border-bottom: none; margin: 0 0 0 20px; align-self: center; }
/* The Contributors page's create buttons, one per tab, stacked in one grid
   cell: the cell takes the widest, so that the tabs beside it never move.
   Each button keeps its own width, against the right edge: a shorter one
   leaves the room between it and the tabs. A hidden one keeps its room but
   is not seen, nor reached by Tab. The label's, for a client user, takes no
   room: its data-role rule wins with !important. */
.create-buttons { display: grid; justify-items: end; flex: none; }
.create-buttons > button { grid-area: 1 / 1; white-space: nowrap; }
.create-buttons > button[hidden] { display: inline-block; visibility: hidden; }
.inline-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0; }
.inline-label select { width: auto; }
/* `display:flex` beats the `hidden` attribute: say it explicitly. */
.inline-label[hidden] { display: none; }

.segmented { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* 36px with the border, like the inputs. `font: inherit`, like every other
   button here: a bare button keeps the browser's own font. */
.segmented button { background: none; border: none; color: var(--muted); padding: 0 12px; height: 34px; font: inherit; font-size: 13px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); }

/* The person / legal entity choice at the top of the party modal. */
.kind-row { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.kind-row .segmented button { height: 32px; }
.kind-row .hint { margin: 0; }

/* Wraps on a narrow screen. Scrolled to on a change of page: below the sticky
   app bar, not under it. */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; margin-bottom: 14px;
  scroll-margin-top: calc(var(--topbar, 58px) + 12px); }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; max-width: 460px; height: 36px; box-sizing: border-box; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--muted); }
/* input[type="search"] and not input: the rule giving every input its 36px
   is (0,2,1), and the field around it already draws the frame. */
.search-field input[type="search"] { flex: 1; min-width: 0; height: 100%; background: none; border: none; color: var(--ink); padding: 0; font-size: 13px; outline: none; }
.search-field:focus-within { border-color: var(--accent); }
/* Narrower in a filter bar, where the filters and the "Colonnes" menu share
   its line. */
.filter-bar .search-field { max-width: 360px; }
.filter-bar select { width: auto; min-width: 180px; }

/* A table's "Colonnes" menu, at the right end of its filter bar. Built like
   the user's menu: it opens under its button, over the table. */
.column-menu-host { position: relative; margin-left: auto; }
.column-button { display: inline-flex; align-items: center; gap: 7px; }
.column-button .caret { font-size: 10px; color: var(--muted); }
.column-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.column-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 6px; }
.column-saved { color: var(--ok); font-size: 12px; }
.column-list { padding: 2px 6px; }
.column-line { display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 8px; border-radius: 6px; }
.column-line:hover { background: var(--panel-2); }
.column-line .check { flex: 1; min-width: 0; margin: 0; color: var(--ink); font-size: 13px; cursor: pointer; }
.column-line .check input:disabled { cursor: default; }
.column-line .muted { font-size: 12px; }
.column-menu-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.column-menu-foot button.link { font-size: 12.5px; }

.release-card { display: flex; gap: 18px; padding: 16px 18px; }
.release-card .cover { display: block; width: 110px; height: 110px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.release-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The placeholder fills its 110px frame, and a link around it must not underline it. */
.release-card .cover { text-decoration: none; }
.release-card .cover .cover-none { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; }
.release-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.release-body .row { flex-wrap: wrap; gap: 10px; }
.release-body h2 { margin: 0; font-size: 18px; }
.release-body a { color: var(--ink); text-decoration: none; }
.release-body a:hover h2 { color: var(--accent); }
.release-body .hint { margin: 0; }
.release-artist { font-size: 14px; }

.tag.info { color: var(--accent); border-color: var(--accent-line); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }

/* Not hidden: the last column must scroll into view, never be cut. */
.table-card { padding: 0; overflow-x: auto; }
table.catalogue { width: 100%; border-collapse: collapse; font-size: 13px; }
table.catalogue th { background: var(--panel-2); padding: 8px 12px; text-align: left; }
table.catalogue th button { background: none; border: none; padding: 0; color: var(--muted); font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; white-space: nowrap; }
table.catalogue th[aria-sort="ascending"] button, table.catalogue th[aria-sort="descending"] button { color: var(--ink); }
table.catalogue td { padding: 9px 12px; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
table.catalogue td.num { text-align: right; }
table.catalogue tr.open-release { cursor: pointer; }
table.catalogue tr.open-release:hover, table.catalogue tr.open-release:focus-visible { background: var(--panel-2); outline: none; }
/* The team's boxes, to give several releases at once or to merge parties: a
   column of their own, before the others, which ticks and opens nothing. */
.select-cell { width: 28px; padding-right: 0; text-align: center; cursor: default; }
.select-cell input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--accent); cursor: pointer; }
tr.selected td { background: var(--panel-2); }
/* The selection floats at the bottom of the screen: it pushes the list down
   by nothing, and stays in sight while the list scrolls. Under the modals and
   the player, above the player when it is open. */
.selection-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 20px;
  white-space: nowrap; max-width: calc(100vw - 32px); font-size: 13px;
  background: var(--ink); color: var(--panel); border-radius: 12px; box-shadow: var(--shadow);
  animation: selection-in .15s ease-out;
}
.selection-bar[hidden] { display: none; }
/* button.link takes var(--ink), the pill's own background. */
.selection-bar button.link, .selection-bar button.link:hover { color: inherit; }
.selection-bar button.link { opacity: .75; }
.selection-bar button.link:hover { opacity: 1; }
/* A secondary action reads on the pill, whose colours swap with the theme:
   no background of its own, a border drawn from its text. */
.selection-bar button.ghost {
  background: transparent; color: inherit;
  border-color: color-mix(in srgb, currentColor 40%, transparent);
}
@keyframes selection-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) { .selection-bar { animation: none; } }
body.player-open .selection-bar { bottom: calc(var(--player-height) + 16px); }
/* Room under the last row while the pill is there: it never hides it. */
main:has(.selection-bar:not([hidden])) { padding-bottom: 88px; }
body.player-open main:has(.selection-bar:not([hidden])) { padding-bottom: calc(var(--player-height) + 88px); }

/* ---- Floating messages ---- */
/* What a page has to say floats at the bottom of the screen, as the selection
   does on the lists: nothing on the page moves when it shows. Under the modals
   and the player, above the player when it is open. A bar holds one message
   line (.notice) and the cross that empties it. */
.notice-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px;
  width: max-content; max-width: min(840px, calc(100vw - 32px)); font-size: 13px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); animation: selection-in .15s ease-out;
}
/* Nothing to say: no bar — unless it also holds changes waiting, as the
   sheet's does. */
.notice-bar:not(.dirty):not(:has(> .notice > .msg)) { display: none; }
/* Its colour is its message's. */
.notice-bar:has(> .notice > .msg.err) { background: var(--err-bg); border-color: var(--err-line); }
.notice-bar:has(> .notice > .msg.warn) { background: var(--warn-bg); border-color: var(--warn-line); }
.notice-bar:has(> .notice > .msg.ok) { background: var(--ok-bg); border-color: var(--ok-line); }
.notice-bar:has(> .notice > .msg.info) { background: var(--panel-2); border-color: var(--line); }
/* The message is the bar's own text: the bar draws the frame and the colour. */
.notice { min-width: 0; }
.notice:empty { display: none; }
.notice > .msg { margin: 0; padding: 0; border: 0; background: none; }
button.link.notice-close { font-size: 18px; line-height: 1; padding: 4px 8px; }
@media (prefers-reduced-motion: reduce) { .notice-bar { animation: none; } }
body.player-open .notice-bar { bottom: calc(var(--player-height) + 16px); }
/* A list that shows its selection too: the message sits on top of it. */
.view:has(.selection-bar:not([hidden])) .notice-bar { bottom: 84px; }
body.player-open .view:has(.selection-bar:not([hidden])) .notice-bar { bottom: calc(var(--player-height) + 76px); }
/* The app's own bar: over a screen's, should both have something to say. */
.app-notice { z-index: 91; }
/* Outside <main>, so the lists' rule does not reach it: on top of the
   selection of the screen shown, as a screen's own message is. */
body:has(.view.active .selection-bar:not([hidden])) .app-notice { bottom: 84px; }
body.player-open:has(.view.active .selection-bar:not([hidden])) .app-notice { bottom: calc(var(--player-height) + 76px); }
/* Room under the page's last buttons while a bar is there: it never hides
   them. For the view on screen only. */
main:has(.view.active .notice > .msg) { padding-bottom: 88px; }
body.player-open main:has(.view.active .notice > .msg) { padding-bottom: calc(var(--player-height) + 88px); }
.bulk-transfer-list { margin: 12px 0; padding-left: 18px; font-size: 13px; }
.bulk-transfer-list:empty { display: none; }
/* The ticked releases a bulk deletion leaves alone, apart from the drafts. */
.bulk-delete-left-out {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px;
}

/* ---- Fiche de sortie ---- */
/* The sheet's bar also holds what waits to be saved: the count of sections,
   "Cancel" and "Save". A message takes the place of the count; the
   cross is for a message alone. */
.fiche-bar.dirty { background: var(--warn-bg); border-color: var(--warn-line); }
.fiche-bar:has(> .notice > .msg) > .dirty-mark { display: none; }
.fiche-bar:not(.dirty) > #fiche-cancel-all,
.fiche-bar:not(.dirty) > #fiche-save-all,
.fiche-bar.dirty > .notice-close { display: none; }
/* The sheet's sections may stay modified after it is left: only while it is
   on screen. */
main:has(#fiche.active .fiche-bar.dirty) { padding-bottom: 88px; }
body.player-open main:has(#fiche.active .fiche-bar.dirty) { padding-bottom: calc(var(--player-height) + 88px); }
/* A field of the sheet the server refused: its line says why. */
#fiche [aria-invalid="true"] { border-color: var(--err); }
/* The way to that field, in the bar: the message's colour, underlined. */
button.link.notice-go { color: inherit; font-weight: 600; text-decoration: underline; }
/* In the sections' column, whose gap already spaces them. */
.fiche-recap { margin-bottom: 0; }
.fiche-recap-head { display: flex; align-items: flex-start; gap: 18px; }
.fiche-cover { width: 96px; height: 96px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--line); }
.fiche-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-cover .cover-none { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; }
.fiche-recap-title { flex: 1; min-width: 0; }
.fiche-recap-title h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.fiche-recap-artist { font-size: 16px; margin-top: 2px; }
/* The facts on one line, across its whole width: each at least as wide as
   its value, the room left shared out evenly. The genre alone gives way, cut
   short with "…" (whole in its tooltip); too narrow for them all, it goes to
   the next line. */
.fiche-facts { display: flex; flex-wrap: wrap; gap: 12px 28px;
  margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.fiche-facts > div { flex: 1 0 auto; min-width: 0; }
.fiche-facts > .fiche-fact-genre { flex: 1 1 120px; }
.fiche-facts dt, .fiche-facts-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fiche-facts dd { margin: 2px 0 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
#fiche-genre { white-space: nowrap; }
/* A value that acts when clicked: its caption in a bubble above it, which the
   cell must not clip. */
.fiche-facts dd.fiche-fact-action { overflow: visible; }
.fiche-act { position: relative; }
.fiche-act:focus-visible { color: var(--accent); }
.fiche-act-bubble { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 3px 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow); color: var(--ink); font-size: 11.5px; line-height: 1.4;
  white-space: nowrap; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .12s; }
.fiche-act:hover .fiche-act-bubble,
.fiche-act:focus-visible .fiche-act-bubble { opacity: 1; }
/* Just copied: the word over the id, which keeps its room — the line does
   not move — and no bubble over it. */
.fiche-id-copied { position: absolute; top: 0; left: 0; display: none; }
#fiche-id.copied { color: var(--ok); }
#fiche-id.copied .fiche-id-text { visibility: hidden; }
#fiche-id.copied .fiche-id-copied { display: inline; }
#fiche-id.copied .fiche-act-bubble { opacity: 0; }
/* The Livraison line: a summary to unfold onto the points, nothing to unfold
   when there are none. */
.fiche-readiness { margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--field); border: 1px solid var(--line); }
.fiche-readiness summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.fiche-readiness summary::-webkit-details-marker { display: none; }
.fiche-readiness summary .tag { margin: 0; }
.fiche-readiness-more { font-size: 12px; color: var(--muted); }
.fiche-readiness .fiche-readiness-more::before { content: "▸ "; }
.fiche-readiness[open] .fiche-readiness-more::before { content: "▾ "; }
.fiche-readiness.empty summary { cursor: default; pointer-events: none; }
.fiche-readiness.empty .fiche-readiness-more { display: none; }
.fiche-readiness ul { margin: 10px 0 0; padding: 0; list-style: none; }
.fiche-readiness li { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; font-size: 13px; }
.fiche-readiness li .tag { flex: none; margin: 0; }

.fiche-smartlink { display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 10px 12px; border-radius: 8px; background: var(--field); border: 1px solid var(--line); }
/* `display` above, and the rail's below, beat the `hidden` attribute: the
   lines and links of a physical edition, or of a digital release. */
.fiche-smartlink[hidden],
.fiche-rail a[hidden] { display: none; }
.fiche-discs { margin: 6px 0 0; font-size: 13px; }
/* One line per edition: its number, its medium, its status. */
.fiche-editions { align-items: flex-start; }
.fiche-editions ul { margin: 0; padding: 0; list-style: none; }
.fiche-editions li { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; font-size: 13px; }
.fiche-editions li:last-child { margin-bottom: 0; }
.fiche-editions li .tag { margin: 0; }

/* The rail and the anchors land below the app bar. */
.fiche-layout { display: flex; gap: 32px; align-items: flex-start; }
.fiche-rail { width: 180px; flex-shrink: 0; position: sticky; top: calc(var(--topbar, 58px) + 16px);
  display: flex; flex-direction: column; gap: 2px; }
.fiche-rail a { display: block; padding: 7px 12px; border-radius: var(--radius);
  color: var(--muted); font-size: 13px; text-decoration: none; }
.fiche-rail a:hover { color: var(--ink); background: var(--panel-2); }
.fiche-sections { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.fiche-section { scroll-margin-top: calc(var(--topbar, 58px) + 16px); margin-bottom: 0; }
.fiche-section .card-head { margin-bottom: 14px; }
/* The bar of pages under a long list: the range, the pages, the size. Wraps on
   a phone, the pages on their own line. */
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 12px; margin-top: 16px; }
.pager-range { min-width: 150px; margin: 0; }
.pager-pages { flex: 1; display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-pages button { min-width: 32px; }
.pager-number.ghost { background: none; border-color: transparent; }
.pager-gap { color: var(--muted); padding: 0 4px; }
.pager-size { justify-content: flex-end; min-width: 150px; }
/* The way to the archives, under the pages: a line either side. */
.archives-link-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.archives-link-row[hidden] { display: none; }
.archives-link-row::before, .archives-link-row::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* A panel's background and line in every theme: --on-page is see-through in
   Sombre and Clair, where the button would read as bare text. */
.archives-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.archives-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.archives-link-go { color: var(--accent); font-weight: 600; }
/* An archived release's cover: there, but faded. */
.archive-thumb { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; display: block;
  filter: grayscale(.7); opacity: .75; background: var(--panel-2); }
/* The Archives' row actions: a cell of the catalogue's table, which clips. */
table.catalogue td.actions { overflow: visible; }

/* The sheet's last action, the one its status calls for, on the right. */
.fiche-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.fiche-requested { display: inline-flex; align-items: center; gap: 10px; }
.fiche-requested[hidden] { display: none; }
/* A banner with its buttons on one line, wrapping on a phone. */
.fiche-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fiche-banner[hidden] { display: none; }
button.ghost.danger { color: var(--err); border-color: var(--err-line); }
button.ghost.danger:hover { background: var(--err-bg); }
/* The only filled red button of the tool: it ends something. A primary
   button in every other respect — its size, and the ink that reads on a
   filled button in both themes. */
button.primary.danger { background: var(--err); border-color: var(--err); }
button.primary.danger:hover { filter: brightness(1.08); }

.dirty-mark { font-size: 12px; color: var(--warn); }
.dirty-mark::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--warn); margin-right: 6px; vertical-align: middle; }
.dirty-mark[hidden] { display: none; }
.fiche-artwork { width: 140px; height: 140px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--line); }
.fiche-artwork img, .fiche-artwork-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-artwork .cover-none { width: 100%; height: 100%; border: none; border-radius: 0; }

/* A cover, at step 5 and on the sheet: the image large on the left, where a
   file can be dropped; its card, and what it says about itself, on the right. */
.cover-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.cover-layout .fiche-artwork { width: 240px; height: 240px; }
/* A video release has no cover: its clips' screen captures instead, each
   beside its card, in 16:9. */
.cover-layout[hidden], .vis-row[hidden] { display: none; }
.capture-item + .capture-item { margin-top: 20px; }
.capture-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.capture-thumbnail { width: 240px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.capture-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capture-thumbnail .cover-none { width: 100%; height: 100%; border: none; border-radius: 0; }
.cover-drop.over { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* Promotion, at its step and on the sheet: the three texts on the left, the
   photos and the presskit on the right. */
.promo { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.promo-texts { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.promo-texts textarea { width: 100%; resize: vertical; line-height: 1.5; }
.promo-count { font-size: 12px; text-align: right; margin-top: 4px; }
.promo-files { min-width: 0; }
.promo-files > label:not(:first-child) { margin-top: 18px; }
.promo-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.promo-photos:not(:empty) { margin-bottom: 12px; }
.promo-photo { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* × in the thumbnail's corner — and, once pressed, Annuler / Confirmer there. */
.promo-remove-slot { position: absolute; top: 6px; right: 6px; display: flex; flex-wrap: wrap;
                     justify-content: flex-end; gap: 4px; }
.promo-remove-slot .promo-remove { width: 28px; padding: 0; background: var(--panel); }
/* The thumbnail is the handle: dragged, it carries its photo to its new rank. */
.promo-thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: grab;
               background: var(--panel-2); border: 1px solid var(--line); }
.promo-thumb:active { cursor: grabbing; }
.promo-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.promo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-rank { font-size: 12.5px; }
.promo-credit { width: 100%; }
.promo-credit-all { align-self: flex-start; font-size: 12px; white-space: nowrap; }
.promo-credit-all[hidden] { display: none; }
/* The strip that takes more photos: dashed, like every place a file is dropped. */
.promo-drop { display: flex; flex-direction: column; align-items: center; gap: 2px;
              padding: 14px; border: 1px dashed var(--line); border-radius: 10px;
              text-align: center; font-size: 13px; cursor: pointer; }
.promo-drop small { color: var(--muted); }
/* Several files refused at once: one line each. */
.promo-files .field-msg { white-space: pre-line; }
.promo-drop.over, .promo-drop:focus-visible { border-color: var(--accent); background: var(--panel-2); outline: none; }
.promo-drop.busy { opacity: .55; cursor: progress; }
/* The presskit's card sits in a narrow column: its buttons take a line of
   their own under the badge and the title, whatever the width. */
.promo-presskit { margin-top: 0; flex-wrap: wrap; }
.promo-presskit .file-body { flex: 1 1 120px; }
.promo-presskit .file-actions { flex: 1 1 100%; flex-wrap: wrap; }
@media (max-width: 900px) {
  .promo { grid-template-columns: minmax(0, 1fr); }
}

/* A video release's screen capture in a square made for a cover: whole,
   between two black bands, as on a cinema screen. */
.release-card .cover img.letterbox,
.fiche-cover img.letterbox { object-fit: contain; background: #000; }
/* The image and the card's badge open the file field, as its button does. */
.cover-drop, .cover-card .file-badge { cursor: pointer; }
.cover-drop:focus-visible, .cover-card .file-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-drop .cover-drop-hint { padding: 20px; font-size: 13px; line-height: 1.5; }
.cover-side { min-width: 0; }
.cover-card { margin-top: 0; }
.cover-fields { border: none; margin: 0; padding: 0; min-width: 0; }
.cover-fields:disabled { opacity: .55; }
@media (max-width: 760px) {
  .cover-layout, .capture-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .fiche-layout { flex-direction: column; }
  .fiche-rail { position: static; width: auto; flex-direction: row; flex-wrap: wrap; }
  .fiche-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Deleting a recording, on the recordings page: the button says it erases. */
button.delete-recording { color: var(--err); }

/* ---- The player ---- */
/* The play buttons the screens draw (app/core/player.js), and the bar at the
   bottom of the window. */
.play-btn {
  width: 28px; height: 28px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--panel-2); color: var(--ink); cursor: pointer;
}
.play-btn:hover { border-color: var(--accent); color: var(--accent); }
.play-btn.on, .play-btn.on:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.play-btn.sm { width: 22px; height: 22px; }
.play-btn.sm svg { width: 10px; height: 10px; }
/* In place of the button while the MP3 is being made. Two short lines, so
   that the column it sits in hardly widens. */
.play-wait { display: inline-block; max-width: 74px; font-size: 11px; line-height: 1.2; color: var(--muted); }
/* Where there is no room for the words — a line of the tracks' table — a dot
   that pulses, the words in its tooltip. */
.play-wait[data-small] {
  width: 8px; height: 8px; max-width: none; flex: none; border-radius: 50%;
  background: var(--accent); font-size: 0; cursor: help;
  animation: play-wait 1.2s ease-in-out infinite;
}
@keyframes play-wait { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .play-wait[data-small] { animation: none; } }
.fc-play-slot { display: inline-flex; }
.fc-play-slot:empty { display: none; }
/* The row of the track in place, playing or paused: it follows the state of
   its own button, so a list drawn again is highlighted without being told. */
[data-play-row]:has(.play-btn.cur) { background: var(--panel-2); }
[data-play-row]:has(.play-btn.cur) .play-title { color: var(--accent); font-weight: 600; }
td.play-cell { width: 40px; padding-right: 0; }

:root { --player-height: 72px; }
.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-height);
  /* Above the modals' veil: the sound is paused from the recording editor too. */
  z-index: 110;
  display: flex; align-items: center; gap: 22px; padding: 0 24px;
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: var(--shadow);
}
.player-bar[hidden] { display: none; }
.pb-now { flex: 0 0 270px; min-width: 0; display: flex; align-items: center; gap: 12px; }
.pb-cover {
  flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
}
.pb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-meta { min-width: 0; }
.pb-title, .pb-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-title { font-size: 14px; font-weight: 600; }
.pb-sub { font-size: 12.5px; color: var(--muted); }
.pb-sub.failed { color: var(--err); }
.pb-controls { flex: none; display: flex; align-items: center; gap: 6px; }
.pb-btn {
  width: 36px; height: 36px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.pb-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--ink); }
.pb-main {
  width: 44px; height: 44px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
.pb-progress {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.pb-volume { flex: 0 0 130px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pb-volume svg { flex: none; }
/* The two sliders are not form fields: neither their height nor their frame. */
.player-bar input[type="range"] {
  height: auto; padding: 0; border: none; background: transparent;
  accent-color: var(--accent); cursor: pointer;
}
#pb-seek { flex: 1 1 auto; min-width: 0; }
#pb-volume { flex: 1 1 auto; min-width: 0; width: 100%; }
/* The end of a view, and the foot of a modal, stay clear of the bar. A modal
   card is sized from the window: it gives up the height the bar takes. */
body.player-open main { padding-bottom: calc(var(--player-height) + 24px); }
body.player-open .modal { padding-bottom: calc(var(--player-height) + 20px); }
body.player-open .modal-card { max-height: calc(90vh - var(--player-height)); }
body.player-open .modal-card.recording-editor {
  max-height: calc(92vh - var(--player-height));
  height: min(760px, calc(92vh - var(--player-height)));
}
@media (max-width: 760px) {
  .pb-volume { display: none; }
  .pb-now { flex-basis: 160px; }
  .player-bar { gap: 14px; padding: 0 14px; }
}

/* ---- The video window ---- */
/* One <dialog> for the whole app (components/video-player.js): the clip and
   nothing around it — no frame, no border —, the page dimmed and blurred
   behind, its words and controls laid over the picture. White on black,
   whatever the theme: they sit on the clip. */
dialog.video-player {
  padding: 0; border: none; background: none; color: #fff;
  max-width: none; max-height: none; overflow: visible;
}
dialog.video-player::backdrop {
  background: rgba(10, 4, 16, .86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
/* As wide as the window allows, and never taller: the shortcuts' line fits
   under it. */
.vp-frame {
  position: relative;
  width: min(1100px, 92vw, calc((100vh - 80px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000; border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.vp-frame:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
/* A clip that is not 16:9 keeps its bands. */
.vp-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
/* The bands of words let a click through to the picture, which plays or
   pauses; their buttons keep it. */
.vp-top, .vp-credit { pointer-events: none; }
.vp-top button { pointer-events: auto; }
.vp-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: linear-gradient(rgba(0, 0, 0, .55), transparent);
}
.vp-head { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.vp-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-sub { font-size: 12.5px; opacity: .8; white-space: nowrap; }
.vp-spacer { flex: 1 1 auto; }
.vp-round {
  width: 34px; height: 34px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; cursor: pointer;
}
.vp-round:hover { background: rgba(0, 0, 0, .75); }
.vp-big {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%);
  width: 76px; height: 76px; padding: 0 0 0 5px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer;
}
.vp-big:hover { background: var(--accent); }
.vp-credit {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: flex-end; gap: 20px; padding: 60px 22px 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}
.vp-credit-main { flex: 1 1 auto; min-width: 0; }
.vp-credit-title { font-size: 26px; font-weight: 700; line-height: 1.15; }
.vp-credit-sub { margin-top: 4px; font-size: 13.5px; opacity: .85; }
.vp-credit-side { flex: none; text-align: right; font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; }
/* In place of the big button: a copy being made, failed, or none. */
.vp-state {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%);
  width: min(440px, 80%); padding: 18px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  border-radius: 10px; background: rgba(0, 0, 0, .6);
  text-align: center; font-size: 13.5px; line-height: 1.45;
}
.vp-state[hidden] { display: none; }
.vp-state p { margin: 0; }
.vp-spinner, .watch-spinner {
  flex: none; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  animation: vp-spin 1s linear infinite;
}
.vp-spinner { width: 28px; height: 28px; }
@keyframes vp-spin { to { transform: rotate(360deg); } }
.vp-controls {
  position: absolute; left: 0; right: 0; bottom: 6px; z-index: 2;
  display: flex; align-items: center; gap: 6px; padding: 30px 12px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.vp-btn {
  height: 32px; min-width: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: none; border-radius: 6px; background: transparent; color: #fff;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.vp-btn:hover { background: rgba(255, 255, 255, .14); }
.vp-btn[hidden], .vp-cc-anchor[hidden], .vp-cc-menu[hidden] { display: none; }
.vp-total { margin-left: 4px; opacity: .7; }
.vp-cc-anchor { position: relative; display: inline-flex; }
.vp-cc-menu {
  position: absolute; right: 0; bottom: calc(100% + 6px);
  display: flex; flex-direction: column; min-width: 170px; padding: 6px;
  border-radius: 8px; background: rgba(20, 14, 28, .95); box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  text-shadow: none;
}
.vp-cc-menu button {
  padding: 7px 10px; border: none; border-radius: 5px; text-align: left; white-space: nowrap;
  background: transparent; color: #fff; font: inherit; font-size: 13px; cursor: pointer;
}
.vp-cc-menu button:hover, .vp-cc-menu button:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
.vp-cc-menu button[aria-checked="true"] { color: var(--accent-line); font-weight: 600; }
.vp-cc-menu button:disabled { opacity: .45; cursor: default; }
/* A thin line at the very bottom of the frame: not a form field. */
.video-player input[type="range"] {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  width: 100%; height: 12px; margin: 0; padding: 0;
  border: none; border-radius: 0; background: transparent;
  accent-color: var(--accent); cursor: pointer;
}
.video-player input[type="range"]:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
/* Before the play, the top shows the cross only; the controls come with the
   play, and the big button and the credit go. */
.vp-frame:not([data-view="playing"]) .vp-controls,
.vp-frame:not([data-view="playing"]) .vp-seek,
.vp-frame:not([data-view="playing"]) .vp-head { visibility: hidden; }
.vp-frame:not([data-view="before"]) .vp-big,
.vp-frame[data-view="playing"] .vp-credit { display: none; }
/* While it plays, the controls fade a moment after the mouse last moved, and
   the cursor with them. Still within reach of the keyboard. */
.vp-top, .vp-controls, .vp-seek { transition: opacity .3s; }
.vp-frame.idle .vp-top, .vp-frame.idle .vp-controls, .vp-frame.idle .vp-seek { opacity: 0; }
.vp-frame.idle { cursor: none; }
.vp-keys { padding-top: 12px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .6); }
@media (prefers-reduced-motion: reduce) {
  .vp-top, .vp-controls, .vp-seek { transition: none; }
  .vp-spinner, .watch-spinner { animation: none; }
}
@media (max-width: 700px) {
  .vp-keys { display: none; }
  .vp-credit { padding: 40px 14px 14px; }
  .vp-credit-title { font-size: 18px; }
}

/* A clip's master card: its screen capture in place of the badge, and
   "Regarder" above "Remplacer…" — both open the video window. */
.fc-thumb-slot { display: contents; }
.file-badge[hidden] { display: none; }
.fc-thumb {
  position: relative; flex: none; width: 92px; aspect-ratio: 16 / 9; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; cursor: pointer;
}
.fc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fc-thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; padding-left: 2px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff;
}
.fc-thumb:hover .fc-thumb-play { background: var(--accent); }
.fc-watch-slot { display: flex; }
.fc-watch-slot:empty { display: none; }
.t-master-cell .file-actions:has(.fc-watch-slot:not(:empty)) { flex-direction: column; align-items: stretch; }
.watch-pill {
  width: 100%; height: 30px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 15px; background: #1d1426; color: #fff;
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.watch-pill:hover:not(:disabled) { background: var(--accent); }
.watch-pill:disabled { opacity: .75; cursor: progress; }
.watch-spinner { width: 11px; height: 11px; border-width: 2px; }

/* ---- Recording editor ---- */
/* .modal-card caps at 560px: the max-width has to be raised too. */
.modal-card.wide { max-width: 760px; width: min(760px, 96vw); }
/* The track form's width, as at step 4. Head, tabs and foot stay put; the
   form scrolls between them. */
.modal-card.recording-editor {
  max-width: 960px; width: min(960px, 96vw);
  max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column;
}
#recording-editor > * { flex: none; }
/* One height whatever the pane: a card that grew and shrank with each tab
   would move its tabs under the pointer. */
.modal-card.recording-editor { height: min(760px, 92vh); }
#rec-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 4px 2px 0; }
.recording-editor .modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.rec-head { flex: 1 1 auto; min-width: 0; }
.rec-head .hint { margin: 0; }
.rec-title-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; min-width: 0; }
.rec-title-line h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-title-line .hint { margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording-editor .dirty-mark { margin-top: 4px; white-space: nowrap; }
.recording-editor .modal-foot {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line);
}
.recording-editor .modal-foot .hint { margin: 0; }
button.ghost.icon { width: 32px; height: 32px; padding: 0; font-size: 18px; line-height: 1; flex: none; }

/* Tabs over a form's panes: the pane shown is the one selected. */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs [role="tab"] {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; margin-bottom: -1px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs [role="tab"]:focus-visible { outline: 1px solid var(--accent); outline-offset: -2px; }
.track-form.tabbed .pane:not(.active) { display: none; }

/* The track's ℗, and the button that takes the release's. */
.pline-take-cell { align-self: end; }

/* The rights block: owners carry a share, managers a role. */
.rights-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0 6px; }
/* The four reading flags of a track on one line under the Détails grid;
   .check's own top margin is for a lone box, these share one. */
.track-flags { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 16px 0 4px; }
.track-flags .check { margin-top: 0; }
.t-remastered-cell[hidden] { display: none; }
.rights-row { display: grid; gap: 12px; align-items: end; margin-bottom: 10px; }
.rights-row.owner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 80px 32px; }
.rights-row.manager { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
.administrators .rights-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 32px; }
.rights-row.work { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 72px 32px; }
.rights-row .rights-remove { width: 32px; height: 36px; padding: 0; }
.rights-sep { height: 1px; background: var(--line); margin: 10px 0 12px; }
.rights-sum { font-size: 12px; color: var(--warn); margin: -2px 0 10px; }
.rights-origin { font-size: 12px; color: var(--muted); margin: -2px 0 10px; }
.rights-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.t-rights .rights-sub[hidden], .t-rights-managers[hidden], .rights-sum[hidden], .rights-origin[hidden] { display: none; }
.t-pline-take[hidden] { display: none; }

/* ---- Track picker ---- */
.picker-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
/* A proposal: a card holding two buttons — the play button, and the rest of
   the card, which adds the recording. */
.pick-card {
  display: flex; align-items: center; gap: 10px; padding-left: 10px;
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
}
.pick-card:hover { background: var(--panel-2); }
.pick-card:has(.play-btn.cur) { border-color: var(--accent); }
.pick-choice {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: minmax(0,1fr) 130px; gap: 10px; align-items: center;
  padding: 8px 10px 8px 0; background: none; border: none; color: var(--ink);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}

/* ---- A track whose recording other releases carry too ---- */
/* The editor's .msg.warn, said more quietly: a line under the track's header. */
.t-shared-note { color: var(--warn); margin: 0 0 10px; }

/* ---- Pistes ---- */
.inline-check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; white-space: nowrap; }

/* ---- Pistes · cover on each row ---- */
table.catalogue td.cover-cell { width: 56px; padding: 6px 8px; }
.row-cover-wrap { position: relative; width: 48px; height: 48px; }
.row-cover-wrap img, .row-cover { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; display: block;
  border: 1px solid var(--line); background: var(--panel-2); box-sizing: border-box; }
.row-cover { display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 9px; line-height: 1.2; color: var(--placeholder); }
.row-cover.none { border-style: dashed; border-color: var(--warn-line); color: var(--warn); }
/* A clip's screen capture: whole, between two black bands, as a video
   release's is in the catalogue. */
.row-cover-wrap img.letterbox { object-fit: contain; background: #000; }
/* What tells a clip from a track in the list, and the track it comes from. */
.tag.clip { margin: 0 0 0 6px; color: var(--accent); border-color: var(--accent-line); }
table.catalogue td .cell-note { font-size: 11.5px; }
/* Its words go to the next line rather than past the page's width: the box
   column, the cover and the play button leave too little room for long titles
   on one line. A row is as tall as its cover already: two lines fit in it. */
table.catalogue td.wraps { white-space: normal; overflow-wrap: anywhere; }
.row-cover-more { position: absolute; right: -6px; bottom: -6px; font-size: 10px; padding: 1px 5px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--warn-line); color: var(--warn); }

/* ---- Paramètres ---- */
/* The rebuild's counters, under its report (app/pages/settings.js). */
.report-counters { margin: 10px 0 0; }

/* ---- Distribution editor (the sheet's modal) ---- */
/* Wide enough for the form's two columns; below that the grid folds to one. */
.modal-card.distribution-editor { max-width: 960px; width: min(960px, 96vw); }
/* The card scrolls, and clips: the top labels' bubbles open downwards. */
.distribution-editor .dist-top > .deal-zone > label .bubble { bottom: auto; top: calc(100% + 9px); }
.distribution-editor .modal-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.distribution-editor .preview-deal.new { border-color: var(--ok-line); }
.distribution-editor .preview-deal.changed { border-color: var(--warn-line); }
.distribution-editor .preview-deal.removed { border: 1px dashed var(--err-line); opacity: .7; text-decoration: line-through; }
.distribution-editor .preview-deal.foreign { border-color: var(--err-line); }
.preview-deal .diff { margin-left: auto; font-size: 11px; }
.preview-deal.new .diff { color: var(--ok); }
.preview-deal.changed .diff { color: var(--warn); }
.preview-deal.removed .diff, .preview-deal.foreign .diff { color: var(--err); }
.fiche-deals-scope { margin: 0 0 8px; }
.fiche-deals-scope:empty { display: none; }

/* ---- Activation screen ---- */

.activate-hello { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.activate-lead { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.activate-lead strong { color: var(--ink); }
/* The server's rule, turning green as it is met. */
.password-rule { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.password-rule::before { content: "○ "; }
.password-rule.met { color: var(--ok); }
.password-rule.met::before { content: "✓ "; }
.activate-note { margin: 14px 0 0; text-align: center; }
.activate-to-login { width: 100%; justify-content: center; margin-top: 14px; }
#activate-dead .msg { margin: 0; }

/* A refusal under the field it is about. */
.field-msg { margin-top: 4px; font-size: 12px; color: var(--err); }
.field-msg:empty { display: none; }
/* The single / EP / album remark, right under the type menu it speaks of. */
#release_type-msg .msg, .release-type-msg .msg { margin: 6px 0 0; }

/* ---- Comptes ---- */

.accounts-actions { margin-bottom: 18px; }
/* An account's label: its box, and beside it, once ticked, the choice of the
   default one. Apart from the box, whose click ticks the label. */
.label-row { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.label-row label.choice { flex: 1; margin: 0; }
.label-default { display: flex; flex: none; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.label-default[hidden] { display: none; }
.label-default input { width: auto; height: auto; margin: 0; accent-color: var(--accent); }
/* Six columns do not fit a phone: the table scrolls, not the page. */
.table-scroll { overflow-x: auto; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }

/* A sheet's two columns; one under the other on a narrow screen. */
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) {
  .two { grid-template-columns: minmax(0, 1fr); }
}
label.spaced, p.spaced { margin-top: 12px; }
.sheet-actions { margin-top: 4px; }

/* A link to copy: the field holds it whole, the button beside it. */
.link-box { display: flex; gap: 8px; }
.link-box input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}
.link-box button { flex: none; }
.link-note { margin: 8px 0 12px; }

/* The roles, each with its sentence, an account's labels and a platform's
   delivery settings: the whole box takes the click. */
label.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
label.choice:has(input:checked) { border-color: var(--accent); background: var(--panel-2); }
/* Above the reference height every other field gets. */
label.choice input[type="radio"],
label.choice input[type="checkbox"] { width: auto; height: auto; margin: 3px 0 0; accent-color: var(--accent); }
label.choice small { display: block; color: var(--muted); font-size: 12px; }
/* An option to come: shown so that it is known, never chosen. */
label.choice:has(input:disabled) { opacity: .5; cursor: default; }

/* ---- Simple path ---- */

/* One column, thought first for a phone: full width there, centred beyond. */
.simple { max-width: 680px; margin: 0 auto; }
/* The head of a step, the simple path's and expert mode's alike: "Step n of
   m" and the step's name on the left, the ways out on their right — under
   them on a phone. */
/* A little apart from the step bar under it, in both modes. */
.path-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px;
  margin-bottom: 8px;
}
.path-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.path-count { color: var(--ink); font-size: 12.5px; font-weight: 600; }
.path-head h2 { margin: 2px 0 10px; }
.simple-progress { margin-bottom: 16px; }
.simple-segments { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
/* A segment is a button taller than its bar: easier to hit. Off until its
   step is reached. */
.simple-segments button { height: 18px; padding: 6px 0; border: 0; background: none; cursor: pointer; }
.simple-segments button::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--line); }
.simple-segments button.on::before { background: var(--accent); }
.simple-segments button:not(:disabled):not([aria-current]):hover::before { opacity: .7; }
.simple-segments button:disabled { opacity: 1; cursor: default; }
.simple-segments button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
/* The release's type, three cards: side by side when they fit, one under the
   other on a phone. */
.simple-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.simple-types label.choice { margin: 0; }
/* Each type's name in bold, its line under it. */
.simple-types label.choice > span > span { font-size: 15px; font-weight: 600; }
.simple-types label.choice small { margin-top: 2px; }
/* The questions in bold and in the ink, a size above the form's labels: the
   person reads them before answering. */
.simple-step > label { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.simple-step > label.spaced { margin-top: 20px; }
.simple-expert-cases { margin: 16px 0 0; }
/* The release's tracks, under the drop zone. */
.simple-tracks:not(:empty) { margin-top: 12px; }
/* The names every track takes, between the zone and the tracks. */
.simple-common { margin: 14px 0 0; }
.simple-common h3 { margin: 0 0 4px; }
/* The credits in three sections — writers, performers, technicians —, each
   its title, its rows and its button. */
.sp-family { margin-top: 14px; }
.sp-family-title { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.sp-family > .sp-need-writer { margin: 8px 0 0; }
.sp-apply { margin-top: 14px; }
/* A track's artists, under its title. */
.simple-track-artists { margin-top: 2px; color: var(--muted); font-size: 12px; }
/* Each track a card that opens and closes: its head always shown — number,
   title and artists, complete or not, the chevron —, its body one at a time. */
.simple-track { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 8px; }
.simple-track-top { display: flex; align-items: center; gap: 8px; padding-right: 8px; }
.simple-track-head { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.simple-track-head:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; border-radius: var(--radius); }
.simple-track-names { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.simple-track-names .master-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simple-track-progress { display: flex; align-items: center; gap: 6px; flex: 0 1 160px; }
.simple-track-progress .masters-bar { display: block; flex: 1 1 auto; }
.simple-track-progress .masters-bar > span { display: block; height: 100%; background: var(--accent); }
.simple-track-progress[hidden] { display: none; }
.simple-track-chevron { color: var(--muted); transition: transform .15s; }
.simple-track-head[aria-expanded="true"] .simple-track-chevron { transform: rotate(180deg); }
.simple-track-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.simple-track-file { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
/* The questions, as the first step asks its own: in bold and in the ink. */
.st-q { display: block; margin: 16px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
/* The answers, buttons to tick: they wrap on a phone. */
.st-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.st-choices label.choice { margin: 0; padding: 8px 12px; align-items: center; }
.st-lyrics-zone textarea { width: 100%; margin-top: 8px; }
/* "Remove" on the left, "Move up" and "Move down" on the right. */
.st-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.st-move { display: flex; gap: 12px; }
/* The handle before the head, out of it: the head opens the card. */
.simple-track-top > .drag-handle { margin-left: 8px; flex: none; }
/* The excerpt: the track's length as a band, the 30 seconds played on it —
   greyed while each platform chooses —, the slider under it. */
.st-excerpt-bar { position: relative; height: 22px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.st-excerpt-window { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .55; border-radius: 4px; }
.st-excerpt-window.empty { background: var(--muted); opacity: .25; }
.st-excerpt-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.st-excerpt-range { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.st-excerpt-text { flex: none; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.st-excerpt-beyond { margin: 6px 0 0; color: var(--warn); font-size: 12.5px; }
.st-excerpt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
/* A track's artists and credits: the names of all tracks summed up, or its
   own, in the editor the card for all tracks mounts. */
.st-people { margin: 0; }
.st-people-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.st-people-credits { margin-top: 2px; font-size: 12.5px; }
.st-people-keep { margin: 6px 0 0; color: var(--warn); font-size: 12.5px; }
.st-people-shared { margin-top: 6px; }
.st-people-slot:not(:empty) { margin-top: 8px; }
.st-people-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
/* The cover: the image's square beside what the platforms ask for — one
   column on a phone, the image first —, then its two fields. */
.sc-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; align-items: start; }
.sc-square {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1 / 1; padding: 0; overflow: hidden;
  border: 1.5px dashed var(--line); border-radius: 12px;
  background: var(--field); color: var(--ink); font: inherit; cursor: pointer;
}
.sc-square.over, .sc-square:focus-visible { border-color: var(--accent); background: var(--panel-2); outline: none; }
.sc-square:disabled { cursor: default; }
.sc-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; text-align: center; }
.sc-empty small { color: var(--muted); font-size: 12.5px; }
.sc-square.over .masters-drop-icon { border-color: var(--accent); color: var(--accent); }
.sc-thumbnail { width: 100%; height: 100%; object-fit: cover; }
.sc-sending { position: absolute; inset: auto 0 0; padding: 8px; background: var(--panel); color: var(--muted); font-size: 12.5px; }
.sc-empty[hidden], .sc-thumbnail[hidden], .sc-sending[hidden] { display: none; }
.sc-under { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; }
.sc-under[hidden] { display: none; }
.sc-rules-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.sc-rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sc-rule-list li { display: flex; align-items: flex-start; gap: 8px; }
.sc-rule-list svg { flex: none; margin-top: 1px; color: var(--ok); }
.sc-fields { border: 0; padding: 0; margin: 8px 0 0; min-width: 0; }
.sc-shared { margin: 12px 0 0; }
/* The release date, the genre's pills, the pitch and the plan. */
.simple-step > .st-q:first-child { margin-top: 0; }
.sd-date { width: auto; min-width: 180px; }
.sd-genre-shown { margin: 8px 0 0; }
#simple-pitch, #simple-plan { resize: vertical; line-height: 1.5; }
/* The check step: the release as the platforms show it — its cover beside
   its facts, one column on a phone —, its tracks and lacks one row each,
   then what was filled in, a row a value. */
.sk-preview { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; margin: 4px 0 24px; }
.sk-cover {
  width: 120px; aspect-ratio: 1 / 1; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.sk-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-cover-none {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; padding: 10px;
  background: #1d1f24; color: #f2f2f2; text-align: left; font-size: 12px;
}
.sk-cover-none small { opacity: .7; }
.sk-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.sk-artists { margin-bottom: 4px; }
.sk-facts .muted { font-size: 12.5px; }
.sk-facts .link { margin-top: 6px; }
.sk-list { list-style: none; margin: 0; padding: 0; }
.sk-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
/* The next heading's line closes the list: no second one under its last row. */
.sk-row:last-child { border-bottom: none; }
/* Each section's line comes close under the list before it — nearer than
   the tool's 24px above a heading —, and its title further under the line. */
#simple-check-body > h4.group { margin-top: 4px; }
#simple-check-body > h4.group:not(:first-of-type) { padding-top: 24px; }
.sk-number { flex: none; min-width: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sk-name { flex: 1 1 200px; min-width: 0; }
.sk-lacks { color: var(--warn); font-size: 12.5px; }
.sk-complete { color: var(--ok); font-size: 12.5px; }
/* The rows share the table's columns (subgrid): a value lines up with the
   others whether its row has "Edit" or not. */
.sk-filled {
  display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; column-gap: 12px; margin-bottom: 32px;
}
.sk-filled-row {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; row-gap: 6px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.sk-filled-name { font-weight: 600; color: var(--ink); font-size: 13px; }
.sk-filled-value { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.sk-filled-action { display: flex; gap: 8px; justify-content: flex-end; }
.sk-filled-msg { grid-column: 1 / -1; }
.sk-filled-msg:empty { display: none; }
.sk-field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.sk-field .sk-year { width: 90px; }
.sk-field-wide { flex: 1 1 200px; }
.sk-banner { margin-top: 12px; }
@media (max-width: 560px) {
  .sk-preview, .sk-filled { grid-template-columns: 1fr; }
  .sk-filled-action { justify-content: flex-start; }
}
/* "Continue" stays on the right, "Back" there or not. */
.simple-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* A refusal of "Send", above the banner. */
.sk-refusal p { margin: 0 0 6px; }
.sk-refusal .sk-go { margin-top: 2px; }
/* The release sent, in both modes: a check in a green round, what happens
   next, the ways on — one under the other on a phone. */
.submitted-card { text-align: center; }
.ss-check {
  display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line);
}
.submitted-card h2 { margin: 0 0 6px; }
.ss-lead { margin: 0 0 18px; }
.ss-next { list-style: none; counter-reset: next; margin: 0 auto 16px; padding: 0; max-width: 420px; text-align: left; }
.ss-next li { counter-increment: next; position: relative; padding: 0 0 12px 38px; }
.ss-next li::before {
  content: counter(next); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}
.ss-next li.on::before { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ss-next b { display: block; color: var(--ink); }
.ss-next span { color: var(--muted); font-size: 12.5px; }
.ss-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
@media (max-width: 560px) {
  .ss-actions { flex-direction: column; }
}
#simple-back { margin-right: auto; }

/* A vinyl or a cassette: each disc's first side under a fixed heading, its
   second under a line that moves as a track does. */
.track-table tr.side-head td,
.track-table tr.side-break td {
  padding: 10px 8px 4px; border-bottom: 1px solid var(--line); overflow: visible;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.track-table tr.side-break td { border-top: 1px dashed var(--line); }
.track-table tr.side-break.dragging td { background: var(--panel-2); }
.side-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-hint { font-weight: 400; white-space: nowrap; }

/* The manufacturing of a physical edition (components/manufacturing-form.js). */
.mf-unit { display: flex; align-items: center; gap: 6px; }
.mf-unit input { flex: 1; min-width: 0; }
.mf-extras, .mf-flags { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.manufacturing input.invalid { border-color: var(--err); }
