/* Show-Designer, Profi-Modus: Chase-Generator (Fenster wie das Effekt-Studio, eigene Teile mit cg-) */
.cg .cg-win { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.cg-ico { background: #2a2110; color: var(--accent); }
/* Kopfzeile: bricht erst um, wenn sie nicht in eine Zeile passt (EN ~1190 px, DE ~1265 px breit); eine zweite Zeile steht rechts */
.cg-head { flex-wrap: wrap; justify-content: flex-end; gap: 8px 10px; }
.cg-head .fxs-titles { min-width: 0; flex: 0 1 auto; }
.cg-head .fxs-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.cg-head .fxs-chip { min-height: 30px; padding: 0 10px; white-space: nowrap; }
.cg-head .btn { padding: 0 14px; white-space: nowrap; }
.cg-head .btn-primary { min-width: 0; }
.cg-actions { display: flex; gap: 10px; }
.cg-range { flex-wrap: nowrap; }
@media (max-width: 1500px) { .cg-head .fxs-sub { display: none; } }
.cg-start { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.cg-start .fxs-from { margin: 0 4px; }
.cg-nudge { width: 30px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 11px; }
.cg-nudge:hover { color: var(--text); border-color: #6a7183; }
.cg-head .cg-range { margin-left: 4px; }
.cg-top { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.cg-top i { width: 30px; height: 18px; border-radius: 999px; background: #2b303b; position: relative; transition: background .15s; }
.cg-top i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cfd5e2; transition: transform .15s; }
.cg-top[aria-checked="true"] i { background: var(--accent); }
.cg-top[aria-checked="true"] i::after { transform: translateX(12px); background: #1a1205; }
.cg-undo:disabled { opacity: .35; cursor: default; }

/* Körper: Plan links, Steuerung rechts, „Was passiert“ unten über die ganze Breite */
.cg-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); grid-template-rows: minmax(0, 1fr) minmax(170px, 27vh); min-height: 0; }
.cg-stage { position: relative; background: radial-gradient(120% 90% at 50% 100%, #10131a 0%, #050608 70%); border-right: 1px solid var(--line); min-height: 0; overflow: hidden; }
.cg-plan { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; display: block; }
.cg-pip { position: absolute; right: 12px; top: 12px; width: min(36%, 380px); aspect-ratio: 16 / 10; border-radius: 12px; border: 1px solid #343a48;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55); background: #050608; z-index: 2; }
/* schwebende Ebene über der 3D-Vorschau (die liegt fixiert über dem Fenster): Tausch-Knopf, Plan als kleines Bild, Hinweise */
.cg-float { position: fixed; inset: 0; z-index: 52; pointer-events: none; }
.cg-float[hidden] { display: none; }
.cg-float > * { position: fixed; pointer-events: auto; }
.cg-swap { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #3a4152; background: rgba(12, 14, 19, .85);
  color: #e7e9ee; cursor: pointer; font-size: 16px; line-height: 1; }
.cg-swap:hover { border-color: var(--accent); color: var(--accent); }
.cg-float .cg-plan { border-radius: 12px; border: 1px solid #343a48; background: #07080b; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.cg-stage.is-3d .cg-tools { display: none; }
.pro-stage.in-cg { z-index: 51; }
.pro-stage.in-cg.in-pip { border-radius: 12px; overflow: hidden; }
.pro-stage.in-cg.in-pip .stage-bar { display: none !important; }
.pro-stage.in-cg.in-pip .stage-wrap { height: 100%; }
.cg-tools { position: absolute; left: 14px; top: 12px; right: calc(min(36%, 380px) + 28px); display: grid; gap: 8px; z-index: 3; pointer-events: none; }
.cg-tools > * { pointer-events: auto; }
.cg-toolslab { display: grid; gap: 1px; max-width: 460px; }
.cg-toolslab b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--kc, var(--accent)); margin-right: 8px; }
.cg-toolslab b { font-size: 13px; }
.cg-toolslab span { font-size: 11.5px; color: var(--muted); }
.cg-selchips .fxs-chip { min-height: 30px; }
.cg-selchips .fxs-chip:not(.is-on) { background: rgba(23, 26, 33, .88); }
.cg-hint { transform: translate(-50%, 8px); pointer-events: none !important; background: rgba(12, 14, 19, .94); border: 1px solid #3a4152; border-radius: 10px;
  padding: 8px 14px; font-size: 12.5px; color: #e7e9ee; opacity: 0; transition: opacity .2s, transform .2s; z-index: 4; max-width: 60vw; text-align: center; }
.cg-hint.is-on { opacity: 1; transform: translate(-50%, 0); }

.cg-ctrl { overflow: auto; padding: 14px 16px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.cg-ctrl > * { min-width: 0; }
.cg-rezepte { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.cg-rcard .fxs-thumb { height: 60px; }
.cg-rcard.is-off { opacity: .45; cursor: not-allowed; }
.cg-layers { display: grid; gap: 6px; }
.cg-layer { --kc: var(--accent); display: grid; gap: 6px; padding: 9px 10px 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer;
  position: relative; transition: border-color .12s; }
.cg-layer:hover { border-color: #4a5163; }
.cg-layer.is-on { border-color: var(--kc); box-shadow: 0 0 0 1px var(--kc) inset; }
.cg-layer.is-muted { opacity: .55; }
.cg-layer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cg-ltop { display: flex; align-items: center; gap: 4px; }
.cg-lname { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.cg-lname i { width: 10px; height: 10px; border-radius: 3px; background: var(--kc); flex: none; align-self: center; }
.cg-lname b { font-size: 13px; color: var(--kc); white-space: nowrap; }
.cg-lname span { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-lbtn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.cg-lbtn:hover { border-color: var(--line); color: var(--text); background: #1d212a; }
.cg-lbtn.is-eye { font-size: 14px; }
.cg-lstrip { width: 100%; height: 22px; border-radius: 6px; display: block; background: #07080b; }
.cg-ltxt { margin: 0; font-size: 12px; color: #c3c8d3; line-height: 1.45; }
.cg-add { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cg-addbtn { --kc: var(--accent); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px dashed #3a4152;
  background: none; color: var(--text); cursor: pointer; font-weight: 600; font-size: 12.5px; }
.cg-addbtn i { width: 10px; height: 10px; border-radius: 3px; background: var(--kc); }
.cg-addbtn:hover:not(:disabled) { border-color: var(--kc); border-style: solid; }
.cg-addbtn:disabled { opacity: .4; cursor: not-allowed; }
.cg-set { --kc: var(--accent); border-top: 1px solid var(--line); padding-top: 14px; }
.cg-set h3 { color: var(--text); }
.cg-set h3::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--kc); margin-right: 8px; }
.cg-fxcards { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.cg-fxcards .fxs-thumb { height: 52px; }
.cg-link { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px 0 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.cg-link i { width: 30px; height: 18px; border-radius: 999px; background: #2b303b; position: relative; }
.cg-link i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cfd5e2; transition: transform .15s; }
.cg-link.is-on i { background: var(--kc); }
.cg-link.is-on i::after { transform: translateX(12px); background: #14100a; }
.cg-wege { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.cg-weg { display: grid; justify-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: #cfd5e2;
  cursor: pointer; font-size: 11.5px; font-weight: 600; min-height: 56px; }
.cg-weg svg { width: 24px; height: 24px; }
.cg-weg:hover { border-color: #6a7183; color: var(--text); }
.cg-weg.is-on { border-color: var(--kc); color: var(--text); box-shadow: 0 0 0 1px var(--kc) inset; background: color-mix(in srgb, var(--kc) 12%, var(--panel-2)); }
.cg-weg.is-on svg { color: var(--kc); }
.cg-drawhint { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.cg-rhythm .fxs-lbl:first-child { margin-top: 14px; }
.cg-fit { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.cg-fit > span { margin-right: 4px; }
.cg-fit .fxs-chip { min-height: 30px; }
.cg-tempo { margin: 8px 0 0; font-size: 12px; color: #c3c8d3; font-variant-numeric: tabular-nums; }
.cg-params { display: grid; gap: 12px; }
.cg-param { display: grid; gap: 6px; }
.cg-plab { font-size: 12px; font-weight: 600; color: #cfd5e2; }
.cg-slider { grid-template-columns: 1fr 64px; }
.cg-slider b { font-size: 12px; text-align: right; }
.cg-cols { align-items: center; }
.cg-colhint { font-size: 11px; color: var(--muted); margin-left: 4px; }

/* Unten: Klartext + Partitur */
.cg-score { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(280px, 34%) minmax(0, 1fr); border-top: 1px solid var(--line); background: #0d0f14; min-height: 0; }
.cg-what { padding: 12px 16px; overflow: auto; display: grid; gap: 6px; align-content: start; border-right: 1px solid var(--line); }
.cg-what h3 { margin: 0 0 2px; font-size: 14.5px; }
.cg-wline { --kc: var(--accent); margin: 0; display: grid; grid-template-columns: 10px 1fr; gap: 8px; font-size: 12.5px; line-height: 1.45; color: #d5d9e2; cursor: pointer; border-radius: 6px; padding: 2px 4px; }
.cg-wline i { width: 10px; height: 10px; border-radius: 3px; background: var(--kc); margin-top: 4px; }
.cg-wline.is-cur { background: color-mix(in srgb, var(--kc) 10%, transparent); }
.cg-wline:hover { background: #171a21; }
.cg-warn { margin: 4px 0 0; padding: 7px 10px; border-radius: 8px; background: #2a1f0e; border: 1px solid #5a4415; color: #ffd27a; font-size: 12px; line-height: 1.4; }
.cg-wmeta { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.cg-scorebox { position: relative; min-height: 0; }
.cg-scorecv { position: absolute; inset: 6px 8px 6px 4px; width: calc(100% - 12px); height: calc(100% - 12px); display: block; }

@media (max-width: 1100px) {
  .cg-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48vh auto auto; overflow: auto; }
  .cg-ctrl { overflow: visible; }
  .cg-score { grid-template-columns: 1fr; grid-template-rows: auto 200px; }
  .cg-what { border-right: 0; border-bottom: 1px solid var(--line); }
  .cg-start { margin-left: 0; }
  .cg-head { justify-content: flex-start; }
  .cg-range { flex-wrap: wrap; }
  .cg-actions { margin-left: auto; }
}
@media (max-width: 700px) {
  .cg-pip { width: 44%; }
  .cg-tools { right: calc(44% + 24px); }
  .cg-head .fxs-titles { min-width: 0; }
}

/* Einstiege */
.btn-chase { min-height: 30px; padding: 0 12px; border-color: #5a4415; background: #2a2110; color: var(--accent); font-weight: 650; }
.btn-chase:hover { background: var(--accent); color: #1a1205; }
.pg-chase { grid-column: 3; grid-row: 2; justify-self: end; font-size: 11.5px; font-weight: 650; color: var(--accent); padding: 3px 9px; border-radius: 999px;
  border: 1px solid #5a4415; background: #2a2110; cursor: pointer; }
.pg-chase:hover { background: var(--accent); color: #1a1205; }
.cg-rhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cg-rhead h3 { margin: 0 auto 0 0; }
.cg-rhead .fxs-chip { min-height: 30px; }
.cg-rcard.is-own { border-style: dashed; }
.cg-ownbadge { position: absolute; top: 9px; left: 10px; font-size: 12px; color: #ff6b8b; text-shadow: 0 1px 3px #000; }
.cg-ownx { position: absolute; top: 6px; right: 7px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--muted);
  background: rgba(10, 11, 15, .8); font-size: 14px; }
.cg-ownx:hover { color: #ff8a8a; background: #3a1b1b; }
