:root {
  --night: #0c0d12;
  --panel: #151722;
  --line: #2a2d3d;
  --words: #e6e3da;
  --dim: #9a98a8;
  --beat: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--night);
  color: var(--words);
  font: 15px/1.5 ui-monospace, Menlo, Consolas, monospace;
}
header, main { padding: 0 16px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 1.6rem; margin: 1.5rem 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; color: var(--dim); font-weight: 600; }
.lede, .about { color: var(--dim); margin: 0.25rem 0 1rem; max-width: 70ch; }

.controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-bottom: 0.5rem; }
select, input { background: var(--panel); color: var(--words); border: 1px solid var(--line); padding: 4px 8px; font: inherit; }
input { width: 5em; }
.total { color: var(--dim); }

.scroll { overflow-x: auto; padding: 12px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block {
  position: relative;
  flex: none;
  min-width: 0;
  margin-right: 2px;
  padding: 6px 8px 8px;
  border-radius: 6px;
  color: #101015;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  outline: 2px solid transparent;
  transition: outline-color 0.12s;
}
.block .name { font-weight: 700; white-space: nowrap; }
.block .what, .block .time { font-size: 0.8rem; opacity: 0.8; white-space: nowrap; }
.block .journey { font-size: 0.8rem; margin-top: auto; white-space: nowrap; }
.block .words { margin-top: auto; align-self: flex-start; font-size: 0.8rem; font-weight: 700; padding: 0 22px 0 7px; border-radius: 99px; background: rgba(0, 0, 0, 0.22); color: #fff; }
.block .end { position: absolute; bottom: 8px; right: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.7); }
.block .end.full { background: rgba(0, 0, 0, 0.7); }
.block.lit { outline-color: var(--words); }
.block.narrow .what, .block.narrow .time, .block.narrow .journey { display: none; }
.block .name { overflow: hidden; text-overflow: ellipsis; }
/* the timeline drawn as a session: lanes, a label on the left that stays, and a canvas that is as long as the Song */
.diagram { position: relative; display: block; min-width: 100%; min-height: 96px; }
.lane { display: flex; border-bottom: 1px solid var(--line); }
.lane .label { flex: none; width: 128px; box-sizing: border-box; padding: 6px 10px 6px 0; position: sticky; left: 0; z-index: 3; background: var(--night); display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; color: var(--dim); }
.lane .label strong { color: var(--words); font-size: 0.9rem; }
.lane .label small { font-size: 0.72rem; line-height: 1.25; }
.lane .canvas { position: relative; flex: none; height: 52px; }
.lane.ruler .canvas { height: 22px; }
.lane.ruler .label, .lane.pace .label { padding-top: 3px; }
.lane.pace .canvas { height: 28px; }
.lane.regions .canvas { height: 72px; }
.tick { position: absolute; top: 2px; padding-left: 4px; font-size: 0.72rem; color: var(--dim); border-left: 1px solid var(--line); height: 18px; }
.region { position: absolute; top: 4px; bottom: 4px; box-sizing: border-box; border-radius: 5px; padding: 4px 6px; overflow: hidden; color: #101015; outline: 2px solid transparent; transition: outline-color 0.12s; border-right: 2px solid var(--night); }
.region .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.85rem; }
.region .what { font-size: 0.72rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region .words { position: absolute; bottom: 4px; left: 6px; font-size: 0.72rem; font-weight: 700; padding: 0 7px; border-radius: 99px; background: rgba(0, 0, 0, 0.25); color: #fff; }
.region .end { position: absolute; bottom: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.7); }
.region .end.full { background: rgba(0, 0, 0, 0.7); }
.region.lit { outline-color: var(--words); }
.stretch { position: absolute; top: 3px; bottom: 3px; box-sizing: border-box; border-radius: 4px; padding: 3px 7px; font-size: 0.75rem; color: var(--words); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.stretch.free { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, 0.07) 6px 7px); border-style: dashed; color: var(--dim); font-style: italic; }
.bar { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--dim); opacity: 0.6; }
.lane.track .canvas { min-height: 36px; }
.lane.empty .label strong, .lane.empty .label small { font-style: italic; }
.lane.silent .canvas { background: repeating-linear-gradient(90deg, transparent 0 11px, rgba(255, 255, 255, 0.03) 11px 12px); }
.nothing { position: sticky; left: 140px; box-sizing: border-box; width: 340px; height: 28px; margin: 4px 0; border: 1px dashed var(--line); border-radius: 4px; color: var(--dim); font-size: 0.8rem; font-style: italic; display: flex; align-items: center; padding-left: 10px; }
.clip { position: absolute; height: 24px; box-sizing: border-box; border-radius: 4px; overflow: hidden; color: #101015; display: flex; align-items: center; gap: 5px; padding: 0 6px; font-size: 0.72rem; outline: 2px solid transparent; transition: outline-color 0.12s; border: 1px solid rgba(0, 0, 0, 0.35); }
.clip .letter { font-weight: 700; background: rgba(0, 0, 0, 0.25); color: #fff; border-radius: 99px; padding: 0 6px; flex: none; position: relative; z-index: 2; }
.clip .source { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 2; opacity: 0.85; }
.clip.lit { outline-color: var(--words); }
.ramp { position: absolute; top: 0; bottom: 0; background: rgba(16, 16, 21, 0.62); z-index: 1; }
.ramp.in { left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.ramp.out { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.turn { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--words); z-index: 2; pointer-events: none; }
.turn span { position: absolute; top: 2px; left: 4px; font-size: 0.72rem; white-space: nowrap; color: var(--words); background: var(--night); padding: 0 4px; border-radius: 3px; }
.order { margin-top: 1.25rem; }
.order td:nth-child(n+4):nth-child(-n+7) { text-align: right; padding-right: 14px; }
.key { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 12px 0 0; color: var(--dim); font-size: 0.85rem; }
.key .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.key .end { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--dim); margin-right: 6px; vertical-align: -1px; }
.key .end.full { background: var(--dim); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; border-top: 4px solid var(--colour); }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
.card .id { color: var(--dim); font-size: 0.8rem; }
.card p { margin: 8px 0; }
.card .facts { color: var(--dim); font-size: 0.85rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.85rem; margin-top: 8px; }
th, td { text-align: left; padding: 3px 6px 3px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; }
.retired { opacity: 0.6; }
@media (max-width: 600px) { body { font-size: 14px; } }

/* the editor */
button { background: var(--panel); color: var(--words); border: 1px solid var(--line); padding: 4px 12px; font: inherit; cursor: pointer; border-radius: 4px; }
button:hover:not(:disabled) { border-color: var(--dim); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
input.wide { width: 22em; max-width: 100%; }
input[type="text"] { width: 12em; }
.instances { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--colour, var(--line)); border-radius: 6px; padding: 8px 10px; }
.row .n { color: var(--dim); width: 1.6em; text-align: right; }
.row .shares { color: var(--dim); font-size: 0.8rem; }
.row .params { display: flex; flex-wrap: wrap; gap: 6px 14px; flex-basis: 100%; padding-left: 2.4em; }
.param { display: flex; flex-direction: column; gap: 1px; font-size: 0.85rem; }
.param input { width: 6em; }
.param small { color: var(--dim); max-width: 26em; }
.verdict { margin: 12px 0; padding: 8px 12px; border-radius: 6px; min-height: 2.4em; background: var(--panel); border: 1px solid var(--line); color: var(--dim); }
.verdict.refused { color: #ffb4a8; border-color: #8a3a30; }
.verdict.accepted { color: #b8e0b0; }
.view.dim { opacity: 0.4; }
.block .grows { font-size: 0.75rem; font-style: italic; }
.card td.desc { color: var(--dim); font-size: 0.8rem; padding-bottom: 8px; }
.card tr.main td { border-bottom: none; padding-top: 6px; }
.card tr.main td:nth-child(2) { white-space: nowrap; }
.file input { max-width: 14em; }

/* the map, and the pages of the concepts */
:root { --shapes: #e8806f; --edits: #a98be0; --made: #46b8a8; }
nav a { color: var(--dim); text-decoration: none; }
nav a:hover { color: var(--words); }
.pending { color: var(--dim); border: 1px dashed var(--line); padding: 14px 16px; border-radius: 8px; max-width: 60ch; }
header .about p { margin: 0.5rem 0; max-width: 70ch; }

.map { position: relative; margin: 8px 0 40px; }
.map .arrows { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
.band-label { position: absolute; left: 4px; z-index: 1; margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; white-space: nowrap; }
.band-label.shapes { color: var(--shapes); }
.band-label.edits { color: var(--edits); }
.band-label.made { color: var(--made); }
.box { position: absolute; z-index: 1; --band: var(--dim); display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border: 1px solid var(--band); border-left-width: 6px; border-radius: 8px; background: var(--panel); color: var(--words); text-decoration: none; overflow: hidden; }
.box.shapes { --band: var(--shapes); }
.box.edits { --band: var(--edits); }
.box.made { --band: var(--made); }
.box strong { color: var(--band); font-size: 1.05rem; }
.box span { color: var(--dim); font-size: 0.85rem; }
.box:hover, .box:focus-visible { background: #1d2030; outline: none; }
.arrows path.lead { stroke: var(--dim); stroke-width: 1.6; opacity: 0.8; color: var(--dim); }
.arrows path.lead.shapes { stroke: var(--shapes); color: var(--shapes); }
.arrows path.lead.edits { stroke: var(--edits); color: var(--edits); }
.arrows path.lead.made { stroke: var(--made); color: var(--made); }
nav { padding-top: 14px; }
.map-scroll { overflow-x: auto; }

/* the pages of what shapes a Song */
.block-section { margin: 1.5rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-size: 0.85rem; }
.chip.lit { border-color: var(--shapes); color: var(--shapes); }
.chip.shapes { border-color: var(--shapes); color: var(--shapes); }
.chip.tide { border-color: var(--made); color: var(--made); }
.scale { display: inline-flex; gap: 2px; }
.scale .key { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 3rem; border-radius: 3px; background: #1a1d29; color: transparent; font-size: 0.8rem; }
.scale .key.black { height: 2.2rem; }
.scale .key.sung { background: var(--shapes); color: #101015; font-weight: 700; }
.mode { margin: 12px 0; }
.mode.born .mode-name { color: var(--shapes); }
.mode-name { margin-bottom: 4px; }
.tempo, .curve { width: 100%; max-width: 640px; height: auto; display: block; margin: 8px 0; }
.facts { color: var(--dim); font-size: 0.85rem; margin: 6px 0; }
.facts-list { color: var(--dim); font-size: 0.85rem; margin: 6px 0; padding-left: 1.2rem; }
.weight { position: relative; height: 1.3rem; background: #1a1d29; border-radius: 4px; margin: 8px 0; overflow: hidden; }
.weight span { position: absolute; inset: 0 auto 0 0; background: var(--shapes); opacity: 0.35; }
.weight em { position: relative; font-size: 0.75rem; font-style: normal; padding-left: 8px; line-height: 1.3rem; }
table.turns { table-layout: fixed; }
table.turns td { border-bottom: none; font-size: 0.8rem; padding: 2px 6px 2px 0; word-break: normal; overflow-wrap: normal; }
table.turns td:first-child { width: 45%; }
.tree { margin-top: 8px; }
.tree details { margin-left: 1rem; }
.tree > details { margin-left: 0; }
.tree summary { cursor: pointer; color: var(--words); padding: 2px 0; }
.leaf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 2px 0 2px 1rem; }
.leaf-name { min-width: 11rem; }
.leaf-value { color: var(--dim); font-size: 0.85rem; }
.cards.tides { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

/* the pages of what a Song makes */
.roll-box { overflow-x: auto; padding: 8px 0 4px; }
.roll { display: block; background: #0f1119; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.step { margin: 10px 0; }
.line { margin: 14px 0; }
.line.unfit .roll { opacity: 0.5; }
.slots { display: inline-flex; gap: 2px; vertical-align: middle; }
.slots i { width: 8px; height: 14px; border: 1px solid var(--dim); border-radius: 2px; display: inline-block; }
.slots i.on { background: var(--made); border-color: var(--made); }
.slots em { color: var(--dim); font-style: normal; font-size: 0.8rem; }
.count-block { margin: 12px 0; }
.count-block h3 { margin: 0 0 4px; }
.guide { width: 100%; max-width: 640px; height: auto; display: block; margin: 8px 0; }
.songline { position: relative; height: 56px; background: #0f1119; border: 1px solid var(--line); border-radius: 6px; margin: 10px 0 16px; overflow: hidden; }
.songpart { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; color: #101015; font-size: 0.7rem; padding: 3px 4px; overflow: hidden; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); }

/* the timeline in the editor */
.rows { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
input.short { width: 5em; }
.anchor { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
#editor h3 { margin: 1.4rem 0 0.25rem; font-size: 1rem; color: var(--dim); }
.row .params > span, .row .params > label:not(.param) { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.block-row input.iname { width: 18em; }

/* the two modes */
header { position: relative; }
.mode-toggle { position: absolute; top: 14px; right: 16px; display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; z-index: 5; }
.mode-toggle a { padding: 3px 14px; color: var(--dim); text-decoration: none; font-size: 0.9rem; }
.mode-toggle a[aria-current] { background: var(--edits); color: #101015; font-weight: 700; }
.box .kind { font-style: normal; font-size: 0.75rem; color: var(--edits); margin-top: auto; }

/* Edit: a drawing, and beside it the inspector of fields */
.drawing .scroll { padding-top: 8px; }
.shell { margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.shell .open-name { color: var(--words); }
.unsaved { color: #e8c06f; font-size: 0.85rem; }
.refused { outline: 2px solid #8a3a30; outline-offset: 1px; border-radius: 4px; }
input.refused, select.refused { background: #2a1714; }
.why { flex-basis: 100%; width: 100%; color: #ffb4a8; font-size: 0.8rem; margin-top: 4px; }
body[data-mode="edit"] main, body[data-mode="edit"] header { max-width: 1700px; }

/* parameters in the inspector: the label and its range on the left, the field with its reset beside it, the description under both */
.params { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.param { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; font-size: 0.85rem; }
.param > span:first-child { text-align: left; }
.param > span:nth-child(2) { display: inline-flex; gap: 6px; align-items: center; justify-self: end; }
.param small { grid-column: 1 / -1; text-align: left; max-width: none; }
.row .params { display: grid; grid-template-columns: minmax(0, 1fr); padding-left: 0; }
.details { margin-top: 12px; }
.details summary { cursor: pointer; color: var(--dim); }

/* Edit: the drawing has the whole width, and under it the inspector: what is chosen, and the Arrangement itself */
.inspector { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 24px; align-items: start; max-height: 38vh; overflow-y: auto; border-top: 1px solid var(--line); padding: 8px 0; margin-top: 12px; position: sticky; bottom: 0; background: var(--night); z-index: 20; }
@media (max-width: 900px) { .inspector { grid-template-columns: minmax(0, 1fr); max-height: none; } }
.inspector h3 { margin: 0.6rem 0 0.4rem; font-size: 0.95rem; color: var(--dim); display: flex; gap: 12px; align-items: center; }
.quiet { font-size: 0.75rem; padding: 1px 10px; }
.quiet[aria-pressed="true"] { border-color: var(--edits); color: var(--edits); }
.hint { color: var(--dim); font-size: 0.8rem; }
.drawing .controls { align-items: center; }
.drawing input[type="range"] { width: 8em; padding: 0; }
.chosen-extras { margin: 8px 0; }
.region, .clip, .point, .turn-handle { cursor: grab; user-select: none; touch-action: none; }
.region.selected, .clip.selected { outline: 2px solid #fff; outline-offset: 1px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), 0 0 14px 4px rgba(255, 255, 255, 0.45); z-index: 4; }
/* a chosen thing keeps its own colour: the choice is the outline and the glow alone */
.region.refused, .clip.refused, .point.refused, .turn-handle.refused { outline: 2px solid #e8806f; outline-offset: 1px; }
.lane.track .canvas, .lane.pace .canvas { cursor: crosshair; }
.point { position: absolute; top: 2px; bottom: 2px; padding: 0 6px 0 7px; border-left: 3px solid var(--edits); background: rgba(169, 139, 224, 0.22); border-radius: 0 4px 4px 0; font-size: 0.7rem; color: var(--words); display: flex; align-items: center; z-index: 3; white-space: nowrap; }
.point.selected { background: var(--edits); color: #101015; }
.turn-handle { position: absolute; top: 0; height: 22px; margin-left: -9px; width: 18px; display: flex; align-items: center; justify-content: center; border-radius: 99px; background: var(--panel); border: 1px solid var(--words); color: var(--words); font-size: 0.8rem; z-index: 6; }
.turn-handle.selected { background: var(--words); color: #101015; }
.grip { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 3; }
.grip.left { left: 0; }
.grip.right { right: 0; }
.clip:hover .grip, .clip.selected .grip { background: rgba(0, 0, 0, 0.3); }
.fade-handle { position: absolute; top: 0; width: 9px; height: 9px; margin: -1px; background: var(--words); border-radius: 50%; cursor: ew-resize; z-index: 4; opacity: 0; }
.fade-handle.in { transform: translateX(0); }
.fade-handle.out { transform: translateX(0); }
.clip:hover .fade-handle, .clip.selected .fade-handle { opacity: 0.9; }
.gain-line { position: absolute; left: 10px; right: 10px; height: 0; border-top: 2px dashed rgba(0, 0, 0, 0.55); cursor: ns-resize; z-index: 3; padding: 3px 0; background-clip: content-box; }
.clip:not(:hover):not(.selected) .gain-line { opacity: 0; }
/* a Block's body is for moving it: the gain line can be taken only once the Block is chosen */
.clip:not(.selected) .gain-line { pointer-events: none; }
.ghost { position: absolute; top: 3px; height: 24px; border: 1px dashed var(--words); border-radius: 4px; background: rgba(230, 227, 218, 0.12); pointer-events: none; }
.drop-marker { position: absolute; top: 0; bottom: 0; width: 0; border-left: 3px solid var(--edits); z-index: 7; pointer-events: none; }
.drag-label { position: fixed; z-index: 100; background: var(--panel); border: 1px solid var(--words); color: var(--words); font-size: 0.8rem; padding: 2px 8px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.region .seconds-grip { cursor: ew-resize; }
body[data-mode="edit"] .stretch { padding-left: 56px; }

/* Edit: the Parts, the Perspectives and the Tides */
.strip { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0; }
.chip-instance { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 6px; color: #101015; cursor: pointer; outline: 2px solid transparent; min-width: 6.5em; }
.chip-instance small { opacity: 0.75; }
.chip-instance.chosen { outline: 2px solid #fff; box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.4); }
.chip-instance.refused { box-shadow: 0 0 0 3px #e8806f; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 6px 16px 14px; background: var(--panel); max-width: 900px; }
.panel h3, .form h3, .preview h3 { font-size: 0.95rem; color: var(--dim); margin: 0.9rem 0 0.4rem; }
.sliders { display: grid; gap: 10px; }
.slider-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 1.2fr) auto; gap: 2px 14px; align-items: center; font-size: 0.85rem; }
.slider-row small { grid-column: 1 / -1; color: var(--dim); }
.slider-row .what { text-align: left; }
.slider-track { position: relative; display: block; padding: 6px 0; }
.slider-track input[type="range"] { width: 100%; padding: 0; }
.slider-track .usual { position: absolute; top: 4px; bottom: 4px; width: 0; border-left: 2px solid var(--made); pointer-events: none; opacity: 0.9; }
.slider-row .value { display: inline-flex; gap: 6px; align-items: center; }
.measure { display: grid; gap: 6px; }
.line-measure { display: grid; grid-template-columns: 4.5em minmax(120px, 360px) auto; gap: 12px; align-items: center; font-size: 0.85rem; }
.fill-track { position: relative; display: block; height: 14px; background: #0f1119; border-radius: 3px; overflow: hidden; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; display: block; border-radius: 3px; }
.fill.most { background: rgba(70, 184, 168, 0.35); }
.fill.target { background: var(--made); }
.fill.with { background: var(--shapes); }
.fill.without { background: var(--dim); opacity: 0.6; }
.two { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1.2fr); gap: 28px; align-items: start; margin-top: 12px; }
@media (max-width: 900px) { .two { grid-template-columns: minmax(0, 1fr); } }
.field { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.field textarea { width: 100%; background: var(--panel); color: var(--words); border: 1px solid var(--line); padding: 6px 8px; font: inherit; }
.field .why { flex-basis: 100%; }
.field input[type="range"] { width: 12em; padding: 0; }
.field small { color: var(--dim); }
.odds-bar { height: 12px; background: #0f1119; border-radius: 3px; overflow: hidden; }
.odds-bar span { display: block; height: 100%; background: var(--shapes); }
.turn-line { display: grid; grid-template-columns: minmax(9em, 1fr) minmax(170px, 1.4fr) minmax(170px, 1.4fr); gap: 10px; align-items: center; font-size: 0.82rem; margin: 5px 0; }
.turn-line .pair { display: grid; grid-template-columns: 4.2em 1fr 3.2em; gap: 6px; align-items: center; }
.turn-line .tag { color: var(--dim); font-size: 0.72rem; }
.turn-line .path { word-break: break-word; }
.cycle { width: 100%; max-width: 560px; height: auto; display: block; background: #0f1119; border: 1px solid var(--line); border-radius: 6px; touch-action: none; }
.cycle .handle { cursor: grab; }

.turn-between { display: flex; align-items: center; align-self: stretch; border-left: 2px dashed var(--words); padding-left: 6px; margin: 0 4px; color: var(--words); font-size: 0.72rem; white-space: nowrap; }
.line-measure.axis { margin-top: 2px; }
.line-measure .ticks { position: relative; display: block; height: 16px; border-top: 1px solid var(--line); }
.line-measure .ticks .tick { position: absolute; top: 1px; transform: translateX(-50%); font-size: 0.68rem; color: var(--dim); height: auto; border: none; padding: 0; }

/* the benches */
.slots i.over { background: #e8806f; border-color: #e8806f; }
.note-names { font-size: 0.85rem; color: var(--dim); }
button.chip { color: inherit; font: inherit; cursor: pointer; }
button.chip.lit { border-color: var(--shapes); color: var(--shapes); }

/* harmony, melody & choir audition lab */
.facet-table code { color: var(--made); font-size: 0.85rem; }
.facet-table .spectrum { color: var(--dim); white-space: nowrap; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.stage-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.stage-head h2 { margin: 0; color: var(--words); }
.play-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.play-btn { background: var(--night); border: 1px solid var(--line); padding: 4px 12px; font-size: 0.85rem; }
.play-btn.primary { border-color: var(--made); color: var(--made); font-weight: 700; }
.play-btn.lit { background: var(--made); border-color: var(--made); color: #101015; font-weight: 700; }
.bench-link { text-decoration: none; font-size: 0.85rem; padding: 4px 12px; }
.metrics-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.metric { background: var(--night); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 0.78rem; color: var(--words); }
.choir-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; font-size: 0.8rem; color: var(--dim); }
.voice-tag { display: inline-flex; align-items: center; gap: 6px; }
.voice-tag i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.choir-roll { width: 100%; max-width: 680px; height: auto; display: block; background: #0f1119; border: 1px solid var(--line); border-radius: 6px; }
.example-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.example-card { cursor: pointer; display: flex; flex-direction: column; transition: border-color 0.12s, box-shadow 0.12s; }
.example-card:hover { border-color: var(--dim); }
.example-card.chosen-card { box-shadow: 0 0 0 2px var(--made); }
.param-pills { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.pill { background: var(--night); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; font-size: 0.72rem; color: var(--dim); }
.card-actions { margin-top: auto; padding-top: 8px; }
.preset-bar { margin-bottom: 10px; }
.tempo-slider { display: inline-flex; align-items: center; gap: 8px; }
.tempo-slider input[type="range"] { width: 8em; padding: 0; }
.bench-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; margin: 12px 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.bench-slider { display: flex; flex-direction: column; gap: 4px; }
.bench-slider-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; }
.bench-slider-name { color: var(--words); font-weight: 600; }
.slider-val { color: var(--made); }
.slider-tag { color: var(--shapes); font-size: 0.76rem; }
.bench-slider input[type="range"] { width: 100%; padding: 0; }
.bench-slider-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 0.72rem; color: var(--dim); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.profile-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.profile-card h3 { margin: 0 0 4px; font-size: 0.92rem; color: var(--words); display: flex; justify-content: space-between; }
.profile-card h3 span { color: var(--made); font-weight: 400; font-size: 0.8rem; }
