:root {
  --bg: #f4f1ea;
  --ink: #151515;
  --muted: #6b6760;
  --line: #cfc7b8;
  --panel: #fffaf0;
  --panel-strong: #fff3dc;
  --accent: #b4312c;
  --accent-2: #23636b;
  --accent-3: #d6a336;
  --dark: #1f2328;
  --shadow: 0 18px 48px rgba(31, 35, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(21, 21, 21, 0.03) 1px, transparent 1px), var(--bg);
  background-size: 28px 28px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(21, 21, 21, 0.1);
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(18px);
}

.topbar h1,
.section-heading h2,
.gear-card h3,
.panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  line-height: 0.95;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quicknav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quicknav a,
.filter {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  color: var(--dark);
  font-weight: 750;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

section {
  padding: clamp(36px, 7vw, 76px) clamp(16px, 4vw, 48px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: 760px;
  font-size: clamp(1.8rem, 3.4vw, 3.2rem);
  line-height: 0.98;
}

.section-heading.compact {
  display: block;
  margin-bottom: 16px;
}

.section-heading.compact h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.workbench {
  display: block;
}

.signal-flow {
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr) 52px minmax(150px, 1fr) 52px minmax(150px, 1fr)
    52px minmax(150px, 1fr) 52px minmax(150px, 1fr);
  align-items: stretch;
  gap: 10px;
}

.gear-card,
.panel,
.channel-strip,
.amp-rack,
.check-grid label {
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: rgba(255, 250, 240, 0.88);
  box-shadow: var(--shadow);
}

.gear-card {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 18px;
  border-radius: 8px;
}

.gear-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 6px solid var(--accent-2);
  pointer-events: none;
}

.card-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: white;
  font-weight: 850;
}

.gear-card h3 {
  margin-top: 12px;
  font-size: 1.2rem;
}

.gear-card p,
.amp-rack p,
.rule-list,
footer {
  color: var(--muted);
  line-height: 1.55;
}

.product-image {
  width: 100%;
  height: 142px;
  object-fit: contain;
  margin: 12px 0;
  filter: drop-shadow(0 14px 20px rgba(31, 35, 40, 0.18));
}

.gear-visual {
  min-height: 142px;
  margin: 12px 0;
}

.musician-visual {
  display: grid;
  place-items: center;
}

.musician-visual span {
  position: relative;
  width: 94px;
  height: 94px;
  border: 9px solid var(--accent-3);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 0 24px, var(--dark) 25px 30px, transparent 31px);
}

.musician-visual span::before,
.musician-visual span::after {
  content: "";
  position: absolute;
  background: var(--dark);
}

.musician-visual span::before {
  width: 84px;
  height: 13px;
  left: 66px;
  top: 38px;
  border-radius: 0 20px 20px 0;
}

.musician-visual span::after {
  width: 11px;
  height: 46px;
  right: -70px;
  top: 22px;
  border-radius: 99px;
  transform: rotate(-18deg);
}

.multicore-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-content: center;
  padding: 18px;
  border-radius: 8px;
  background: var(--dark);
}

.multicore-visual span {
  aspect-ratio: 1;
  border: 4px solid #e6d7b9;
  border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 0 3px #393f45;
}

.mixer-visual {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
  padding: 18px 12px;
  border-radius: 8px;
  background: #27313a;
}

.mixer-visual i {
  display: block;
  height: 112px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 22%, var(--accent) 0 7px, transparent 8px),
    radial-gradient(circle at 50% 45%, #75c7bd 0 7px, transparent 8px),
    radial-gradient(circle at 50% 68%, #f0d25d 0 7px, transparent 8px),
    linear-gradient(#e8e2d7, #f8f5ed);
}

.flow-line {
  align-self: center;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 18px, var(--dark) 18px 28px);
  box-shadow: 0 0 0 6px rgba(180, 49, 44, 0.08);
}

.plan-section {
  padding-top: 0;
}

.panel {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 8px;
}

.rule-list {
  display: grid;
  gap: 12px;
  padding-left: 20px;
}

.stage-board {
  margin-bottom: 18px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(21, 21, 21, 0.1);
  background: rgba(255, 250, 240, 0.82);
}

.stage-hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.stage-hint strong {
  color: var(--accent);
}

.stage-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--dark);
  font-weight: 750;
  cursor: pointer;
}

.tool-btn[aria-pressed="true"] {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: #fff;
}

.tool-btn.ghost {
  background: transparent;
}

.tool-btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.save-status {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-2);
  opacity: 0;
  transition: opacity 200ms ease;
}

