@font-face {
  font-family: "Bravura";
  src: url("fonts/Bravura.woff2") format("woff2");
  font-display: block;
}

/* The colours are Canti's: teal for what leads, cream for the paper, warm wood and soft gold for
   what should catch the eye, light teal for calm surfaces. */
:root {
  --bg: #fbf6ec; --surface: #fffdf8; --text: #16363d; --muted: #5d7a7f; --line: #e7dcc9;
  --accent: #1b6670; --accent-ink: #ffffff; --down: #b9532f; --staff: #8a918c; --ink: #17292d;
  --wood: #b9744a; --gold: #e8b565; --mint: #b5dadd;
  --c0: #c0563a; --c1: #a8527c; --c2: #b07d14; --c3: #3e8f5e; --c4: #2b62a8; --c5: #168388;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1b1f; --surface: #15272c; --text: #eef3ee; --muted: #93aeb0; --line: #24393f;
    --accent: #5cc6cb; --accent-ink: #06262a; --down: #ec8a60; --staff: #6f8588; --ink: #eef3ee;
    --wood: #d9966a; --gold: #ecc07a; --mint: #1f4a50;
    --c0: #ec7c60; --c1: #e58fb6; --c2: #e6b55a; --c3: #5cc17c; --c4: #7fb0ee; --c5: #4fc4c4;
    color-scheme: dark;
  }
}
.pc0 { --pc: var(--c0); } .pc1 { --pc: var(--c1); } .pc2 { --pc: var(--c2); }
.pc3 { --pc: var(--c3); } .pc4 { --pc: var(--c4); } .pc5 { --pc: var(--c5); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--text);
  background:
    radial-gradient(circle at 92% -6%, color-mix(in srgb, var(--mint) 55%, transparent), transparent 30rem),
    radial-gradient(circle at -8% 105%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 26rem),
    var(--bg);
  background-attachment: fixed;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button, select, input { font: inherit; color: inherit; }
/* A list to choose from looks the same everywhere: the field of the page, with an arrow of its own
   (drawn with two gradients; the arrow of the system does not fit the rest). */
select {
  appearance: none; -webkit-appearance: none; box-sizing: border-box; max-width: 100%;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--surface);
  color: var(--text); line-height: 1.3; cursor: pointer; text-overflow: ellipsis; transition: border-color .15s, box-shadow .15s;
}
select:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
select:disabled { opacity: .55; cursor: default; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }

/* ---------- login ---------- */
.gate {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34rem),
    var(--bg);
}
.gate-card {
  width: min(100%, 400px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 28px 28px; display: grid; gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .12);
}
.gate-mark {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 26px;
}
.gate-card h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.gate-card > p { color: var(--muted); }
.gate-card label { font-size: .85rem; font-weight: 600; margin-bottom: -8px; }
.pw-row { display: flex; gap: 8px; }
.pw-row input {
  flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); font-size: 1.05rem;
}
.pw-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ghost {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  font-size: .85rem; color: var(--muted); text-decoration: none; display: inline-block;
}
.ghost:hover { border-color: var(--accent); color: var(--text); }
.gate-card .check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); margin: 0; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.primary {
  padding: 12px 18px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; display: inline-block; text-align: center;
}
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .6; cursor: default; }
/* a switch: a checkbox drawn as a track with a knob */
.switch { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; margin: 6px 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { flex: none; width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
#settingsDialog select, #settingsDialog input[type="text"] { width: 100%; box-sizing: border-box; }
#settingsDialog .switch { margin: 2px 0; }
#settingsDialog .field-label { margin-top: 8px; }
.mix-switch { font-size: .82rem; color: var(--muted); padding-top: 10px; margin: 4px 0 0; border-top: 1px solid var(--line); }
.mix-switch .switch-track { transform: scale(.85); transform-origin: left center; margin-right: -6px; }
#settingsDialog .muted { font-size: .82rem; margin: 0; }
.gate-part { display: grid; gap: 14px; }
.gate-part[hidden] { display: none; }
.gate-part input[type="email"] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.gate-or { text-align: center; color: var(--muted); font-size: .85rem; margin: -4px 0; }
.gate-error.fine { color: var(--muted); }
.gate-error a { color: var(--accent); }
/* people and groups (administration) */
.people-body { display: grid; gap: 10px; }
.people-body input[type="text"], .people-body input[type="email"], .people-body input[type="url"], .people-body input[type="password"], .people-body input[type="number"] { width: 100%; box-sizing: border-box; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; min-width: 0; }
.inline-add input[type="number"] { flex: 0 0 5.5em; }
.people { display: grid; gap: 8px; }
.person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; align-items: start; }
.person-who { display: grid; }
.wait-list { display: grid; gap: 8px; margin-bottom: 28px; }
.wait-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.wait-row .person-who { flex: 1 1 220px; }
.guest-note { margin: 0 0 22px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 22%, var(--surface)); font-size: .92rem; }
#guestDialog form { display: grid; gap: 8px; }
#guestDialog .muted { font-size: .88rem; }
#guestDialog .guest-why { font-style: italic; }
.person-who .muted { font-size: .8rem; overflow-wrap: anywhere; }
.person-groups { display: flex; flex-wrap: wrap; gap: 4px 14px; grid-column: 1 / -1; }
.person-groups .check { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .88rem; font-weight: 400; }
.person > .linkbtn { grid-column: 2; grid-row: 1; }
.mail-set { border-top: 1px solid var(--line); padding-top: 10px; }
.mail-set summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.mail-set[open] { display: grid; gap: 8px; }
#textDialog form { display: grid; gap: 10px; }
#textDialog h2 { font-size: 1.05rem; margin: 0; }
#textInput { width: 100%; box-sizing: border-box; }
.mix-row.shared .mix-name { color: var(--muted); font-style: italic; }
.mix-row.shared .mini.add { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.shared-mark { display: grid; place-items: center; color: var(--muted); }
.shared-mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gate-error { color: var(--down); font-size: .9rem; min-height: 1.35em; margin-top: -6px; }
.shake { animation: shake .32s; }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* ---------- shell ---------- */
.bar {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.bar-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 700; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.spacer { flex: 1; }
main { max-width: 1240px; margin: 0 auto; padding: 28px 16px 60px; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.muted { color: var(--muted); }

/* ---------- home ---------- */
.home-head h1 { font-size: 2rem; letter-spacing: -0.02em; }
.home-head { margin-bottom: 28px; }
.notices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 36px; }
.notice b { display: block; }
.notice span { color: var(--muted); font-size: .92rem; white-space: pre-line; }
.pieces { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.piece { display: flex; flex-direction: column; gap: 12px; }
.piece h3 { font-size: 1.1rem; line-height: 1.25; }
.piece h3 a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.piece h3 svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.piece .muted { font-size: .88rem; margin-top: 2px; }
.piece-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.piece-top .icon-btn { flex: none; width: 30px; height: 30px; }
.piece-top .icon-btn svg { width: 16px; height: 16px; }
.piece-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.piece-foot .primary { flex: 1; text-align: center; text-decoration: none; }
.piece-foot .ghost[data-files][aria-expanded="true"] { border-color: var(--accent); color: var(--text); }
.piece-foot .dl { flex-basis: 100%; }
.tag.warm { margin-left: 8px; vertical-align: 2px; }
.tag.private { margin-left: 8px; vertical-align: 2px; font-weight: 600; color: var(--accent); border-color: currentColor; }
.piece:has(.tag.private) { border-style: dashed; }
#editVisible { justify-self: start; }
.piece.folder { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.folder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: .88rem; color: var(--muted); }
.folder-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-list svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.piece-audio { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.piece-audio .round { width: 34px; height: 34px; flex: none; }
.piece-audio .round svg { width: 14px; height: 14px; }
.piece-audio select { flex: 1; min-width: 0; font-size: .85rem; padding: 6px 8px; }
.piece-audio audio { flex-basis: 100%; }
.folder-list .more { font-style: italic; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.dl { display: flex; flex-wrap: wrap; gap: 6px; }
.dl .ghost { font-size: .8rem; padding: 6px 10px; text-decoration: none; }
.ghost.heard.youtube { color: #b3261e; }
.ghost.heard.spotify { color: #17823f; }
.crumbs a { color: inherit; border-radius: 8px; }
.rep-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rep-head .eyebrow { margin: 0; }
.rep-head .ghost { font-size: .85rem; padding: 6px 12px; }
#homeSearch { flex: 0 1 230px; min-width: 120px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .88rem; }
#homeSearch:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.found-place { display: flex; align-items: center; gap: 5px; font-size: .8rem; margin: 6px 0 0; }
.found-place svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.found-text { margin: 6px 0 0; font-size: .88rem; font-style: italic; line-height: 1.4; }
.found-text mark { background: color-mix(in srgb, var(--gold) 55%, transparent); color: inherit; font-style: normal; font-weight: 600; border-radius: 3px; padding: 0 2px; }
.piece.folder.own { background: color-mix(in srgb, var(--accent) 3%, var(--surface)); border-style: dashed; }
#editShare { width: 100%; box-sizing: border-box; }
#editShareBox .muted { font-size: .8rem; margin: 4px 0 0; }
.membership { display: inline-flex; align-items: center; gap: 8px; }
.membership .lead { color: var(--muted); font-size: .8rem; }
/* moving cards (administration): where a card can go is marked while one is dragged */
.piece[draggable="true"] { cursor: grab; }
.piece.is-dragged { opacity: .4; }
.dragging-on .piece.folder:not(.is-dragged), .dragging-on .crumbs a {
  outline: 2px dashed var(--accent); outline-offset: 2px;
}
.dragging-on .crumbs a { padding: 6px 12px; margin: -6px 0; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.dragging-on .piece.folder:not(.is-dragged) .piece-foot .primary::after { content: " · hierher ziehen"; font-weight: 500; }
.drop-into { outline-style: solid !important; outline-width: 3px !important; background: color-mix(in srgb, var(--accent) 24%, var(--surface)) !important; }
.new-folder { display: none; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 150px; background: transparent; border: 2px dashed var(--accent); color: var(--accent); }
.new-folder svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.new-folder span { font-size: .85rem; color: var(--muted); }
.dragging-on .new-folder { display: flex; }
.drop-before { box-shadow: -6px 0 0 -1px var(--accent); }
.drop-after { box-shadow: 6px 0 0 -1px var(--accent); }
.crumbs span { margin: 0 .5em; }
.pieces .empty { color: var(--muted); }

/* ---------- administration ---------- */
.badge { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.admin-eyebrow { margin-top: 40px; }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.admin-card { display: grid; gap: 10px; }
.admin-card h2, dialog h2 { font-size: 1rem; }
.admin-card .muted { font-size: .88rem; }
input[type=text], input[type=number], textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-size: .95rem;
}
textarea { resize: vertical; min-height: 60px; font: inherit; font-size: .95rem; color: inherit; }
input[type=file] { font-size: .88rem; max-width: 100%; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.status { font-size: .86rem; min-height: 1.3em; color: var(--muted); }
.status.error { color: var(--down); }
.notice-row { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.notice-row .linkbtn { justify-self: end; }
.ghost.danger:hover { border-color: var(--down); color: var(--down); }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(92vw, 460px); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }          /* a wide field must not widen the form past its window */
dialog .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
dialog .two > div > select { width: 100%; }
dialog .row-actions { margin-top: 8px; }

/* ---------- practice ---------- */
.p-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; margin-bottom: 18px; }
.p-head h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
.back { font-size: .9rem; text-decoration: none; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 11px; padding: 3px; background: var(--surface); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--pc, var(--accent)); color: var(--accent-ink); }
.field-label { font-size: .75rem; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
/* On wide screens only the score scrolls: the title row and the side panels stay in place.
   app.js measures the bars above and below and publishes their heights as custom properties. */
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  #practice { padding-top: 0; }
  .p-head {
    position: sticky; top: var(--bar-h, 58px); z-index: 5; margin-bottom: 0; padding: 18px 0 14px;
    background: var(--bg);
  }
  .side {
    position: sticky; top: calc(var(--bar-h, 58px) + var(--head-h, 90px));
    max-height: calc(100vh - var(--bar-h, 58px) - var(--head-h, 90px) - var(--transport-h, 80px) - 12px);
    overflow-y: auto; padding-right: 2px;
  }
}
.score-card { padding: 12px 10px 6px; overflow: hidden; }
.score-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 6px 6px; font-size: .82rem; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-size: .82rem; }
#score svg { display: block; }
#score .empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.side { display: grid; gap: 16px; }
.side h2 { font-size: .95rem; margin-bottom: 10px; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chip {
  padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  font-size: .84rem; font-weight: 600; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.presets .chip { text-align: left; white-space: normal; line-height: 1.25; }
.presets .chip small { display: block; font-weight: 400; opacity: .75; font-size: .74rem; }
.mix-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 62px; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.mix-row:first-child { border-top: 0; }
#mixer:has(.mix-dyn) .mix-row { grid-template-columns: minmax(0, 1fr) auto 62px 2.1em; }
.mix-dyn { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; font-size: .95rem; color: var(--pc, var(--accent)); text-align: center; }
.mix-name { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 7px; min-width: 0; }
.mix-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-name i { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); flex: none; }
.mix-name em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .75rem; }
.mix-btns { display: flex; gap: 4px; }
.mini {
  width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; color: var(--muted); padding: 0;
}
.mini[aria-pressed="true"] { color: var(--pc); border-color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); }
.mini svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
input[type=range] { width: 100%; accent-color: var(--pc, var(--accent)); min-width: 0; }
.track-row { display: flex; gap: 6px; }
.track-row select { flex: 1; min-width: 0; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; }
audio { width: 100%; height: 36px; }

/* ---------- score ---------- */
.mus { font-family: "Bravura"; fill: currentColor; }
.ink { fill: currentColor; }
.staffline { stroke: var(--staff); stroke-width: 1; }
.barline { stroke: var(--staff); stroke-width: 1.2; }
.staff { color: var(--ink); }
.beam { fill: currentColor; }
/* All staves are drawn alike; the reader's own line is marked by its band, muted parts fade. */
.staff.silent :is(.n, .rest, .beam, .tie, .bracket, .tuplet) { opacity: .35; }
.plabel { fill: var(--pc); font-weight: 700; }
.stem { stroke: currentColor; stroke-width: 1.2; }
.ledger { stroke: currentColor; stroke-width: 1.3; opacity: .75; }
.tie, .hairpin, .bracket { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.tuplet { fill: currentColor; font-style: italic; font-weight: 700; }
.n .halo { fill: currentColor; opacity: 0; }
/* the aids while playing; a singer can switch each of them off (see showAids in app.js) */
body:not(.no-glow) .n.on { opacity: 1 !important; color: var(--pc); }
body:not(.no-glow) .n.on .halo { opacity: .2; }
body:not(.no-syllable) .n.on .lyric { font-weight: 700; }
.no-cursor #score .playhead { display: none; }
.lyric, .expr { fill: currentColor; }
.expr { font-style: italic; }
.barnum { fill: var(--muted); }
.tempo { fill: var(--text); font-weight: 700; }
.chordsym { fill: var(--accent); font-weight: 700; }
.entry rect { fill: var(--surface); stroke: currentColor; stroke-width: 1.3; }
.entry text { fill: currentColor; font-weight: 700; }
.entry.selmark rect { stroke: var(--accent); }
.entry.selmark text { fill: var(--accent); }
.mine-band { fill: var(--pc); opacity: .09; pointer-events: none; }
.hit { fill: transparent; cursor: pointer; }
.hit:hover { fill: color-mix(in srgb, var(--accent) 7%, transparent); }
.hit.inloop { fill: color-mix(in srgb, var(--accent) 11%, transparent); }
.playhead { fill: var(--accent); opacity: .75; pointer-events: none; }

/* undo, redo and save beside "Noten bearbeiten" */
.ed-actions { display: inline-flex; gap: 4px; margin-right: 4px; }
.ed-actions[hidden] { display: none; }
.icon-btn {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.save.dirty { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn.save.dirty:hover { color: var(--accent-ink); filter: brightness(1.08); }
.icon-btn.toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn text { fill: currentColor; stroke: none; font-size: 12.5px; font-weight: 800; font-family: inherit; letter-spacing: .3px; }
#countBtn svg { width: 27px; height: 27px; }
.mix-btns .mini { width: 30px; }
.mix-btns { gap: 3px; }
.t-icons { display: inline-flex; gap: 6px; }
.t-icons .icon-btn { width: 38px; height: 38px; border-radius: 50%; }
/* the editor's notes are shown as toasts; the line under the tools keeps only its link */
#edStatus { display: none; }
.editor .status:not(:has(> button:not([hidden]))) { display: none; }
/* the loop in the score: its two markers, and the sign in front of a line */
.loopmark { cursor: ew-resize; touch-action: none; }
.loopmark .grab { fill: transparent; }
.loopmark line { stroke: var(--accent); stroke-width: 2; }
.loopmark path { fill: var(--accent); }
.loopmark:hover path { fill: var(--ink); }
.linetool { cursor: pointer; opacity: 0; transition: opacity .12s; }
.linetool:hover { opacity: 1; }
@media (hover: none) { .linetool { opacity: .5; } }
.editing .linetool { display: none; }
.linetool rect { fill: transparent; }
.linetool circle { fill: var(--accent); }
.linetool path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* the verdict on a take: over the notes, in its dialog, and the board for feedback while singing */
.n.fb-good { color: #2e9d57; }
.n.fb-ok { color: #c58a00; }
.n.fb-off { color: #d2452f; }
.n.fb-miss { color: #9a9a9a; }
.fbmark { fill: currentColor; font-weight: 800; pointer-events: none; }
dialog.wide { width: min(94vw, 860px); }
dialog.place { width: min(94vw, 440px); }
dialog.place h2 { margin-top: 0; }
.place-open { margin-top: 10px; }
.place-field { position: relative; width: 100%; aspect-ratio: 1; margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; touch-action: none; user-select: none;
  background: radial-gradient(circle at 50% 50%, transparent 0 16.4%, var(--line) 16.5% 16.9%, transparent 17% 33%, var(--line) 33.1% 33.5%, transparent 33.6% 49.6%, var(--line) 49.7% 50.1%, transparent 50.2%), var(--bg); }
.place-me { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 3px 9px; border-radius: 999px; background: var(--text); color: var(--surface); font-size: .78rem; font-weight: 700; pointer-events: none; }
.place-dot { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; background: var(--pc, var(--muted)); color: #fff; font-size: .78rem; font-weight: 700; cursor: grab; touch-action: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.place-dot.comp { background: var(--muted); }
.place-dot.take { width: 24px; height: 24px; font-size: .68rem; border-width: 1.5px; }
#placeSoloHint { margin: 0; min-height: 1.2em; font-size: .82rem; }
.place-dot.middle { opacity: .55; }
.place-dot:active { cursor: grabbing; }
.hear-field { cursor: grab; }
.hear-field.asking { cursor: crosshair; }
.hear-dot { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 700; font-style: normal; pointer-events: none; }
.hear-dot.was { border: 2px solid var(--accent); color: var(--accent); background: var(--surface); }
.hear-dot.heard { background: var(--accent); color: #fff; }
.hear-dot.tour { width: 26px; height: 26px; background: #2e9d57; border: 3px solid var(--surface); box-shadow: 0 0 0 2px #2e9d57; }
dialog.ask { width: min(92vw, 420px); }
dialog.ask p { margin: 0; font-size: 1rem; line-height: 1.45; }
dialog.ask .row-actions { margin-top: 14px; }
dialog .primary.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
dialog h3 { font-size: .9rem; margin: 6px 0 2px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { display: grid; gap: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.stat b { font-size: 1.35rem; letter-spacing: -0.02em; }
.stat span { font-size: .8rem; font-weight: 600; }
.stat small { font-size: .74rem; color: var(--muted); }
.take-plot { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.take-plot svg { display: block; }
.pl-bar { stroke: var(--line); stroke-width: 1; }
.pl-staff, .pl-ledger { stroke: var(--muted); stroke-width: 1; }
.pl-stem { stroke: currentColor; stroke-width: 1.2; }
.pl-written { color: var(--text); }
.pl-written circle { fill: currentColor; }
.pl-written.an-good { color: #2e9d57; }
.pl-written.an-ok { color: #c58a00; }
.pl-written.an-off { color: #d2452f; }
.pl-written.an-miss { color: #9a9a9a; }
.pl-word { fill: var(--text); font-size: 11px; }
.plot-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plot-bar .muted { font-size: .8rem; }
.seg-zoom { display: inline-flex; gap: 4px; flex: none; }
.seg-zoom .icon-btn { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.pl-num { fill: var(--muted); font-size: 9px; }
.pl-note.an-good { fill: #2e9d57; }
.pl-note.an-ok { fill: #c58a00; }
.pl-note.an-off { fill: #d2452f; }
.pl-note.an-miss { fill: #b9b9b9; }
.pl-note { opacity: .55; }
.pl-voice { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.section-row:first-child { border-top: 0; }
/* the voice while singing: a faint line over the notes, sparks and a word of cheer */
.trail { pointer-events: none; transition: opacity 1.2s; }
.trail.done { opacity: 0; transition-delay: 3s; }
.trail line { stroke-width: 2.4; stroke-linecap: round; opacity: .5; }
.trail .hit { stroke: #2e9d57; }
.trail .miss { stroke: #d2452f; opacity: .38; }
.trail .free { stroke: var(--muted); opacity: .3; }
.trail .spark { fill: #2e9d57; animation: spark .9s ease-out forwards; transform-box: fill-box; transform-origin: center; }
.trail .cheer { fill: #2e9d57; font-weight: 800; animation: cheer 1.5s ease-out forwards; }
@keyframes spark { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.4); } }
@keyframes cheer { from { opacity: .95; transform: translateY(0); } to { opacity: 0; transform: translateY(-14px); } }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* tuning the microphone: three steps, big buttons, little text */
dialog.wizard { width: min(94vw, 520px); }
.wiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wiz-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.wiz-steps li { counter-increment: step; font-size: .74rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.wiz-steps li::before { content: counter(step); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); font-weight: 700; }
.wiz-steps li.now { color: var(--text); font-weight: 700; }
.wiz-steps li.now::before { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wiz-steps li.done::before { content: '✓'; background: #2e9d57; border-color: #2e9d57; color: #fff; }
.wiz-panel { display: grid; justify-items: center; gap: 12px; padding: 10px 0 4px; min-height: 250px; align-content: center; }
.wiz-panel[hidden] { display: none; }
.wiz-lead { margin: 0; font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wiz-emoji { font-size: 1.5em; line-height: 1; }
.big-round { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.05rem; font-weight: 700; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.big-round:hover:not(:disabled) { filter: brightness(1.08); }
.big-round:disabled { opacity: .45; box-shadow: none; }
.wiz-value { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; min-height: 1.2em; }
.wiz-panel .status { min-height: 1.2em; margin: 0; }
.warm { display: grid; gap: 10px; }
/* the warm-up has room: a wide window and a tall board */
dialog.warm-big { width: min(96vw, 980px); }
.warm-big .wiz-board { height: min(52vh, 420px); }
.warm-big .warm-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.warm h2 { font-size: 1.05rem; margin: 0; }
.warm .muted { font-size: .88rem; margin: 0; }
#warmPick, #warmRun, #warmDone { display: grid; gap: 10px; }
#warmPick[hidden], #warmRun[hidden], #warmDone[hidden] { display: none; }
.range-line { margin: 4px 0 0; display: grid; gap: 2px; }
.range-line span { font-size: .85rem; color: var(--muted); }
.range-strip { position: relative; height: 40px; margin-top: 6px; }
.range-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.range-strip i { position: absolute; top: 6px; height: 12px; border-radius: 999px; }
.range-strip i.all { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.range-strip i.now { background: var(--accent); top: 8px; height: 8px; }
.range-strip span { position: absolute; top: 22px; transform: translateX(-50%); font-size: .7rem; color: var(--muted); }
.range-strip span:first-of-type { transform: none; }
.range-strip span:last-of-type { transform: translateX(-100%); }
.warm-list { display: grid; gap: 8px; }
.warm-item { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.warm-item:hover { border-color: var(--accent); }
.warm-item span { font-size: .82rem; color: var(--muted); }
.warm-rounds { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.warm-rounds input { width: 4.2em; }
.warm-known { margin: 0; font-weight: 600; font-size: .92rem; }
.warm-opts { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.warm-opts[hidden] { display: none; }
.warm-opts { align-items: center; }
.warm-opts .switch { margin: 0; }
.warm-venue { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.warm-venue .menu-wrap { display: inline-block; }
.warm-venue .venue-btn { height: 34px; }
.warm-result { margin: 0; min-height: 1.4em; font-weight: 700; color: #2e9d57; }
.warm-result.bad { color: #d2452f; }
#editWarmDir { width: 100%; box-sizing: border-box; }
.wiz-meter { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.wiz-meter .wiz-emoji { font-size: 1rem; }
.meter-track { flex: 1; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.meter-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: #2e9d57; }
.wiz-meter.hot .meter-track i { background: #d2452f; }
.wiz-meter.off { opacity: .35; }
.wiz-board { width: 100%; height: 205px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.tile { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; border: 2px solid var(--line); text-align: center; }
.tile b { font-size: 1.02rem; }
.tile span:last-child { font-size: .74rem; color: var(--muted); }
.tile.good { border-color: #2e9d57; background: color-mix(in srgb, #2e9d57 9%, transparent); }
.tile.fair { border-color: #c58a00; background: color-mix(in srgb, #c58a00 10%, transparent); }
.tile.bad { border-color: #d2452f; background: color-mix(in srgb, #d2452f 10%, transparent); }
.tile.none { opacity: .55; }
.wiz-verdict { margin: 0; font-weight: 600; text-align: center; }
.wiz-fine { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; font-size: .8rem; color: var(--muted); }
dialog .chip.save { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); padding: 8px 14px; }
@media (max-width: 480px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wiz-steps li { font-size: 0; } }
/* tuning the microphone delay: the row of beats that light up */
.beats { display: flex; gap: 8px; justify-content: center; padding: 6px 0; }
.beats i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); }
.beats i.lead { border-color: var(--line); }
.beats i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
.beats i.lead.on { background: var(--muted); border-color: var(--muted); }
.tune-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0; }
/* recording: the button beside "play", and the takes under a voice */
.round.rec svg { fill: #c62828; }
.round.rec[aria-pressed="true"] { background: #c62828; border-color: #c62828; animation: rec-pulse 1.1s ease-in-out infinite; }
.round.rec[aria-pressed="true"] svg { fill: #fff; }
@keyframes rec-pulse { 50% { box-shadow: 0 0 0 7px rgba(198, 40, 40, .22); } }
.mix-row.take { border-top: 0; padding-top: 0; }
.mix-row.take .mix-name { font-weight: 500; font-size: .8rem; gap: 3px; flex-wrap: nowrap; }
.mix-row.take .mix-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-row.take .mix-name em { display: none; }
.mini-gap { width: 30px; height: 30px; }
.mix-row.comp { --pc: var(--muted); }
.mix-opts { display: flex; gap: 6px; padding: 0 0 8px 17px; }
.mix-opts select { flex: 1; min-width: 0; font-size: .8rem; padding: 4px 6px; }
input.chord-in { width: 9.5em; }
/* delete: a red dot that becomes a bin when the row is pointed at; the verdict: a bare sign after the name */
.take-del { width: 14px; }
.take-check { width: 18px; }
.take-del, .take-check { height: 20px; padding: 0; border: 0; background: none; display: grid; place-items: center; flex: none; color: var(--muted); }
.take-del svg, .take-check svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.take-del svg { display: none; }
.take-del::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #c62828; }
.mix-row.take:hover .take-del svg, .take-del:focus-visible svg { display: block; }
.mix-row.take:hover .take-del::before, .take-del:focus-visible::before { display: none; }
.take-del:hover { color: #c62828; }
.take-check:hover, .take-check[aria-pressed="true"] { color: var(--accent); }
@media (hover: none) { .take-del svg { display: block; } .take-del::before { display: none; } }
/* "this is my voice" in the list of voices */
.mini.me[aria-pressed="true"] { background: var(--pc); color: #fff; }
/* what to hear: the menu on the button beside "play" */
.menu-wrap { position: relative; }
.preset-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; }
.preset-icon { display: inline-grid; }
.venue-btn { padding: 0 9px; gap: 4px; }
.preset-btn svg, .menu-item svg { width: 22px; height: 22px; flex: none; }
.preset-btn .caret { font-size: .7rem; color: var(--muted); }
.menu {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 15em; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.menu[hidden] { display: none; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-weight: 600; font-size: .9rem; color: var(--text); }
.menu-item:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.menu-item[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.menu-item small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }
svg .me { fill: var(--accent); }
svg .dim { fill: var(--accent); opacity: .35; }
svg .off { fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }

/* ---------- editor ---------- */
.editor {
  position: sticky; bottom: 0; z-index: 11; border-top: 2px solid var(--accent);
  background: var(--surface); box-shadow: 0 -10px 30px rgba(0, 0, 0, .12);
}
.e-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px 12px; display: grid; gap: 8px; }
.e-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.e-head b { min-width: 9.5em; text-align: center; }
.e-head .primary { padding: 8px 14px; }
.round.small { width: 34px; height: 34px; font-size: 1.2rem; line-height: 1; }
#edScore { overflow-x: auto; min-height: 150px; }
#edScore svg { display: block; }
#edScore .n { cursor: pointer; }
.e-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.e-group .field-label { flex-basis: 100%; margin: 0; }
.e-tools .chip:disabled, .e-head .chip:disabled { opacity: .4; cursor: default; }
/* The tools: two columns of rows, each a short label and its controls, all of one height. */
.e-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 36px; padding-top: 8px; border-top: 1px solid var(--line); }
/* the tools for a note need no labels: one row of buttons that wraps */
.e-tools.e-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.e-row { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); align-items: center; gap: 10px; min-height: 36px; }
.e-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.e-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.e-hint { font-size: .78rem; color: var(--muted); }
.e-slash { color: var(--muted); }
.e-tools .chip, .e-tools input, .e-tools select, .e-tabs .chip {
  box-sizing: border-box; height: 34px; margin: 0; padding: 0 12px; border-radius: 9px; font-size: .88rem; line-height: 1; white-space: nowrap;
}
.e-tools input, .e-tools select { border: 1px solid var(--line); background: var(--surface); color: var(--text); font-family: inherit; }
.e-tools input:focus, .e-tools select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.e-tools input[type=number] { width: 4.6em; padding-right: 4px; }
.e-tools input[type=text] { flex: 1 1 9em; min-width: 8em; max-width: 15em; }
.e-tools input[type=text].wide { max-width: 26em; }
.e-tools select { flex: 1 1 auto; min-width: 0; max-width: 21em; padding-right: 6px; }
.e-tools select.narrow { flex: none; width: 5.6em; }
.e-tools .chip.icon { width: 34px; padding: 0; font-size: 1.1rem; }
.e-tools .chip.dyn { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; min-width: 40px; padding: 0 9px; }
/* buttons that belong together sit edge to edge */
.editor .seg { display: inline-flex; gap: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.editor .seg > .chip { border: 1px solid var(--line); border-radius: 0; margin-left: -1px; background: var(--surface); color: var(--text); font-weight: 500; }
.editor .seg > .chip:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.editor .seg > .chip:last-child { border-radius: 0 9px 9px 0; }
.editor .seg > .chip:only-child { border-radius: 9px; }
.editor .seg > .chip[aria-pressed="true"], .editor .seg > .chip:hover { position: relative; z-index: 1; }
.editor .seg > .chip:hover { border-color: var(--accent); }
.editor .seg > .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* the text field that lies over a syllable while the words are typed */
.lyric-box { position: relative; }
input.lyric-edit {
  position: absolute; z-index: 3; transform: translate(-50%, -76%); box-sizing: content-box;
  padding: 1px 3px; border: 1.5px solid var(--accent); border-radius: 5px; background: var(--surface);
  color: var(--ink); font-family: inherit; line-height: 1.2; text-align: center;
}
.editing .lyric { cursor: text; }
/* arrows and plus at the start of a staff, to move a part or add one: only while editing, and
   clear when the start of the staff is pointed at */
.partools { display: none; }
.editing .partools { display: inline; opacity: 0; transition: opacity .12s; }
.editing .partools:hover { opacity: 1; }
@media (hover: none) { .editing .partools { opacity: .6; } }
.partools > rect { fill: transparent; }
.pbtn { cursor: pointer; }
.pbtn circle { fill: var(--accent); }
.pbtn:hover circle { fill: var(--ink); }
dialog .ghost.danger { color: #b3261e; border-color: currentColor; }
dialog .transpose-row { justify-content: flex-start; margin-top: 4px; }
#editTranspose { margin-top: 6px; }
#partClefRow { display: grid; gap: 8px; }
.pbtn path { stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
/* the cross beside a selected dynamic, hairpin or breath mark */
.mark-x {
  position: absolute; z-index: 3; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: #b3261e; color: #fff; font-size: 17px; line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25); cursor: pointer;
}
.mark-x:hover { background: #8c1d18; }
/* dynamics and hairpins that can be tapped, the selected one, and the place a hairpin starts at */
.mhit { fill: transparent; }
.ahit { fill: none; stroke: transparent; stroke-width: 16; stroke-linecap: round; pointer-events: stroke; }
.editing .mk { cursor: pointer; }
.selmark { fill: var(--accent); }
path.selmark { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.volta { stroke: currentColor; stroke-width: 1.2; }
.voltanum { fill: currentColor; font-weight: 700; }
.cursor { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; pointer-events: none; }
.e-tools .chip.danger { color: #b3261e; border-color: currentColor; }
/* the note table */
.e-roll { display: grid; gap: 6px; }
.e-rollbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.e-rollbar .field-label { margin: 0; }
.e-rollbar .chip { padding: 7px 11px; }
.roll-hint { color: var(--muted); font-size: .8rem; }
.rtr { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; opacity: .6; pointer-events: none; }
/* a take becoming a voice: bar after bar, each with its grid, notation, note table and text */
dialog.draft { width: min(97vw, 1320px); }
.d-form { display: grid; gap: 8px; min-width: 0; }
.d-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 20px; }
.d-field { display: grid; grid-template-rows: auto 38px; gap: 4px; margin: 0; }
.d-field .field-label { margin: 0; }
.d-field[hidden], .d-play .check[hidden] { display: none; }
.d-field input[type="text"], .d-field select { height: 38px; box-sizing: border-box; padding: 0 10px; margin: 0; font-size: .9rem; }
.d-field .seg { height: 38px; box-sizing: border-box; align-items: center; flex-wrap: nowrap; }
.d-field .seg button { height: 30px; padding: 0 11px; font-size: .85rem; }
.d-play { display: flex; align-items: center; gap: 12px; height: 38px; }
.d-play .round.play { width: 38px; height: 38px; }
.d-play .round.play svg { width: 16px; height: 16px; }
.d-play .check { display: flex; align-items: center; gap: 5px; font-size: .85rem; margin: 0; }
.d-bars { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.d-wide { display: grid; grid-template-columns: 30px auto; width: max-content; }
.d-staffbox { grid-column: 2; grid-row: 1; }
.d-notes { min-height: 96px; padding-top: 4px; }
.d-notes .n { cursor: text; }
.d-keys { grid-column: 1; grid-row: 2; align-self: end; position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.d-keys svg { display: block; }
.d-cols { grid-column: 2; grid-row: 2; display: flex; cursor: grab; }
.d-bars.panning, .d-bars.panning .d-cols { cursor: grabbing; user-select: none; }
.d-bar { flex: none; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); align-content: end; min-width: 0; overflow: hidden; }
.d-bar.edited .d-head { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.d-bar.around .d-roll { opacity: .78; }
.d-bar.around .d-head { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.d-bar.around.edited .d-head { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.d-switch { height: 38px; margin: 0; font-size: .85rem; }
.d-bar.active .d-head { box-shadow: inset 0 -2px var(--accent); }
.d-head { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; border-left: 1px solid var(--line); }
.d-head .seg { flex-wrap: nowrap; padding: 2px; border-radius: 8px; }
.d-head .seg button { padding: 2px 7px; font-size: .74rem; border-radius: 6px; }
.d-again { border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 50%; width: 24px; height: 24px; padding: 0; font-weight: 700; line-height: 1; flex: none; }
.d-rollbox { position: relative; }
.d-roll { touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; background: var(--surface); }
.d-roll svg { display: block; }
.d-line { position: absolute; left: 0; top: 20px; bottom: 0; width: 2px; background: #d2452f; pointer-events: none; }
.editor.rolling .e-tools { display: none; }
.editor.rolling #edScore { min-height: 0; }
#edRoll { touch-action: none; user-select: none; -webkit-user-select: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#edRoll svg { display: block; }
.rk { fill: var(--surface); }
.rk.b { fill: color-mix(in srgb, var(--ink) 7%, var(--surface)); }
.rl { stroke: color-mix(in srgb, var(--ink) 9%, transparent); stroke-width: 1; }
.rl.quarter { stroke: color-mix(in srgb, var(--ink) 20%, transparent); }
.rl.beat, .rl.c { stroke: color-mix(in srgb, var(--ink) 38%, transparent); }
.rt { fill: var(--muted); font-size: 10px; pointer-events: none; }
.rt.c { fill: var(--ink); font-weight: 700; }
.rn { fill: var(--accent); opacity: .78; cursor: grab; }
.rg.sel .rn { opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.rh { fill: #fff; opacity: .4; cursor: ew-resize; }
.rb-strip { fill: var(--surface); }
.rb { cursor: pointer; }
.rb rect { fill: color-mix(in srgb, var(--ink) 6%, var(--surface)); }
.rb text { fill: var(--muted); font-size: 11px; font-weight: 700; }
.rb.on rect { fill: var(--accent); }
.rb.on text { fill: #fff; }
.n.sel .halo { opacity: .28; fill: var(--accent); }
.n.sel .selhead { fill: var(--accent); }
/* first note of an arc that is being drawn */
.n.mark .halo { opacity: .9; fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 3; }
.editing .n { cursor: pointer; }
.editor .status { min-height: 1.2em; margin: 0; }
@media (max-width: 560px) {
  .e-in { padding: 8px 10px 10px; }
  .e-head b { min-width: max-content; flex: 0 0 auto; white-space: nowrap; text-align: left; }
  .e-head { gap: 6px; }
  .e-head .chip, .e-head .ghost, .e-head .primary { padding: 7px 9px; font-size: .85rem; }
  .roll-hint { display: none; }
  .e-tools { grid-template-columns: minmax(0, 1fr); }
  .e-tools.e-flow { gap: 6px; }
  .e-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .e-hint { display: none; }
}

/* ---------- transport ---------- */
.transport {
  position: sticky; bottom: 0; z-index: 10; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
}
.t-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.t-main { display: flex; align-items: center; gap: 10px; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; padding: 0; }
.round svg { width: 18px; height: 18px; fill: currentColor; }
.round.play { width: 52px; height: 52px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.round.play svg { width: 22px; height: 22px; }
.pos { font-variant-numeric: tabular-nums; min-width: 84px; line-height: 1.15; }
.pos b { font-size: 1.35rem; }
.pos span { color: var(--muted); }
.pos small { display: block; color: var(--muted); font-size: .72rem; }
.t-tempo { flex: 1 1 200px; min-width: 180px; max-width: 320px; }
.t-tempo .row { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--muted); }
.t-tempo output { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.t-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.t-opts select { padding: 6px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: .84rem; }
.t-opts .sep { color: var(--muted); font-size: .84rem; }
@media (max-width: 560px) {
  .t-in { padding: 8px 12px; gap: 6px 12px; }
  .round.play { width: 46px; height: 46px; }
  .t-opts .chip { padding: 6px 9px; font-size: .8rem; }
}
.toast.error { background: #b3261e; color: #fff; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--transport-h, 90px) + 16px); transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg);
  padding: 9px 16px; border-radius: 999px; font-size: .88rem; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center;
}
.toast.show { opacity: .96; }

/* ---------- printing the score (also the way to a PDF) ---------- */
.print-stage { position: absolute; left: -20000px; top: 0; width: 1000px; }
#printArea { display: none; }
dialog .time-row { display: flex; align-items: center; gap: 8px; }
dialog .time-row input { width: 5em; flex: none; }
dialog .time-row select { flex: 1; min-width: 0; }
dialog #newPiece, .admin-card #newPiece, .admin-card #exportAll { justify-self: start; }
.admin-card #exportAll[hidden], #editExport[hidden] { display: none; }
.admin-card #newPiece + h2 { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
/* No page margin: browsers print their header and footer into it. The sheets bring their own. */
@page { size: A4; margin: 0; }
.print-tint { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.file { display: inline-flex; align-items: center; }
.file-del { border: 0; background: none; color: var(--down); font-size: 1.1rem; line-height: 1; padding: 0 6px 0 2px; margin-left: -2px; }
.only-here { font-size: .85rem; flex-basis: 100%; }
.dl .add-file { border-style: dashed; }
@media print {
  /* a piece that is for the site only gives the printer an empty page */
  body.print-off > * { display: none !important; }
  body > *:not(#printArea) { display: none !important; }
  html, body { background: #fff; margin: 0; padding: 0; }
  #printArea { display: block; color: #000; }
  .print-sheet { box-sizing: border-box; width: 210mm; height: 296mm; padding: 12mm; overflow: hidden; break-after: page; break-inside: avoid; }
  .print-sheet:last-child { break-after: auto; }
  .print-head h1 { font-size: 20pt; margin: 0 0 2pt; }
  .print-head p { margin: 0 0 8pt; color: #333; }
  .print-page { display: block; width: 100%; height: auto; }
  .print-page .hit, .print-page .playhead, .print-page .halo { display: none; }
  #printArea:not(.tinted) .mine-band { display: none; }
  #printArea.tinted .mine-band { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- Canti's touch on the plain parts ---------- */
.brand { color: var(--accent); }
.eyebrow { color: var(--wood); }
.card { box-shadow: 0 10px 26px -22px color-mix(in srgb, var(--accent) 70%, transparent); }
h1 { color: var(--accent); letter-spacing: -0.015em; }

/* ---------- Canti and the tutorials ---------- */
.canti { display: inline-block; width: 120px; aspect-ratio: 760 / 560; flex: none; }
.canti svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* Canti is never quite still: it floats and sways, its scroll nods, the curl at its end wags, the
   pegs twitch, the eyes blink and wander. Each mood moves in its own way. */
.canti .c-lean { transform-box: fill-box; transform-origin: 50% 85%; transform: rotate(var(--lean, 0deg)); transition: transform .55s cubic-bezier(.3, 1.7, .5, 1); }
.canti .c-body { animation: canti-bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.canti .c-shade { animation: canti-shade 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.canti .c-scroll { animation: canti-scroll 2.7s ease-in-out infinite; transform-box: fill-box; transform-origin: 8% 100%; }
.canti .c-curl { animation: canti-curl 1.7s ease-in-out infinite; transform-box: fill-box; transform-origin: 25% 5%; }
.canti .c-pegs { animation: canti-pegs 5.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 50%; }
.canti .c-note { animation: canti-note 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.canti .c-note.n2 { animation-duration: 4s; animation-direction: reverse; }
.canti .c-note.n3 { animation-duration: 4.4s; animation-delay: -1.2s; }
.canti .c-note.n4 { animation-duration: 2.9s; animation-direction: reverse; animation-delay: -.6s; }
.canti .c-look { transform: translate(var(--look-x, 0px), var(--look-y, 0px)); transition: transform .18s ease-out; }
.canti .c-eyes.open { animation: canti-blink 6.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.canti .c-glint { animation: canti-glint 3.1s ease-in-out infinite; }
.canti .c-brows { transform: translate(calc(var(--look-x, 0px) * .35), calc(var(--look-y, 0px) * .5)); transition: transform .25s; }
.canti .c-brow, .canti .c-mouth { transform-box: fill-box; transform-origin: center; transition: transform .25s; }
.canti .c-burst { opacity: 0; transform-box: fill-box; transform-origin: center; }
/* one face at a time: the eyes and the mouth that go with the mood */
.canti .c-eyes.glad, .canti .c-eyes.wink, .canti .c-mouth { display: none; }
.canti.mood-guiding .c-mouth.smile, .canti.mood-happy .c-mouth.wide, .canti.mood-cheering .c-mouth.wide,
.canti.mood-curious .c-mouth.oh, .canti.mood-thinking .c-mouth.hm, .canti.mood-cheeky .c-mouth.smirk { display: inline; }
.canti.mood-happy .c-eyes.open, .canti.mood-cheering .c-eyes.open, .canti.mood-cheeky .c-eyes.open { display: none; }
.canti.mood-happy .c-eyes.glad, .canti.mood-cheering .c-eyes.glad, .canti.mood-cheeky .c-eyes.wink { display: inline; }
.canti.mood-curious .c-brow { transform: translateY(-9px); }
.canti.mood-curious .c-lean { transform: rotate(calc(var(--lean, 0deg) + 5deg)); }
.canti.mood-curious .c-mouth.oh { animation: canti-oh 1.6s ease-in-out infinite; }
.canti.mood-thinking .c-brow.left { transform: translateY(-10px) rotate(-8deg); }
.canti.mood-thinking .c-brow.right { transform: translateY(4px) rotate(6deg); }
.canti.mood-thinking .c-look { transform: translate(-7px, -9px); }
.canti.mood-thinking .c-body { animation-duration: 4.6s; }
.canti.mood-thinking .c-lean { transform: rotate(calc(var(--lean, 0deg) - 4deg)); }
.canti.mood-cheeky .c-brow.left { transform: translateY(-11px) rotate(-10deg); }
.canti.mood-cheeky .c-body { animation: canti-shimmy 2.4s ease-in-out infinite; }
.canti.mood-cheeky .c-eyes.wink { animation: canti-wink 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.canti.mood-happy .c-body { animation: canti-sway 1.5s ease-in-out infinite; }
.canti.mood-happy .c-note, .canti.mood-cheering .c-note { animation-duration: 1.3s; }
.canti.mood-cheering .c-body { animation: canti-hop .62s cubic-bezier(.3, 0, .4, 1) infinite; }
.canti.mood-cheering .c-shade { animation: canti-hop-shade .62s cubic-bezier(.3, 0, .4, 1) infinite; }
.canti.mood-cheering .c-scroll { animation-duration: .62s; }
.canti.mood-cheering .c-curl { animation-duration: .4s; }
.canti.mood-cheering .c-burst { animation: canti-burst 1.24s ease-out infinite; }
.canti.talking .c-mouth { animation: canti-talk .24s ease-in-out 7; }
.canti.talking .c-face { animation: canti-nod .48s ease-in-out 3; }
.canti.pop svg { animation: canti-pop .5s cubic-bezier(.2, 1.6, .4, 1); transform-origin: 50% 90%; }
.tour-box.moving .canti .c-lean { transform: rotate(calc(var(--lean, 0deg) + var(--fly, 8deg))); transition-duration: .2s; }
.tour-box.moving .canti .c-curl { animation-duration: .3s; }
/* the fan: to the beat of the music, bigger the better it goes */
.canti.groove .c-body, .canti.groove.mood-happy .c-body, .canti.groove.mood-cheering .c-body, .canti.groove.mood-curious .c-body, .canti.groove.mood-cheeky .c-body { animation: canti-groove calc(var(--beat, .6s) * 2) cubic-bezier(.3, 0, .5, 1) infinite; }
.canti.groove .c-shade { animation: canti-groove-shade var(--beat, .6s) ease-in-out infinite; }
.canti.groove .c-scroll { animation-duration: var(--beat, .6s); }
.canti.groove .c-curl { animation-duration: calc(var(--beat, .6s) / 2); }
.canti.groove .c-note { animation-duration: calc(var(--beat, .6s) * 2); }
.canti.groove { --amp: 1; }
.canti.groove.fan-hit { --amp: 1.9; }
.canti.groove.fan-wow { --amp: 2.8; }
.canti.fan-hit .c-note { animation-duration: var(--beat, .6s); }
.canti.fan-wow .c-burst { animation: canti-burst var(--beat, .6s) ease-out infinite; }
.canti.fan-wow svg { animation: canti-swell .5s ease-out forwards; transform-origin: 50% 90%; }
.canti.fan-wow .c-face > g:first-child { opacity: .75; }
@keyframes canti-groove {
  0%, 50%, 100% { transform: translateY(0) rotate(0) scale(1.04, .95); }
  25% { transform: translateY(calc(var(--amp, 1) * -11px)) rotate(calc(var(--amp, 1) * -2.2deg)) scale(.98, 1.04); }
  75% { transform: translateY(calc(var(--amp, 1) * -11px)) rotate(calc(var(--amp, 1) * 2.2deg)) scale(.98, 1.04); }
}
@keyframes canti-groove-shade { 0%, 100% { transform: scaleX(1.04); opacity: .2; } 50% { transform: scaleX(.86); opacity: .09; } }
@keyframes canti-swell { to { transform: scale(1.12); } }
@keyframes canti-bob { 0%, 100% { transform: translateY(0) rotate(-1.4deg); } 50% { transform: translateY(-14px) rotate(1.4deg) scale(1.01, 1.02); } }
@keyframes canti-sway { 0%, 100% { transform: translate(-7px, -4px) rotate(-4deg); } 50% { transform: translate(7px, -10px) rotate(4deg); } }
@keyframes canti-shimmy { 0%, 55%, 100% { transform: translateY(0) rotate(0); } 62% { transform: translateY(-8px) rotate(-5deg); } 70% { transform: translateY(-4px) rotate(5deg); } 78% { transform: translateY(-8px) rotate(-4deg); } 86% { transform: translateY(-2px) rotate(3deg); } 25% { transform: translateY(-11px) rotate(1deg); } }
@keyframes canti-hop { 0%, 100% { transform: translateY(0) scale(1.06, .9); } 35% { transform: translateY(-34px) scale(.95, 1.08) rotate(-3deg); } 60% { transform: translateY(-30px) scale(.97, 1.05) rotate(3deg); } 88% { transform: translateY(0) scale(1.04, .93); } }
@keyframes canti-hop-shade { 0%, 100% { transform: scaleX(1.05); opacity: .2; } 45% { transform: scaleX(.7); opacity: .07; } }
@keyframes canti-shade { 0%, 100% { transform: scaleX(1); opacity: .16; } 50% { transform: scaleX(.9); opacity: .1; } }
@keyframes canti-scroll { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(3deg); } }
@keyframes canti-curl { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(8deg); } }
@keyframes canti-pegs { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-7deg); } 90% { transform: rotate(6deg); } 94% { transform: rotate(-3deg); } }
@keyframes canti-note { 0%, 100% { transform: translate(0, 0) rotate(-6deg); opacity: .85; } 50% { transform: translate(4px, -17px) rotate(9deg); opacity: 1; } }
@keyframes canti-blink { 0%, 40%, 44%, 48%, 52%, 100% { transform: scaleY(1); } 42%, 50% { transform: scaleY(.08); } }
@keyframes canti-wink { 0%, 60%, 100% { transform: scaleY(1); } 70% { transform: scaleY(.85) translateY(2px); } }
@keyframes canti-glint { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(1.5px, 1px); } }
@keyframes canti-oh { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18, 1.25); } }
@keyframes canti-talk { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.9, .5); } 65% { transform: scale(1.08, 1.15); } }
@keyframes canti-nod { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes canti-pop { 0% { transform: scale(.55) rotate(-10deg); } 70% { transform: scale(1.08) rotate(3deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes canti-burst { 0% { opacity: 0; transform: scale(.3) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5) rotate(40deg); } }
@media (prefers-reduced-motion: reduce) { .canti *, .canti svg { animation: none !important; } }

.tour { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; overflow: visible; pointer-events: none; z-index: 60; color: var(--text); }
.tour[hidden] { display: none; }
.tour-ring { position: fixed; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 3px var(--gold), 0 0 0 9px color-mix(in srgb, var(--gold) 35%, transparent), 0 0 0 200vmax rgba(8, 30, 34, .34); transition: left .25s, top .25s, width .25s, height .25s; animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 0 15px color-mix(in srgb, var(--gold) 12%, transparent), 0 0 0 200vmax rgba(8, 30, 34, .34); } }
.tour-box { position: fixed; left: 0; top: 0; display: flex; align-items: flex-end; gap: 4px; width: min(430px, calc(100vw - 20px)); pointer-events: auto; transition: transform .35s cubic-bezier(.2, .9, .3, 1.15); }
.tour-box .canti { width: 112px; margin-bottom: -6px; filter: drop-shadow(0 6px 10px rgba(8, 30, 34, .25)); }
.tour-bubble { position: relative; flex: 1; min-width: 0; padding: 14px 16px 12px; border-radius: 18px; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 14px 34px -12px rgba(8, 30, 34, .5); }
.tour-bubble::before { content: ""; position: absolute; left: -10px; bottom: 26px; width: 16px; height: 16px; background: var(--surface); border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
.tour-say { margin: 0 18px 0 0; font-size: .95rem; line-height: 1.45; font-weight: 600; }
.tour-x { position: absolute; right: 6px; top: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.15rem; line-height: 1; }
.tour-x:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }
.tour-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.tour-choices:empty { display: none; }
.tour-choices .primary { padding: 7px 16px; border-radius: 999px; }
.chip.pick { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip.pick:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chip.pick small { font-weight: 400; color: var(--muted); margin-left: 4px; }

.tour-offer { display: flex; align-items: center; gap: 8px 18px; margin: 0 0 22px; padding: 14px 20px 14px 10px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--mint) 55%, var(--surface)), var(--surface) 60%); }
.tour-offer-figure .canti { width: 132px; }
.tour-offer-body { display: grid; gap: 8px; min-width: 0; }
.tour-offer-body p { font-weight: 700; font-size: 1.02rem; }
.tour-offer-list, .tour-offer-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tour-offer-foot .linkbtn { font-size: .82rem; color: var(--muted); }
@media (max-width: 560px) { .tour-offer { flex-direction: column; align-items: flex-start; } .tour-offer-figure .canti { width: 104px; } .tour-box .canti { width: 78px; } }
.tour-pick { display: flex; align-items: center; gap: 10px; }
.tour-pick-figure .canti { width: 96px; }
.tour-pick select { flex: 1; min-width: 0; }
.edit-tutorial { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.edit-tutorial select { width: auto; }
.tour-box.leaving { transform-origin: 0 0; transition: transform .75s cubic-bezier(.5, -0.2, .8, .6), opacity .75s ease-in; opacity: .2; pointer-events: none; }
#meBtn.tour-landed { animation: tour-landed .9s ease-out; }
@keyframes tour-landed { 0% { box-shadow: 0 0 0 0 var(--gold); transform: scale(1); } 30% { transform: scale(1.12); } 100% { box-shadow: 0 0 0 16px transparent; transform: scale(1); } }
.tour-box.parked .tour-x { display: none; }
.tour-box.parked { width: min(360px, calc(100vw - 20px)); }

/* the arrow of every list, after the rules that give single lists their size and colour */
select:not([multiple]) {
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select:not([multiple]):hover, select:not([multiple]):focus-visible {
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
}

/* ---------- about ---------- */
.about-line { margin: 34px 0 6px; text-align: center; }
.about-link { font-size: .82rem; color: var(--muted); }
.gate-card .about-link { display: block; margin: 16px auto 0; }
dialog.about { width: min(92vw, 480px); }
dialog.about h2 { margin: 0 0 6px; }
dialog.about p { margin: 0 0 12px; line-height: 1.5; }
dialog.about p.muted { font-size: .82rem; }
.about-who { display: grid; place-items: center; margin: 2px 0 10px; }
.about-who .canti { width: 150px; }
