/* NEXT EVOLUTION (C-144 … ) — styles of the elements this mission adds in BOTH interface modes: the region lane (split / move /
   trim / duplicate regions), editor playheads, arranged-region marks in the map, device views, recording controls and the Create
   head. Own classes only, tokens from tokens.css; app.css / tokens.css stay byte-identical (the Classic pin, C-106). */

/* ---- region lane: the selected part's regions across the song */
.region-lane { display: grid; gap: 6px; margin-bottom: var(--s-3); outline: none; }
.region-lane:focus-visible { box-shadow: var(--ring); border-radius: var(--radius); }
.rl-tools { gap: 4px; flex-wrap: wrap; align-items: center; }
.rl-zoom { margin-left: auto; display: inline-flex; gap: 2px; }
.rl-scroll { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--inset); }
.rl-track { position: relative; min-width: 100%; }
.rl-ruler { position: relative; height: 18px; border-bottom: 1px solid var(--line); }
.rl-sec { position: absolute; top: 0; height: 100%; padding: 2px 4px; border-left: 1px solid var(--line-2); color: var(--muted); font: var(--t-2xs) var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-lane { position: relative; height: 46px; touch-action: pan-x; }
.rl-region { position: absolute; top: 4px; bottom: 4px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: var(--radius-s); background: color-mix(in srgb, var(--c) 14%, var(--panel)); cursor: grab; overflow: hidden; box-sizing: border-box; }
.rl-region::before, .rl-region::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.rl-region::before { left: 0; } .rl-region::after { right: 0; }
.rl-region.arranged { border-style: solid; background: color-mix(in srgb, var(--c) 24%, var(--panel)); }
.rl-region.arranged .rl-name { color: var(--text); }
.rl-region.sel { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }
.rl-region.locked { border-style: dashed; border-width: 1.5px; }
.rl-region.muted { opacity: .45; }
.rl-region.copying { outline: 1px dashed var(--cyan); }
.rl-marks { position: absolute; inset: 2px 2px 14px; width: calc(100% - 4px); height: calc(100% - 16px); pointer-events: none; }
.rl-marks rect { fill: var(--c); opacity: .85; }
.rl-name { position: absolute; left: 4px; bottom: 1px; font: var(--t-2xs) var(--sans); color: var(--muted); white-space: nowrap; pointer-events: none; }
.rl-playhead, .rl-cursor { position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none; }
.rl-playhead { border-left: 2px solid var(--cyan); }
.rl-cursor { border-left: 1px dashed var(--text-2); opacity: .7; }
.rl-info { margin: 0; color: var(--text-2); }

/* ---- arranged material in the section × part map (exact regions the user shaped) */
.rp .edge { stroke: var(--text-2); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-dasharray: 2 2; }
.srm-cell.arranged::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--text-2); pointer-events: none; }

/* ---- editor playheads (note / drum editor): the transport position inside the region */
.ed-playhead { stroke: var(--cyan); stroke-width: 2; pointer-events: none; }
.ne-note.playing, .de-hit.playing { stroke: var(--cyan); stroke-width: 1.5; }

/* ---- device views: what the DSP does, beside the knobs (filter response, envelopes, the 303 sweep) */
.device-view { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 4px 0 var(--s-3); }
.dv-panel { margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--inset); flex: 1 1 260px; min-width: 0; }
.dv-panel.dv-filter { flex: 2 1 360px; }
.dv-svg { display: block; width: 100%; height: auto; touch-action: none; }
.dv-grid { stroke: var(--line); stroke-width: 1; }
.dv-grid.major { stroke: var(--line-2); }
.dv-tick { fill: var(--faint); font: 9px var(--mono); }
.dv-curve { fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dv-curve.peak { stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .7; }
.dv-node { fill: var(--panel); stroke: var(--cyan); stroke-width: 2; cursor: grab; }
.dv-node:hover, .dv-node:focus { fill: var(--cyan); outline: none; }
.dv-cap { margin: 4px 2px 0; color: var(--text-2); }

/* ---- sampler piece waveform: the real sample, its played region */
.sample-wave { grid-column: 1 / -1; display: grid; gap: 2px; margin: 4px 0 8px; }
.sw-svg { display: block; width: 100%; height: 64px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--inset); touch-action: none; }
.sw-wave { fill: var(--teal); opacity: .8; }
.sw-out { fill: var(--bg); opacity: .62; }
.sw-mark { fill: var(--cyan); cursor: ew-resize; }

/* ---- automation lane editor: a saved lane over the song, correctable point by point */
.al-list li { display: block; }
.al-head { gap: 6px; align-items: baseline; }
.al { margin: 4px 0 10px; outline: none; }
.al:focus-visible .al-svg { box-shadow: var(--ring); }
.al-svg { display: block; width: 100%; height: 70px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--inset); }
.al-svg.editable { cursor: crosshair; touch-action: none; }
.al-sec { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.al-curve { fill: none; stroke: var(--amber); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.al-pt { fill: var(--panel); stroke: var(--amber); stroke-width: 1.4; vector-effect: non-scaling-stroke; cursor: grab; }
.al-pt.sel { fill: var(--amber); }
.al-playhead { stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.al-info { display: block; margin-top: 2px; }

/* ---- record bar: arm automation / notes, options, status */
.record-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--s-2); padding: 4px var(--s-2); margin-bottom: var(--s-2); border: 1px solid var(--line); border-radius: var(--radius); }
.record-bar.armed { border-color: var(--rose); }
.rec-btn.armed { color: var(--rose); border-color: var(--rose); }
.rec-seg button { min-height: 26px; padding: 0 8px; font-size: var(--t-xs); }
.rec-check { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); cursor: pointer; }
.rec-status { color: var(--text-2); flex: 1 1 240px; min-width: 0; }
.rec-status.live { color: var(--rose); }

/* ---- Create head: HOW HTC creates (way + Music Model), stated together above the idea (C-148) */
.create-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-3) var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.create-head .create-mode { display: grid; gap: 4px; justify-items: start; margin-bottom: 0; }
.create-head .model-label { min-height: 18px; font: 600 var(--t-2xs) var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.create-head .create-model { flex: 0 1 400px; min-width: 0; }
.create-head .model-field { display: grid; gap: 4px; }
.create-head .model-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.model-label { display: flex; align-items: center; gap: 8px; }
.channel-badge { padding: 1px 7px; border: 1px solid currentColor; border-radius: var(--radius-pill); font: 600 9.5px var(--mono); letter-spacing: .08em; }
.channel-badge[data-channel="stable"] { color: var(--green); }
.channel-badge[data-channel="experimental"] { color: var(--amber); }
.channel-badge[data-channel="previous"], .channel-badge[data-channel="historical"] { color: var(--muted); }
.model-why { color: var(--text-2); font-size: var(--t-xs); text-transform: none; letter-spacing: 0; }
.action-bar { grid-template-columns: auto minmax(0, 1fr); }

@media (max-width: 640px) {
  .action-bar { grid-template-columns: minmax(0, 1fr); }
  .create-head .create-model { flex-basis: 100%; }
  .rl-lane { height: 54px; }
  .record-bar .btn { min-height: var(--touch); }
  .rl-tools .btn { min-height: var(--touch); }
}

/* ---- Beta B1 (C-171): the visitor's free generations in Create — quiet and numeric; amber only when none are left */
.beta-credits { color: var(--text-2); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.beta-credits.out { color: var(--amber); }
.beta-quota { margin-top: 8px; }