.save-status.show {
  opacity: 1;
}

.stage-canvas {
  overflow-x: auto;
  padding: 8px;
  background:
    radial-gradient(circle at 50% 96%, rgba(35, 99, 107, 0.12), transparent 62%),
    var(--panel-strong);
}

.stage-canvas svg {
  display: block;
  width: 100%;
  height: auto;
}

.stage-canvas svg text {
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: inherit;
  -webkit-user-select: none;
  user-select: none;
}

.seat-arc {
  fill: none;
  stroke: #a9c9d2;
  stroke-width: 6;
  stroke-linecap: round;
  opacity: 0.6;
}

/* Kabel */
.cab-mic {
  stroke: #7faab2;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  opacity: 0.72;
}

.cab-xlr {
  stroke: #23636b;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  opacity: 0.78;
}

.cab-multi-bg {
  stroke: #20252a;
  stroke-width: 13;
  fill: none;
  stroke-linecap: round;
}

.cab-multi-fg {
  stroke: #d6a336;
  stroke-width: 4.5;
  stroke-dasharray: 2 13;
  fill: none;
  stroke-linecap: round;
}

.cab-power {
  stroke: #b4312c;
  stroke-width: 3.4;
  stroke-dasharray: 11 8;
  fill: none;
  stroke-linecap: round;
}

.cab-speaker {
  stroke: #e08a1e;
  stroke-width: 5.5;
  fill: none;
  stroke-linecap: round;
  opacity: 0.9;
}

.cab-send {
  stroke: #3a6ea5;
  stroke-width: 3.6;
  fill: none;
  stroke-linecap: round;
}

.cab-return {
  stroke: #2f8f6b;
  stroke-width: 3.6;
  fill: none;
  stroke-linecap: round;
}

.cab-main {
  stroke: #b4312c;
  stroke-width: 4.6;
  fill: none;
  stroke-linecap: round;
}

.cab-label rect {
  fill: #fffaf0;
  stroke: #b3aa9c;
  stroke-width: 1;
}

.cab-label text {
  fill: #20252a;
  font-size: 10.5px;
  font-weight: 850;
}

.cables-off .cables,
.cables-off .cab-mic {
  display: none;
}

/* Verschiebbare Bauteile */
.node {
  cursor: default;
}

.n-box {
  fill: #dde9ee;
  stroke: #9bb7c0;
  stroke-width: 1.5;
}

.n-label {
  fill: #16252b;
  font-size: 13px;
  font-weight: 800;
}

.n-label-sub {
  fill: #5a6b72;
  font-size: 11px;
  font-weight: 750;
}

.ch-chip circle {
  fill: #20252a;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.ch-chip text {
  fill: #ffffff;
  font-size: 12.5px;
  font-weight: 850;
}

.phantom-chip rect {
  fill: #b4312c;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.phantom-chip text {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.n-lpack {
  fill: #ecdcb3;
  stroke: #b8893a;
  stroke-width: 1.5;
}

.n-lplabel {
  fill: #6a4e16;
  font-size: 12px;
  font-weight: 850;
}

.n-dir {
  fill: #ece2f4;
  stroke: #6f4e9b;
  stroke-width: 2;
}

.n-dirlabel {
  fill: #3f2c5c;
  font-size: 16px;
  font-weight: 850;
}

.n-device {
  fill: #20252a;
  stroke: #0e1114;
  stroke-width: 1.5;
}

.rack-slot-svg {
  fill: #33414c;
  stroke: #161c21;
  stroke-width: 1;
}

.rack-slot-label {
  fill: #e4eaee;
  font-size: 11.5px;
  font-weight: 800;
}

.n-trommel {
  fill: #f0d6d2;
  stroke: #b4312c;
  stroke-width: 2;
}

.dev-title {
  fill: #ffffff;
  font-size: 17px;
  font-weight: 850;
}

.trommel-title {
  fill: #7c211d;
}

.dev-sub {
  fill: #ccd2d7;
  font-size: 11.5px;
  font-weight: 700;
}

.dev-sub2 {
  fill: #9c4b46;
  font-size: 11.5px;
  font-weight: 750;
}

.n-spk {
  fill: #e7d6ad;
  stroke: #bf9540;
  stroke-width: 2;
}

.spk-cone {
  fill: #2c2722;
  stroke: #a98a3f;
  stroke-width: 2;
}

.spk-dust {
  fill: #6b5a33;
}

.n-spklabel {
  fill: #4a3a16;
  font-size: 14px;
  font-weight: 850;
}

