/* Minnesinger Vamp Engine (vamp-engine.js): the chord grid, the player, the notes to play and the four-track recorder. */
.ve-main { max-width: 1500px; margin: 0 auto; padding: 18px 22px 70px; }
.ve-pagehead h1 { margin: 0 0 4px; font: 800 28px 'Outfit', var(--ui, system-ui); color: #1f2350; }
.ve-pagehead p { margin: 0 0 14px; max-width: 980px; color: #545a7d; line-height: 1.5; }
.ve { max-width: 1400px; color: #1f2350; }
.ve *, .ve *::before, .ve *::after { box-sizing: border-box; }
.ve-intro { max-width: 90ch; font-size: 16.5px; line-height: 1.5; }
.ve-sec { background: #fffdf8; border: 1px solid #ddd2bd; border-radius: 16px; padding: 6px 18px 16px; margin: 16px 0; }
.ve-h { margin: 12px 0 8px; font: 800 22px 'Outfit', var(--ui, system-ui); }
.ve-h3 { margin: 16px 0 6px; font: 800 17px var(--ui, system-ui); }
.ve-lead { max-width: 90ch; margin: 4px 0 10px; line-height: 1.5; }
.ve-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 8px 0; }
.ve-f { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.ve select, .ve input[type=text] { font: 600 16px var(--ui, system-ui); min-height: 44px; padding: 6px 10px; border: 2px solid #c9bfa8; border-radius: 10px; background: #fff; color: #1f2350; }
.ve button { min-height: 44px; font: 800 16px var(--ui, system-ui); border: 2px solid #c9bfa8; background: #fff; color: #1f2350; border-radius: 12px; padding: 6px 14px; cursor: pointer; }
.ve button.primary { background: #1f2350; border-color: #1f2350; color: #fff; }
.ve button.small { min-height: 40px; font-size: 14.5px; }
.ve button:disabled { opacity: .45; cursor: default; }
.ve button:focus-visible, .ve input:focus-visible, .ve select:focus-visible, .ve summary:focus-visible { outline: 3px solid #2f5bd3; outline-offset: 2px; }
.ve-quickl { display: block; font-weight: 700; margin: 10px 0 6px; }
.ve-quickl small { font-weight: 500; color: #545a7d; }
.ve-quick { display: block; width: 100%; max-width: 900px; margin-top: 4px; font-size: 18px !important; }
.ve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.ve-bar { background: #fff; border: 2px solid #c9bfa8; border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ve-bar.on { border-color: #2f5bd3; background: #eef3ff; box-shadow: 0 0 0 3px rgba(47, 91, 211, .25); }
.ve-bar.bad { border-color: #c0392b; background: #fdeeea; }
.ve-bar label { display: block; }
.ve-n { display: block; font-size: 12.5px; font-weight: 800; color: #6b6f8d; margin-bottom: 2px; }
.ve-in { width: 100%; font-size: 20px !important; font-weight: 800 !important; }
.ve-chn { margin-top: 6px; font-size: 13.5px; line-height: 1.35; min-height: 1.3em; }
.ve-chn span { display: block; }
.ve-chn small { color: #3a3d5c; font-size: 13px; }
.ve-chn i { color: #6b6f8d; font-style: normal; font-size: 12px; }
.ve-ok b { font-size: 15px; }
.ve-bad, .ve-msg.bad { color: #b0281a; font-weight: 700; }
.ve-rn { font: 800 15px var(--ui, system-ui); color: #2f5bd3; min-height: 1.2em; margin-top: 2px; }
.ve-msg { min-height: 1.4em; margin: 4px 0; }
.ve-tip { max-width: 100ch; margin: 4px 0 10px; color: #3a3d5c; }
.ve-starters { margin: 12px 0; }
.ve-sg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.ve-sgl { font-weight: 700; font-size: 14px; color: #545a7d; min-width: 100%; }
.ve-chip { min-height: 44px; }
.ve-note { display: block; color: #545a7d; max-width: 90ch; }
.ve-saved { color: #545a7d; font-size: 14px; }
/* section 2 */
.ve-seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.ve-inst { flex: 1 1 150px; min-height: 50px; }
.ve-inst[aria-pressed="true"] { background: #2f5bd3; color: #fff; border-color: #2f5bd3; }
.ve-chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-height: 44px; }
.ve-chk input { width: 24px; height: 24px; }
.ve-bpm { flex-wrap: wrap; }
.ve-bpm input[type=range] { width: 220px; max-width: 52vw; height: 34px; }
.ve-help { max-width: 90ch; color: #3a3d5c; margin: 6px 0; }
.ve-prow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 10px 0; }
.ve-play { min-height: 58px; min-width: 220px; font-size: 19px !important; }
.ve-play.on, .ve-playall.on { background: #c0392b !important; border-color: #c0392b !important; }
.ve-now { min-width: 200px; }
.ve-chord { font: 800 40px 'Outfit', var(--ui, system-ui); line-height: 1.1; min-height: 1.1em; }
.ve-where { color: #545a7d; font-size: 14.5px; min-height: 1.3em; }
.ve-dots { display: flex; gap: 8px; margin-top: 6px; }
.ve-dots i { width: 18px; height: 18px; border-radius: 9px; background: #ddd2bd; display: block; }
.ve-dots i.on { background: #2f5bd3; transform: scale(1.25); }
.ve-status, .ve-rstat { color: #3a3d5c; font-size: 14.5px; min-height: 1.4em; margin: 6px 0; }
/* section 3 */
.ve-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 10px 0; }
.ve-pcards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.ve-card { background: #fff; border: 2px solid #ddd2bd; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ve-card.on { border-color: #2f5bd3; background: #eef3ff; box-shadow: 0 0 0 3px rgba(47, 91, 211, .25); }
.ve-card .ve-cn { font: 800 22px 'Outfit', var(--ui, system-ui); }
.ve-card small { color: #2f5bd3; font-weight: 800; }
.ve-card p { margin: 3px 0; font-size: 14.5px; }
.ve-card code { font: 700 14px ui-monospace, Consolas, monospace; }
.ve-ctext { min-width: 0; }
.ve-dg { width: 150px; max-width: 100%; height: auto; }
.ve-kb { width: 100%; height: auto; display: block; }
.ve-fn { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 11px; background: #2f5bd3; color: #fff; font: 800 13px var(--ui, system-ui); }
.ve-fn.red { background: #c0392b; }
.ve-staffwrap { overflow-x: auto; background: #fff; border: 1px solid #ddd2bd; border-radius: 12px; padding: 6px; max-width: 100%; }
.ve-staff { width: 100%; height: auto; max-width: 900px; display: block; }
.ve-empty { color: #545a7d; }
.ve-patrow { display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); gap: 4px; max-width: 540px; margin: 8px 0; }
.ve-patrow div { background: #fff; border: 1px solid #ddd2bd; border-radius: 8px; text-align: center; padding: 4px 0; }
.ve-patrow div.hit { border-color: #2f5bd3; background: #eef3ff; }
.ve-patrow div.bass { border-color: #c0392b; background: #fdeeea; }
.ve-patrow small { display: block; color: #6b6f8d; font-weight: 700; }
.ve-patrow b { font: 800 22px var(--ui, system-ui); }
/* section 4 */
.ve-tracks { display: grid; gap: 12px; margin: 10px 0; }
.ve-track { background: #fff; border: 2px solid #ddd2bd; border-radius: 14px; padding: 10px 14px; }
.ve-track.has { border-color: #9aa8d8; }
.ve-track.recording { border-color: #c0392b; background: #fdeeea; }
.ve-th { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.ve-th b { font-size: 17px; }
.ve-th small { color: #545a7d; }
.ve-tst { margin-left: auto; font-weight: 800; color: #2f5bd3; }
.ve-tsrc { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; font-size: 14.5px; }
.ve-tsrc label { display: flex; gap: 8px; align-items: flex-start; }
.ve-tsrc input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.ve-tbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ve-b[data-act="rec"], .ve-stop { min-width: 150px; }
.ve-stop { background: #c0392b !important; border-color: #c0392b !important; color: #fff !important; }
.ve-tog[aria-pressed="true"] { background: #1f2350; color: #fff; border-color: #1f2350; }
.ve-tbtns [data-act="solo"][aria-pressed="true"] { background: #b8860b; border-color: #b8860b; }
.ve-vol { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.ve-vol input { width: 120px; max-width: 30vw; height: 30px; }
.ve-meter { height: 10px; background: #eee7d6; border-radius: 5px; margin-top: 8px; overflow: hidden; }
.ve-meter i { display: block; height: 100%; width: 0; background: #c0392b; transition: width .06s; }
.ve-wave { width: 100%; height: 46px; display: block; margin-top: 8px; background: #faf6ec; border-radius: 8px; }
.ve-track:not(.has) .ve-wave { opacity: .35; }
.ve-mixrow { margin-top: 14px; }
.ve-mixrow button { min-height: 52px; }
.ve-lat { margin: 12px 0 0; }
.ve-lat summary { cursor: pointer; font-weight: 800; padding: 8px 0; min-height: 44px; }
.ve-calbox { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
.ve-tap { min-height: 90px; min-width: 150px; font-size: 24px !important; }
/* phones */
@media (max-width: 640px) {
  .ve-main { padding: 12px 12px 60px; }
  .ve-sec { padding: 4px 12px 14px; border-radius: 12px; }
  .ve-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ve-play { width: 100%; }
  .ve-inst { flex: 1 1 45%; }
  .ve-tbtns .ve-b { flex: 1 1 28%; }
  .ve-tbtns .ve-vol { flex: 1 1 100%; }
  .ve-vol input { width: 100%; max-width: none; }
  .ve-b[data-act="rec"], .ve-stop { flex: 1 1 100% !important; }
  .ve-bpm input[type=range] { width: 100%; max-width: none; }
  .ve-mixrow button { flex: 1 1 100%; }
  .ve-chord { font-size: 34px; }
  .ve-pagehead h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .ve-dots i.on { transform: none; } .ve-meter i { transition: none; } }
