/* SPDX-License-Identifier: MIT
 * Copyright (c) 2026 Philip Bos
 * JAMTRACK companion: the jam editor, the library and the kit (app.css is ECHOFIELD's base) */
:root { --amber: #ffb040; --p0: #ff7850; --p1: #50aaff; --p2: #ffc45a; --p3: #be87ff; }
.brand .name { letter-spacing: .12em; }
.c4 { background: var(--amber); }

.transport .live { font-size: 14px; color: var(--muted); }
.transport .live.ext { color: var(--k2); }
.card.transport { display: grid; gap: 12px; }      /* (not app.css's flex .transport: its two rows stack) */
.card.transport > .row { gap: 8px; }
.gen { align-items: center; }
.gen label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.transport .live { margin-left: auto; }
.card.transport > .msg:empty { display: none; }
.gen select { align-self: stretch; }
label { display: inline-flex; gap: 6px; align-items: center; }
label.grow { flex: 1; } label.grow input { flex: 1; min-width: 120px; }
input, select { font: inherit; font-size: 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); padding: 6px 8px; }
input[type=number] { width: 80px; } input.seed { width: 64px; }
input[type=range] { padding: 0; accent-color: var(--amber); }

.parts { display: grid; gap: 16px; }
.part h2 { margin: 0; }
.part.playing { box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.chips { display: flex; gap: 6px; margin: 14px 0 10px; flex-wrap: wrap; }
.chip { flex: 1 1 60px; min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px;
  border-radius: 10px; background: var(--card); border: 2px solid var(--line); }
.chip b { font-size: 20px; } .chip small { color: var(--muted); font-size: 12px; }
.chip.sel { border-color: var(--ink); }
.chip.live { background: #3a2a10; border-color: var(--amber); color: #fff; } .chip.live small { color: var(--amber); }
.chip.add { flex: 0 0 48px; min-width: 48px; font-size: 22px; color: var(--muted); justify-content: center; }
.chord-ed { display: grid; gap: 10px; padding: 10px 12px; background: var(--card); border-radius: 10px; }
.nums { display: flex; gap: 4px; flex-wrap: wrap; }
.nums button { min-width: 44px; padding: 6px 8px; font-weight: 700; }
.nums button.acc { font-weight: 500; color: var(--muted); }
.nums button.on { background: var(--amber); color: #000; border-color: var(--amber); }
.textrow { margin-top: 10px; align-items: center; }
input.prog { flex: 1; min-width: 200px; }

.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.field > span { color: var(--muted); }
.field.chk { grid-template-columns: auto 1fr; }
.field output { min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.row .field { grid-template-columns: auto 1fr auto; }
.mixer { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.strip { background: var(--card); border-radius: 10px; padding: 10px; display: grid; gap: 6px; border-top: 3px solid var(--line); }
.strip .field { grid-template-columns: 54px 1fr 28px; }
.strip.p0 { border-color: var(--p0); } .strip.p1 { border-color: var(--p1); } .strip.p2 { border-color: var(--p2); } .strip.p3 { border-color: var(--p3); }
.strip button.mute { padding: 2px 10px; font-weight: 700; } .strip button.mute.on { background: var(--rec); color: #fff; border-color: var(--rec); }
.meter { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--k2); transition: width .2s; }

.slots { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.slots li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slots li.cur { outline: 2px solid var(--amber); }
.slots .name { flex: 1; font-weight: 600; min-width: 160px; }
.slots .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.slots .acts button, .slots .acts .btn { padding: 4px 10px; font-size: 13px; }
.slots li.drop { outline: 2px dashed var(--amber); }
.slots.kit li.ok .num { color: var(--k2); }
button.danger:hover { border-color: var(--rec); color: var(--rec); }

.guide table.cc { border-collapse: collapse; width: 100%; font-size: 14px; }
.guide .cc td, .guide .cc th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.guide .cc td:nth-child(odd) { font-weight: 700; white-space: nowrap; }
.guide li { margin: 4px 0; }
input.prog, .chip, .nums button, .chord-ed select { text-transform: none; }
input.prog { width: auto; }
.grid2 .card:has(> #mix) { grid-column: 1 / -1; }
.mixer { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.strip { min-width: 0; }
.strip .field { grid-template-columns: 52px minmax(0, 1fr) 30px; }
.strip .field input[type=range] { width: 100%; min-width: 0; }
#mix { min-width: 0; }
.mixer { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.strip { overflow: hidden; }
.strip .field { display: grid; grid-template-columns: 46px minmax(0, 1fr) 26px; gap: 6px; }
.strip { grid-template-columns: minmax(0, 1fr); } .strip > * { min-width: 0; }

.nums button { display: inline-flex; flex-direction: column; align-items: center; min-width: 64px; font-weight: 700; }
.nums button small { font-weight: 400; font-size: 11px; color: var(--muted); }
.nums button.on small { color: #000; }
.nums.small button { min-width: 52px; font-size: 13px; }
details.other summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.other .nums { margin-top: 8px; }
.chip { color: var(--ink); } .chip b { color: var(--ink); } .chip small { color: var(--muted); }
.chip.live b { color: #fff; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

/* MY LINE: the piano roll */
.grid2 .line-card { grid-column: 1 / -1; }
.line-card h3 .small { font-weight: 400; display: block; margin-top: 4px; }
.roll { display: grid; grid-template-columns: 52px repeat(16, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 8px;
  overflow: hidden; margin: 10px 0; user-select: none; touch-action: none; }
.roll > div { background: var(--card); height: 18px; position: relative; }
.roll .lab { font-size: 11px; color: var(--muted); padding: 1px 6px; display: flex; align-items: center; white-space: nowrap; }
.roll .lab.one { color: var(--amber); font-weight: 700; }
.roll .c { cursor: pointer; }
.roll .c.beat { box-shadow: inset 1px 0 0 rgba(255,255,255,.12); }
.roll .c.one { background: color-mix(in srgb, var(--card) 88%, var(--amber)); }
.roll .c.out { background: color-mix(in srgb, var(--card) 60%, #000); cursor: default; }
.roll .c.n { background: var(--p3); border-radius: 4px 0 0 4px; }
.roll .c.h { background: var(--p3); opacity: .75; }
.roll .c.v1 { filter: brightness(.65); } .roll .c.v2 { filter: brightness(1.15); } .roll .c.v3 { background: #fff; }
.roll .c.play { outline: 2px solid var(--amber); outline-offset: -2px; }
.roll .c.n.play, .roll .c.h.play { background: #fff; }
.roll .head { height: 14px; font-size: 10px; color: var(--muted); text-align: center; background: var(--card); }
.roll .head.play { background: var(--amber); color: #000; }
.line-tools { align-items: center; }
.line-card h3 .small { text-transform: none; letter-spacing: 0; }

/* the guide */
.guide { display: grid; gap: 16px; }
.guide .card { scroll-margin-top: 12px; }
.guide p, .guide li, .guide dd { line-height: 1.5; }
.guide p { margin: 0 0 10px; }
.guide a { color: var(--k1); }
.guide h3 { margin-top: 16px; }
.guide .cc th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.guide .g-wide td:nth-child(odd) { white-space: normal; font-weight: 400; }
.guide .g-wide td:first-child { font-weight: 700; }
.guide .g-wide td:first-child { width: 22%; min-width: 110px; }
.g-toc ol { columns: 3 220px; margin: 0; padding-left: 22px; }
.g-toc li { margin: 2px 0; break-inside: avoid; }
.g-toc a { text-decoration: none; }
.g-toc a:hover { text-decoration: underline; }
.g-split { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.g-split > :not(figure):not(.g-anno) { flex: 1 1 300px; min-width: 0; }
.g-steps { padding-left: 22px; margin: 0 0 10px; }
.g-steps li { margin: 6px 0; }
.shot { margin: 0; width: 240px; flex: none; }
.shot img { display: block; width: 240px; height: 240px; border-radius: 10px; background: #000; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.shot figcaption b { color: var(--ink); }
.g-gallery { display: grid; grid-template-columns: repeat(auto-fill, 240px); gap: 18px 20px; margin: 4px 0 14px; justify-content: start; }
.g-tip { background: var(--card); border-left: 3px solid var(--k2); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.g-anno { position: relative; width: 280px; height: 240px; flex: none; }
.g-anno img { display: block; border-radius: 10px; margin-left: 20px; }
.g-anno i { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--k4); color: #000; font: 700 11px/18px ui-sans-serif, sans-serif; text-align: center; font-style: normal; box-shadow: 0 0 0 2px #000; }
.g-callouts { padding-left: 22px; margin: 0; }
.g-callouts li { margin: 5px 0; }
.g-callouts li::marker { font-weight: 700; color: var(--k4); }
.g-lists { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 14px; }
.g-lists dt { font-weight: 700; }
.g-lists dd { margin: 0; color: var(--muted); }
.g-fm1 { width: 100%; max-width: 860px; height: auto; display: block; margin: 0 auto 8px; }
.g-fm1 .b-body { fill: #24252a; }
.g-fm1 .k-grey circle, .g-fm1 circle { fill: #141518; stroke: #3a3b42; stroke-width: 4; }
.g-fm1 circle.k1 { stroke: var(--k1); } .g-fm1 circle.k2 { stroke: var(--k2); }
.g-fm1 circle.k3 { stroke: var(--k3s); } .g-fm1 circle.k4 { stroke: var(--k4); }
.g-fm1 .b-screen { fill: #0d0d0f; }
.g-fm1 .b-keybed { fill: #1b1c20; }
.g-fm1 rect.b-page, .g-legend .b-page { fill: #1d2a3d; stroke: var(--k1); background: #1d2a3d; border-color: var(--k1); }
.g-fm1 rect.b-play, .g-legend .b-play { fill: #1b3326; stroke: var(--k2); background: #1b3326; border-color: var(--k2); }
.g-fm1 rect.b-act, .g-legend .b-act { fill: #3a2716; stroke: var(--k4); background: #3a2716; border-color: var(--k4); }
.g-fm1 rect { stroke-width: 2; }
.g-fm1 .w-keys rect { fill: #6a6b70; }
.g-fm1 .w-keys rect.c1, .g-legend .c1 { fill: #e0b04a; background: #e0b04a; }
.g-fm1 .b-keys rect { fill: #55565b; }
.g-fm1 text { font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif; text-anchor: middle; }
.g-fm1 .t-lab { fill: #b9bac0; font-size: 17px; font-weight: 700; letter-spacing: .04em; }
.g-fm1 .t-sub { fill: #8d8e96; font-size: 13px; }
.g-fm1 .t-btn { fill: #e8e8ea; font-size: 14px; font-weight: 700; }
.g-fm1 .t-key text { fill: #1b1c20; font-size: 15px; font-weight: 700; }
.g-fm1 .t-keynum text { fill: #fff; font-size: 15px; font-weight: 800; paint-order: stroke; stroke: var(--k4); stroke-width: 6px; }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin: 0 0 12px; justify-content: center; }
.g-legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border-width: 2px; border-style: solid; vertical-align: -2px; margin-right: 6px; }
.g-legend .sw.c1 { border-color: #e0b04a; }
.g-num { display: inline-block; background: var(--k4); color: #fff; border-radius: 6px; padding: 0 5px; font-weight: 700; font-size: 12px; }
@media (max-width: 640px) {
  .g-lists { grid-template-columns: 1fr; gap: 2px; }
  .g-lists dd { margin-bottom: 8px; }
  .guide .g-wide td:first-child { width: auto; min-width: 0; }
  .g-gallery { grid-template-columns: 240px; justify-content: center; }
  .g-split { justify-content: center; }
}