.zone-label {
  fill: #8a857c;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin: 0;
  padding: 14px 18px;
  list-style: none;
  border-top: 1px solid rgba(21, 21, 21, 0.1);
  background: rgba(255, 250, 240, 0.72);
}

.stage-legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--muted);
}

.swatch {
  display: inline-block;
  width: 30px;
  height: 15px;
  border-radius: 3px;
  flex: none;
}

.sw-instrument {
  background: #dde9ee;
  border: 1px solid #9bb7c0;
  border-top: 4px solid #23636b;
}

.sw-lpack {
  background: #ecdcb3;
  border: 1px solid #b8893a;
}

.sw-device {
  background: #20252a;
}

.sw-box {
  background: #e7d6ad;
  border: 1px solid #bf9540;
}

.sw-mic,
.sw-xlr,
.sw-multi,
.sw-power,
.sw-speaker,
.sw-send,
.sw-return,
.sw-main {
  height: 0;
  background: none;
  border-radius: 0;
}

.sw-mic {
  border-top: 3px solid #7faab2;
}

.sw-xlr {
  border-top: 3px solid #23636b;
}

.sw-multi {
  border-top: 7px solid #20252a;
}

.sw-power {
  border-top: 3px dashed #b4312c;
}

.sw-speaker {
  border-top: 5px solid #e08a1e;
}

.sw-send {
  border-top: 4px solid #3a6ea5;
}

.sw-return {
  border-top: 4px solid #2f8f6b;
}

.sw-main {
  border-top: 5px solid #b4312c;
}

.rules-panel .rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

.channel-section {
  background: rgba(255, 250, 240, 0.5);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter {
  cursor: pointer;
}

.filter.active,
.filter:hover {
  border-color: var(--dark);
  background: var(--dark);
  color: white;
}

.mixer-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(72px, 1fr));
  gap: 14px 8px;
  overflow-x: auto;
  padding: 14px 0 8px;
}

.channel-strip {
  position: relative;
  min-width: 72px;
  min-height: 255px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 6px;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background 160ms ease;
}

.phantom-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(31, 35, 40, 0.25);
}

.channel-strip.hidden {
  opacity: 0.24;
}

.channel-strip:hover {
  transform: translateY(-4px);
}

.channel-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-weight: 850;
}

.group-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-2);
}

.channel-strip[data-group="blech"] .group-dot {
  background: var(--accent-3);
}

.channel-strip[data-group="holz"] .group-dot {
  background: var(--accent-2);
}

.channel-strip[data-group="rhythmus"] .group-dot {
  background: var(--accent);
}

.channel-strip[data-group="mikro"] .group-dot {
  background: #6f4e9b;
}

.channel-strip[data-group="effekt"] .group-dot {
  background: #2f8f6b;
}

.fader {
  position: relative;
  width: 16px;
  min-height: 142px;
  justify-self: center;
  border-radius: 999px;
  background: linear-gradient(#d8d2c6, #f7f3ec);
  box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.16);
}

.fader::before,
.fader::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.fader::before {
  top: 18px;
  width: 34px;
  height: 16px;
  border-radius: 4px;
  background: #202328;
}

.fader::after {
  top: 66px;
  width: 30px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.channel-label {
  min-height: 58px;
  display: grid;
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
}

/* Rückseite des Mischpults – Anschlüsse zum Rack */
.rear-panel {
  margin-top: 24px;
  padding: 20px clamp(14px, 3vw, 26px);
  border-radius: 12px;
  border: 1px solid #0e151d;
  background: linear-gradient(180deg, #243142, #1a2330);
  box-shadow: var(--shadow);
}

.rear-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rear-badge {
  flex: none;
  padding: 7px 13px;
  border-radius: 6px;
  background: var(--accent-3);
  color: #1a2330;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rear-text {
  margin: 0;
  min-width: 240px;
  flex: 1;
  color: #c7d2dd;
  font-size: 0.9rem;
  line-height: 1.5;
}

.rear-text strong {
  color: #ffffff;
}

.rear-ports {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 12px;
}

.rear-port {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 9px;
  background: #2c3a49;
  border-left: 5px solid #6b7785;
}

.rear-port[data-type="send"] {
  border-left-color: #5a93cf;
}

.rear-port[data-type="return"] {
  border-left-color: #46c08f;
}

.rear-port[data-type="main"] {
  border-left-color: #e0584f;
}

.xlr-jack {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #4a5765;
  background:
    radial-gradient(circle at 50% 30%, #e9edf1 0 4.5px, transparent 5.5px),
    radial-gradient(circle at 31% 66%, #e9edf1 0 4.5px, transparent 5.5px),
    radial-gradient(circle at 69% 66%, #e9edf1 0 4.5px, transparent 5.5px),
    #11161c;
}

.port-body {
  display: grid;
  gap: 3px;
}

.port-tag {
  font-size: 1.05rem;
  font-weight: 850;
  color: #ffffff;
}

.port-flow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #93a2b2;
}

.rear-port[data-type="send"] .port-flow {
  color: #87b6e3;
}

.rear-port[data-type="return"] .port-flow {
  color: #6fd3a8;
}

.rear-port[data-type="main"] .port-flow {
  color: #f0938c;
}

.port-desc {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #b9c5d1;
}

.rack-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  margin-bottom: 18px;
}

.rack-unit {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #20252a;
}

.rack-slot {
  padding: 16px 12px;
  border-radius: 5px;
  background: #33414c;
  color: #e4eaee;
  font-weight: 800;
  text-align: center;
}

.rack-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.cable-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.cable-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.cab-tag {
  flex: none;
  min-width: 96px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
}

.tag-send {
  background: #3a6ea5;
}

.tag-return {
  background: #2f8f6b;
}

.tag-main {
  background: #b4312c;
}

.speaker-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(260px, 0.8fr) minmax(130px, 1fr);
  gap: clamp(16px, 4vw, 42px);
  align-items: center;
}

.speaker {
  position: relative;
  display: grid;
  min-height: 260px;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, #111 0 42px, #2f353b 43px 82px, transparent 83px),
    radial-gradient(circle at 50% 73%, #151515 0 28px, #383f46 29px 55px, transparent 56px),
    linear-gradient(140deg, #191d22, #3b444d);
  color: white;
  box-shadow: var(--shadow);
}

.speaker::before {
  content: "";
  position: absolute;
  top: 50%;
  width: min(22vw, 240px);
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--dark) 0 16px, var(--accent-3) 16px 25px);
}

.speaker-left::before {
  right: -42%;
}

.speaker-right::before {
  left: -42%;
}

.speaker span,
.rack-label {
  position: relative;
  z-index: 1;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  font-weight: 850;
}

.amp-rack {
  position: relative;
  z-index: 2;
  padding: 22px;
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}

.amp-face {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  border-radius: 8px;
  background: #252b31;
}

.amp-face span {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 2px solid #6e7881;
  border-radius: 50%;
  color: white;
  font-weight: 900;
}

.check-section {
  padding-top: 0;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
}

.check-grid input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent-2);
}

/* Hinweis auf horizontales Scrollen – nur mobil sichtbar */
.stage-scroll-hint {
  display: none;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(16px, 4vw, 48px);
  border-top: 1px solid rgba(21, 21, 21, 0.1);
}

@media (max-width: 1050px) {
  .signal-flow {
    grid-template-columns: 1fr;
  }

  .flow-line {
    width: 6px;
    height: 34px;
    justify-self: center;
  }

  .speaker-map,
  .rack-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .speaker::before {
    left: 50%;
    top: auto;
    bottom: -24px;
    width: 6px;
    height: 54px;
    transform: translateX(-50%);
  }

  .speaker-right::before {
    top: -24px;
    bottom: auto;
  }
}

@media (max-width: 740px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .quicknav {
    justify-content: flex-start;
  }

  .quicknav a,
  .filter {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .section-heading {
    display: block;
  }

  .rules-panel .rule-list {
    grid-template-columns: 1fr;
  }

  .mixer-board {
    grid-template-columns: repeat(24, minmax(74px, 74px));
  }
}

@media (max-width: 640px) {
  /* Legende als 2-spaltiges Raster */
  .stage-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
  }

  /* Sanftes Touch-Scrollen auf iOS */
  .stage-canvas {
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================================================
   Foto-Buttons & Modal
   ========================================================= */
.photo-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid rgba(21, 21, 21, 0.15);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--dark);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms, border-color 140ms;
}

.photo-btn:hover {
  border-color: var(--accent);
  background: var(--panel-strong);
}

.photo-modal {
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #0e1114;
  color: white;
  width: min(96vw, 1100px);
  max-height: 94svh;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.photo-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.photo-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 94svh;
}

.photo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.photo-modal-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #dce4ec;
}

.photo-modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #b0bec8;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 130ms;
}

.photo-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.photo-modal-viewer {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.photo-modal-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: calc(94svh - 100px);
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 72px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1;
  transition: background 130ms;
}

.photo-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.photo-nav-prev { left: 10px; }
.photo-nav-next { right: 10px; }

.photo-modal-counter {
  margin: 0;
  padding: 7px 0;
  text-align: center;
  font-size: 0.78rem;
  color: #677480;
  flex-shrink: 0;
}

/* Print-Liste der Kanalbelegung – am Bildschirm verborgen */
.print-channel-list,
.print-rear-list {
  display: none;
}

/* =========================================================
   Druck-Button
   ========================================================= */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(21, 21, 21, 0.15);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--dark);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
  white-space: nowrap;
}

.print-btn:hover {
  border-color: var(--dark);
  background: var(--panel-strong);
}

/* =========================================================
   Druckstyles
   ========================================================= */
@media print {
  /* Seitenränder & Grundlayout */
  @page {
    margin: 16mm 14mm;
    size: A4 portrait;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: white !important;
    color: #111 !important;
    font-size: 11pt;
  }

  /* Header flach – kein sticky, kein Blur */
  .topbar {
    position: static !important;
    background: white !important;
    backdrop-filter: none !important;
    border-bottom: 1.5pt solid #ccc !important;
    padding: 0 0 8pt !important;
    margin-bottom: 12pt;
  }

  .print-btn,
  .photo-btns,
  .filters,
  .photo-modal,
  .rear-panel {
    display: none !important;
  }

  /* Jede Top-Level-Section auf neuer Seite (nicht verschachtelte!) */
  main > section {
    break-before: page;
    padding: 0 !important;
    background: white !important;
  }

  main > section.plan-section {
    break-before: avoid;
  }

  /* Section-Heading kompakt & links */
  .section-heading {
    display: block !important;
    margin-bottom: 8pt !important;
    break-after: avoid;
  }

  .section-heading h2 {
    font-size: 16pt !important;
    line-height: 1.1 !important;
    margin: 2pt 0 0 !important;
  }

  .eyebrow {
    font-size: 7.5pt !important;
    margin-bottom: 2pt !important;
  }

  /* Lageplan – SVG auf volle Breite */
  .stage-board {
    box-shadow: none !important;
    border: 1pt solid #ccc !important;
  }

  .stage-canvas svg {
    width: 100% !important;
    height: auto !important;
  }

  .stage-legend {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    font-size: 8.5pt !important;
  }

  /* Kanalbelegung – Original-Board verbergen, Druck-Listen einblenden */
  .mixer-board {
    display: none !important;
  }

  .channel-section {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .print-channel-list {
    display: block !important;
    break-inside: avoid;
  }

  .print-rear-list {
    display: block !important;
    break-inside: avoid;
  }

  .pc-legend {
    display: flex;
    justify-content: space-between;
    gap: 10pt;
    margin-bottom: 3pt;
    font-size: 7.5pt;
    color: #444;
  }

  .pc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 6pt 10pt;
  }

  .pc-group {
    break-inside: avoid;
    border: 0.6pt solid #bbb;
    border-left: 3pt solid var(--g, #333);
    border-radius: 3pt;
    padding: 4pt 6pt 3pt;
  }

  .pc-group-title {
    margin: 0 0 3pt;
    font-size: 10pt;
    font-weight: 800;
    color: var(--g, #111);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 0.5pt solid #ddd;
    padding-bottom: 2pt;
  }

  .pc-count {
    font-size: 7pt;
    font-weight: 600;
    color: #777;
  }

  .pc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
  }

  .pc-table th {
    text-align: left;
    font-size: 7pt;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1.5pt 3pt;
    border-bottom: 0.4pt solid #ccc;
  }

  .pc-table td {
    padding: 1.5pt 3pt;
    border-bottom: 0.3pt solid #eee;
    vertical-align: middle;
    line-height: 1.15;
  }

  .pc-table tr:last-child td {
    border-bottom: none;
  }

  .pc-num {
    font-weight: 800;
    width: 14%;
    color: var(--g, #111);
  }

  .pc-name {
    font-weight: 600;
  }

  .pc-flag {
    width: 18%;
    font-weight: 700;
    color: #b4312c;
    text-align: right;
    font-size: 7.5pt;
  }

  /* Rückseite */
  .print-rear-list {
    margin-top: 8pt;
  }

  .pc-rear-title {
    margin: 0 0 3pt;
    font-size: 10pt;
    font-weight: 800;
  }

  .pc-rear-table th,
  .pc-rear-table td {
    font-size: 8.5pt;
    padding: 1.5pt 3pt;
  }

  /* Signalweg – Karten untereinander */
  .signal-flow {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8pt !important;
  }

  .flow-line {
    display: none !important;
  }

  .gear-card {
    min-height: 0 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  footer {
    display: none !important;
  }
}
