:root {
  /* Eine Stufe heller als v1 — bleibt dunkel/edel, wirkt aber weniger schwarz.
     Karten liegen bewusst etwas heller als der Seitenhintergrund (mehr Abhebung). */
  --bg: #121219;
  --panel: #1E1F29;
  --panel-2: #24252F;
  --elev: #2C2E39;
  --border: #34363F;
  --border-2: #42444F;
  --text: #EEEEF3;
  --muted: #A3A4B0;
  --muted-2: #8E8F9B; /* hell genug für 4.5:1 (WCAG AA) auch bei kleinem Text auf Panels */
  --accent: #7C6FE0;
  --accent-2: #9384EE;
  --accent-dim: rgba(124, 111, 224, 0.14);
  --ok: #4FBF9A;
  --amber: #E0B15E;
  --wave: #454754;
  --wave-progress: #8B7FE8;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 16px 40px -22px rgba(0, 0, 0, 0.7);
  /* Weiche Elevation für Karten/Panels — hebt sie vom Hintergrund ab, ohne schwer zu wirken */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  /* Platz für die Scrollleiste immer reservieren -> Seiten mit/ohne Scrollbar
     "hüpfen" nicht mehr seitlich, weil sich die Inhaltsbreite nicht ändert.
     scrollbar-gutter für moderne Browser, overflow-y:scroll als robuste Basis
     (auf macOS/Overlay-Scrollbars ohnehin unsichtbar, kein hässlicher Dauer-Track). */
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 50% -25%, rgba(124, 111, 224, 0.12), rgba(124, 111, 224, 0) 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Helle Schrift auf dunklem Grund wirkt optisch dünner (Irradiation) — Grundgewicht
     deshalb leicht angehoben (Variable Font erlaubt Zwischenwerte). */
  font-weight: 480;
  /* Manrope hat keine echten Kursiven/Fettschnitte außerhalb 400-800: dem Browser das
     unscharfe synthetische Verzerren verbieten. */
  font-synthesis: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { cursor: pointer; font: inherit; border: none; }

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }

/* ---------- Login ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  width: 100%;
  max-width: 372px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card .brand { justify-content: center; margin-bottom: 22px; }
.login-card h1 { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.login-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.login-card label {
  display: block; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 8px;
}
.login-card input {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 16px;
  padding: 12px 14px; margin-bottom: 18px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-card input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 111, 224, 0.22);
}
.login-card button {
  width: 100%; background: var(--accent); color: #14121F;
  font-weight: 800; font-size: 15px; padding: 12px; border-radius: var(--radius-sm);
  transition: transform 0.08s, background 0.15s;
}
.login-card button:hover { background: var(--accent-2); }
.login-card button:active { transform: scale(0.985); }
.login-card .foot { color: var(--muted-2); font-size: 12px; margin: 20px 0 0; }
.alert {
  background: rgba(224, 90, 90, 0.1); border: 1px solid rgba(224, 90, 90, 0.35);
  color: #EDA1A1; font-size: 13px; font-weight: 600;
  padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 16px;
}

/* ---------- Topbar (nur Marke) ---------- */
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(20, 21, 28, 0.7); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; padding: 13px 24px;
}
.topbar .brand-logo { height: 42px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Sub-Bar (Kontext + eine Primäraktion) ---------- */
.subbar {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px 0;
}
.subbar-title { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.subbar-title .proj { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subbar-title .sub-meta { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; color: var(--muted-2); text-transform: uppercase; }
.crumb { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-strong { font-weight: 800; color: var(--text); }
.crumb-dim { color: var(--muted-2); font-weight: 600; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border-2); color: var(--muted);
  font-size: 13px; font-weight: 700; padding: 8px 15px; border-radius: 999px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: var(--elev); color: var(--text); }
.btn-primary {
  background: var(--accent); color: #14121F;
  font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 0.15s, transform 0.08s;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: scale(0.98); }

/* ---------- Content ---------- */
.content { max-width: 1040px; margin: 0 auto; padding: 22px 24px 60px; }

/* ---------- Phase ---------- */
.phase {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 20px 18px; margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}
.phase-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.phase-badge {
  background: var(--accent-dim); color: var(--accent-2);
  font-weight: 800; font-size: 12.5px; letter-spacing: 0.3px;
  padding: 5px 12px; border-radius: 7px; border: 1px solid rgba(124, 111, 224, 0.25);
}
.phase-label { color: var(--muted); font-size: 14px; font-weight: 600; }
.phase-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.status { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.status.ok { color: var(--ok); background: rgba(79, 191, 154, 0.1); border: 1px solid rgba(79, 191, 154, 0.3); }

/* ---------- Datei-Zeilen (Master, Admin-Listen) ---------- */
.item-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.item-meta { color: var(--muted-2); font-size: 12px; font-weight: 650; white-space: nowrap; }

/* Kommentar-Marker auf der Waveform — Mini-Avatar mit Initialen (SoundCloud-Stil) */
.marker {
  position: absolute; top: -11px; width: 22px; height: 22px; margin-left: -11px;
  cursor: pointer; z-index: 1;
}
.marker-av {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  /* Heller Chip, klar abgesetzt von der violetten Waveform (hell auf dunkel) */
  background: #E9E6F7; color: #241E4E; border: 2px solid var(--panel);
  font-size: 9px; font-weight: 800; letter-spacing: -0.3px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.marker:hover, .marker.marker-active { z-index: 6; }
.marker:hover .marker-av,
.marker.marker-active .marker-av,
.marker:focus-visible .marker-av {
  transform: scale(1.22); box-shadow: 0 0 0 3px rgba(124, 111, 224, 0.32);
}
.marker:focus-visible { outline: none; }
/* Hover-Sprechblase über der Waveform (per JS positioniert + am Rand geklammert) */
.marker-pop {
  position: absolute; bottom: calc(100% + 11px); left: 0;
  width: max-content; max-width: 260px;
  background: var(--elev); border: 1px solid var(--border-2); border-radius: 11px;
  padding: 8px 11px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 20;
}
.marker-pop.show { opacity: 1; }
.mp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.mp-name { font-size: 12.5px; font-weight: 800; color: var(--text); }
.mp-time { font-size: 11px; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.mp-text { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: block; word-wrap: break-word; }

/* waveform (audio) */
.wavewrap { position: relative; margin: 6px 14px 2px; }
.waveform { width: 100%; }
.wave-markers { position: absolute; inset: 0; pointer-events: none; }
.wave-markers .marker { pointer-events: auto; }
.wave-markers .marker-pop { pointer-events: none; }

/* comment composer + list */
.commenting { padding: 10px 14px 14px; }
.compose { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.compose .at {
  background: var(--accent-dim); color: var(--accent-2);
  font-weight: 800; font-size: 12px; padding: 6px 9px; border-radius: 7px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.15s, color 0.15s;
}
.compose .at i { font-size: 10px; }
/* Zeitanker "eingefroren" (während des Tippens): deutlich als gesetzte Marke erkennbar */
.compose .at.at-frozen { background: var(--accent); color: #14121F; cursor: pointer; }
.compose input[type=text] {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 14px; padding: 9px 12px;
}
.compose input[type=text]:focus { outline: none; border-color: var(--accent); }
.compose button {
  background: var(--elev); border: 1px solid var(--border-2); color: var(--text);
  font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.compose button:hover { background: var(--accent); color: #14121F; }
.comments { display: flex; flex-direction: column; gap: 2px; }
.comment { display: flex; gap: 10px; padding: 8px 6px; border-radius: 8px; transition: background 0.12s, box-shadow 0.12s; }
.comment:hover { background: var(--panel); }
.comment:hover .c-actions { opacity: 1; }
/* Gegenstück zum Waveform-Marker: Hover auf dem Punkt hebt hier den Kommentar hervor */
.comment.c-linked { background: var(--accent-dim); box-shadow: inset 2px 0 0 var(--accent); }
.c-avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.c-body { flex: 1; min-width: 0; }
.c-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.c-name { font-weight: 800; font-size: 13px; }
.c-time {
  color: var(--accent-2); font-weight: 800; font-size: 12px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.c-time:hover { text-decoration: underline; }
.c-when { color: var(--muted-2); font-size: 11.5px; font-weight: 600; margin-left: auto; }
.c-text { font-size: 13.5px; color: var(--text); line-height: 1.45; word-wrap: break-word; }
.c-actions { flex: none; display: flex; gap: 2px; align-self: flex-start; opacity: 0; transition: opacity 0.15s; }
.c-icon { background: none; border: none; color: var(--muted-2); font-size: 12px; padding: 5px 7px; border-radius: 6px; transition: color 0.15s, background 0.15s; }
.c-icon:hover { color: var(--text); background: var(--elev); }
.c-icon.c-del:hover { color: #E07A7A; }
.c-edited { color: var(--muted-2); font-size: 11.5px; }
.c-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.c-editor textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 13.5px; padding: 8px 10px; resize: vertical;
}
.c-editor textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,111,224,0.2); }
.c-editbar { display: flex; gap: 8px; }
.c-save { background: var(--accent); color: #14121F; font-weight: 800; font-size: 12.5px; padding: 7px 14px; border-radius: 8px; }
.c-save:hover { background: var(--accent-2); }
.c-cancel { background: var(--elev); border: 1px solid var(--border-2); color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 7px 14px; border-radius: 8px; }
.c-empty { color: var(--muted-2); font-size: 13px; padding: 4px 6px; }

/* ---------- Master delivery ---------- */
.masters { margin-top: 18px; }
.masters h3 {
  font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted-2); margin: 0 0 10px;
}
.master {
  display: flex; align-items: center; gap: 13px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 11px 15px; margin-bottom: 9px;
  transition: border-color 0.15s;
}
.master:hover { border-color: var(--border-2); }
.master-ico {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--elev); color: var(--accent-2); border-radius: 8px; font-size: 16px; font-weight: 800;
}
.master-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.master-cta {
  margin-left: auto; background: var(--elev); color: var(--muted);
  font-size: 12px; font-weight: 800; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.master:hover .master-cta { background: var(--accent); color: #14121F; }

/* ---------- Phase footer (secondary actions) ---------- */
.phase-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
}
.phase-foot .spacer { flex: 1; }
.btn-approve {
  background: transparent; border: 1px solid var(--border-2); color: var(--muted);
  font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.btn-approve:hover { background: rgba(79, 191, 154, 0.12); color: var(--ok); border-color: rgba(79, 191, 154, 0.35); }

.empty { color: var(--muted-2); font-size: 14px; }

.section-sub { color: var(--muted-2); font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; margin: 20px 0 10px; }

/* ---------- Footer ---------- */
.pagefoot {
  max-width: 1060px; margin: 0 auto; padding: 20px 24px 40px;
  display: flex; justify-content: space-between; color: var(--muted-2); font-size: 12px;
  border-top: 1px solid var(--border);
}

/* ---------- Galerie: Karten ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  display: block; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 30px -14px rgba(0, 0, 0, 0.65);
}
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-audio { width: 100%; height: 100%; background: var(--panel); display: grid; place-items: center; }
.card-audio svg { width: 82%; height: 56%; }
.card-kind {
  position: absolute; top: 8px; left: 8px; background: rgba(20, 21, 28, 0.72);
  color: #CFC9F5; font-size: 11px; font-weight: 800; letter-spacing: 0.4px;
  padding: 3px 9px; border-radius: 999px;
}
.card-ok {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center;
  background: rgba(79, 191, 154, 0.92); color: #0C2B22; border-radius: 50%; font-size: 12px; font-weight: 800;
}
.card-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: rgba(124, 111, 224, 0.92);
  color: #14121F; display: grid; place-items: center; font-size: 15px; padding-left: 3px;
  opacity: 0; transition: opacity 0.15s;
}
.card:hover .card-play { opacity: 1; }
.card-info { padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; }
.card-title {
  font-weight: 700; font-size: 13.5px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em;
  overflow-wrap: anywhere; word-break: break-word;
}
.card-meta { color: var(--muted-2); font-size: 12px; font-weight: 650; }

/* ---------- Review-Umgebung ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 13px; font-weight: 700; padding: 8px 13px; border: 1px solid var(--border-2);
  border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.back:hover { background: var(--elev); color: var(--text); }
.stage {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  /* Player/Waveform nicht markierbar — Klicken & Ziehen soll seeken, nicht Text auswählen.
     Kommentartexte (außerhalb von .stage) bleiben markierbar. */
  -webkit-user-select: none; user-select: none;
}
.stage video { width: 100%; max-height: 56vh; background: #000; border-radius: 10px; display: block; cursor: pointer; }
/* Mehr Luft nach oben: die Kommentar-Avatare ragen über die Waveform und sollen
   nicht am Film kleben. */
.stage .wavewrap { margin: 30px 4px 2px; }
.transport { display: flex; align-items: center; gap: 10px; padding: 10px 4px 2px; flex-wrap: wrap; }
.tbtn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--elev); border: 1px solid var(--border-2); color: var(--text);
  display: grid; place-items: center; font-size: 14px;
  transition: background 0.15s, color 0.15s, transform 0.08s, border-color 0.15s;
}
.tbtn:hover { background: var(--accent); color: #14121F; border-color: transparent; }
.tbtn:active { transform: scale(0.92); }
.tbtn-play { background: var(--accent); color: #14121F; border-color: transparent; }
.tbtn-play:hover { background: var(--accent-2); }
.tprog { color: var(--muted); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: 4px; }
.tsep { color: var(--muted-2); }
.thint { margin-left: auto; color: var(--muted-2); font-size: 12px; font-weight: 650; }

/* ---------- Lautstärke-Regler ---------- */
.tvol { display: flex; align-items: center; gap: 9px; }
/* Auf dem Handy ausgeblendet: iOS sperrt die Medien-Lautstärke per Skript,
   geregelt wird dort über die Hardware-Tasten. */
@media (max-width: 560px) { .tvol { display: none; } }
.tbtn-vol { width: 34px; height: 34px; font-size: 13px; }
.vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 82px; height: 4px; border-radius: 999px; cursor: pointer; outline: none;
  /* gefüllter Teil bis --vol (per JS gesetzt), Rest gedämpft */
  background: linear-gradient(to right, var(--accent) var(--vol, 100%), var(--wave) var(--vol, 100%));
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: #F2F1F8; border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); cursor: pointer;
  transition: transform 0.1s;
}
.vol-slider::-webkit-slider-thumb:hover { transform: scale(1.18); }
.vol-slider::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #F2F1F8; border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); cursor: pointer;
}
.vol-slider::-moz-range-track { background: transparent; }
.vol-slider:focus-visible { box-shadow: 0 0 0 3px rgba(124, 111, 224, 0.3); }
.cp-as { color: var(--muted-2); font-size: 12.5px; margin: 0 0 12px 2px; }
.as-name {
  background: transparent; border: none; color: var(--accent-2);
  font-weight: 800; font-size: 12.5px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; padding: 0;
}
.as-name:hover { color: var(--accent); }

.comment-panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 18px 16px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cp-head h3 { margin: 0; font-size: 16px; font-weight: 800; }

/* margin-bottom trennt den Hinweis vom Kommentar-Kasten, der im gestapelten
   Mobile-Layout direkt darunter folgt (auf Desktop ist es das letzte Element links). */
.review-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.review-foot .hint { color: var(--muted-2); font-size: 12.5px; flex: 1; min-width: 200px; }

.wave-fallback { min-height: 60px; }
.fallback-track { height: 6px; background: var(--wave); border-radius: 3px; margin-top: 26px; }

@media (max-width: 560px) {
  .topbar-inner { padding: 11px 16px; }
  .subbar { padding: 14px 16px 0; flex-wrap: wrap; gap: 10px 12px; }
  .subbar .crumb { order: 4; flex: 0 0 100%; min-width: 0; }
  .subbar .btn-primary { margin-left: auto; }
  .subbar-title .proj { font-size: 16px; }
  .content { padding: 18px 14px 44px; }
  .phase { padding: 16px 13px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .pagefoot { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .pagefoot .foot-contact { justify-content: center; }
}

/* ---------- Admin ---------- */
.admin-badge { background: var(--accent-dim); color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 5px 10px; border-radius: 6px; }
.admin-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.admin-card > h2 { margin: 0 0 14px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.admin-new { border-color: var(--border-2); }
.admin-new-grid { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; }
.admin-new-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.4px; }
.admin-card input {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 14px; padding: 10px 12px; width: 100%;
}
.admin-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,111,224,0.2); }
.admin-new-grid .btn-primary { border: none; height: 40px; white-space: nowrap; }
.admin-hint { color: var(--muted-2); font-size: 12px; margin: 12px 0 0; }
.admin-hint code, .admin-path code { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent-2); }
.admin-proj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-proj-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
/* Badge, Master-Chip und Titel als Zeile mit Luft dazwischen (statt aneinanderzukleben) */
.admin-proj-title h2 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-phases { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 2px; }
.admin-phase { display: inline-flex; align-items: center; gap: 8px; }
.admin-path { color: var(--muted); font-size: 12.5px; margin: 12px 0 14px; word-break: break-all; }
.admin-path i { color: var(--muted-2); margin-right: 4px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); }
.admin-inline { display: flex; gap: 6px; align-items: center; }
.admin-inline input { width: 190px; }
.btn-danger { background: transparent; border: 1px solid var(--border-2); color: var(--muted); font-weight: 700; font-size: 13px; padding: 9px 13px; border-radius: 999px; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.btn-danger:hover { background: rgba(224, 90, 90, 0.12); color: #E07A7A; border-color: rgba(224, 90, 90, 0.4); }

@media (max-width: 620px) {
  .admin-new-grid { grid-template-columns: 1fr; }
  .admin-inline { flex: 1 1 100%; }
  .admin-inline input { width: 100%; }
}

.admin-notice { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }
.admin-notice.ok { background: rgba(79, 191, 154, 0.12); border: 1px solid rgba(79, 191, 154, 0.35); color: var(--ok); }
.admin-notice.err { background: rgba(224, 90, 90, 0.12); border: 1px solid rgba(224, 90, 90, 0.4); color: #EDA1A1; }

/* ---------- Admin: Projekt-Detail / Dateiverwaltung ---------- */
.admin-proj-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.phase-head-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.admin-meta-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.admin-meta-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.4px; }
.admin-subhead { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted-2); margin: 24px 0 12px; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.file-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px;
}
.file-kind { color: var(--accent-2); font-size: 14px; }
.file-name { font-weight: 700; font-size: 13.5px; min-width: 140px; flex: 1; word-break: break-all; }
.file-size { color: var(--muted-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.file-rename { display: flex; gap: 6px; align-items: center; }
.file-rename input { width: 170px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px; }
.file-rename input:focus { outline: none; border-color: var(--accent); }
.upload-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--border-2); border-radius: var(--radius); }
.upload-form input[type=file] { color: var(--muted); font-size: 13px; flex: 1; min-width: 180px; }
.upload-form input[type=file]::file-selector-button { background: var(--elev); color: var(--text); border: 1px solid var(--border-2); border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 700; font-size: 12.5px; margin-right: 10px; cursor: pointer; }
.upload-form .btn-primary { border: none; }
.admin-addphase { margin-top: 4px; }

@media (max-width: 620px) {
  .admin-meta-grid { grid-template-columns: 1fr; }
  .file-rename { flex: 1 1 100%; }
  .file-rename input { flex: 1; width: auto; }
}

/* ---------- Phasen-Datum / Fokus / Deeplink ---------- */
.phase-date { color: var(--muted-2); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.phase-date i { font-size: 11px; }
.phase-current { background: var(--accent); color: #14121F; font-size: 11px; font-weight: 800; letter-spacing: 0.3px; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.phase-focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 16px 40px -22px rgba(0,0,0,0.8); }

/* Admin: Phasen-Meta-Editor + Copy-Link */
.phase-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-top: 16px; padding: 0 0 18px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
/* Master-Schalter: als Zeile neben den Feldern (nicht von .phase-meta label in die Spalte gezwungen) */
.phase-meta .phase-master-toggle { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; white-space: nowrap; padding: 0 4px 8px; cursor: pointer; }
.phase-meta .phase-master-toggle i { color: #E0B15E; font-size: 11px; }
.phase-meta label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 800; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.4px; flex: 1; min-width: 140px; }
.phase-meta input { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 13.5px; padding: 9px 11px; }
.phase-meta input:focus { outline: none; border-color: var(--accent); }
.phase-meta input[type=date] { color-scheme: dark; }
.copy-link { white-space: nowrap; }

/* Admin: Einstellungen (Schalter) */
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); padding: 7px 0; cursor: pointer; }
.switch input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.switch b { font-weight: 800; }

/* Review: kurze Fehlermeldung unterm Kommentarfeld (z. B. Senden fehlgeschlagen) */
.c-flash {
  background: rgba(224, 90, 90, 0.1); border: 1px solid rgba(224, 90, 90, 0.35);
  color: #EDA1A1; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius-sm); margin: 8px 0 0;
}

/* ---------- Freigabe (Primäraktion des Kunden, oben in der Sub-Bar) ---------- */
.btn-approve-main {
  background: var(--ok); color: #0C2B22;
  font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: filter 0.15s, transform 0.08s;
}
.btn-approve-main:hover { filter: brightness(1.12); }
.btn-approve-main:active { transform: scale(0.98); }

/* ---------- Bestätigungs-Modal (ersetzt window.confirm) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 8, 14, 0.62); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px;
  animation: modal-fade 0.15s ease-out;
}
.modal {
  background: var(--panel-2); border: 1px solid var(--border-2);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 22px 22px 18px; max-width: 400px; width: 100%;
  animation: modal-pop 0.16s ease-out;
}
.modal-msg { margin: 0 0 18px; font-size: 14.5px; font-weight: 600; line-height: 1.55; color: var(--text); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-cancel {
  background: transparent; border: 1px solid var(--border-2); color: var(--muted);
  font-weight: 700; font-size: 13px; padding: 9px 16px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.modal-cancel:hover { background: var(--elev); color: var(--text); }
.modal-ok {
  background: var(--accent); color: #14121F;
  font-weight: 800; font-size: 13px; padding: 9px 18px; border-radius: 999px;
  transition: background 0.15s, filter 0.15s;
}
.modal-ok:hover { background: var(--accent-2); }
.modal-ok.danger { background: #D96C6C; color: #2B0F0F; }
.modal-ok.danger:hover { background: #E28080; }
@keyframes modal-pop { from { transform: scale(0.96); opacity: 0; } }
@keyframes modal-fade { from { opacity: 0; } }

/* ---------- Toast (Erfolgs-Bestätigung, z. B. nach Freigabe) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90;
  background: #17392E; border: 1px solid rgba(79, 191, 154, 0.5); color: #8FE2C4;
  font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 999px;
  display: flex; gap: 9px; align-items: center; box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  animation: toast-in 0.3s ease-out;
}
.toast-hide { opacity: 0; transform: translateX(-50%) translateY(8px); transition: opacity 0.35s, transform 0.35s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* ---------- Inline-Namenseingabe ("Du kommentierst als …") ---------- */
.as-edit {
  background: var(--bg); border: 1px solid var(--accent); border-radius: 6px;
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 2px 8px; width: 160px;
}
.as-edit:focus { outline: none; box-shadow: 0 0 0 3px rgba(124, 111, 224, 0.22); }

/* ---------- Tastatur-Fokus sichtbar (nur bei Tab-Navigation) ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 2px;
}

/* ---------- Touch-Geräte: kein Hover -> Aktionen immer sichtbar, größere Ziele ---------- */
@media (hover: none) {
  .c-actions { opacity: 1; }
  .c-icon { width: 40px; height: 40px; display: grid; place-items: center; font-size: 14px; }
  .thint { display: none; } /* Leertasten-Hinweis ergibt ohne Tastatur keinen Sinn */
  .card-play { opacity: 0.92; } /* Play-Overlay als Affordance auch ohne Hover */
}

/* ---------- Reduzierte Bewegung respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Footer: Kontakt-Link */
/* Kontaktzeile (Galerie-Footer + Hinweis-Karte): Text, Icon und Mail mittig auf einer Linie */
.foot-contact { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.foot-mail { color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transition: color 0.15s; }
.foot-mail i { font-size: 11px; color: var(--muted-2); }
.foot-mail:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }

/* Toast-Variante: Freigabe zurückgezogen (amber statt grün) */
.toast-warn { background: #3D3218; border-color: rgba(224, 177, 94, 0.5); color: #EBCB8F; }

/* ---------- Phasen-Navigation (Sprung-Chips, ab 2 Phasen) ---------- */
.phase-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.phase-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.phase-chip:hover { border-color: var(--accent); color: var(--text); }
.phase-chip .pc-id { color: var(--accent-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.phase-chip .pc-label { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-chip.is-current { background: var(--accent-dim); border-color: rgba(124, 111, 224, 0.4); color: var(--text); }

/* ---------- Phasen: auf-/zuklappbar ---------- */
.phase { scroll-margin-top: 84px; } /* Sprungziel landet unter der sticky Topbar */
.phase-head { cursor: pointer; }
.phase-toggle {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border-2); color: var(--muted-2);
  display: grid; place-items: center; font-size: 10px;
  transition: transform 0.2s, color 0.15s, border-color 0.15s;
}
.phase-toggle:hover { color: var(--text); border-color: var(--accent); }
.phase-collapsed .phase-toggle { transform: rotate(-90deg); }
.phase-collapsed .phase-body { display: none; }
.phase-collapsed .phase-head { margin-bottom: 0; }
.phase-count { display: none; color: var(--muted-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.phase-collapsed .phase-count { display: inline; }

/* ---------- Master-Phase (Chip + Hervorhebung) ---------- */
.phase-master {
  background: linear-gradient(135deg, #E0B15E, #C99436); color: #2B1E06;
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
}
.phase-master i { font-size: 10px; }
.phase-is-master { border-color: rgba(224, 177, 94, 0.55); box-shadow: 0 0 0 1px rgba(224, 177, 94, 0.35), var(--shadow); }
.phase-chip.is-master { background: rgba(224, 177, 94, 0.16); border-color: rgba(224, 177, 94, 0.5); color: var(--text); }
.phase-chip .pc-star { color: #E0B15E; font-size: 10px; }
.phase-master-toggle { align-self: center; }
.phase-master-toggle i { color: #E0B15E; }

/* ---------- Karte: Badge für zugehörige Tonspuren ---------- */
.card-audio-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(20, 21, 28, 0.82); color: #CFC9F5;
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.card-ok + .card-audio-badge, .card-audio-badge + .card-ok { right: 8px; }
.card-audio-badge i { font-size: 9px; }

/* ---------- Review: zugehörige Tonspuren ---------- */
.tracks {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px; margin-bottom: 18px;
}
.tracks h3 { margin: 0 0 12px; font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.tracks h3 i { color: var(--accent-2); font-size: 12px; }
.track {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 9px;
}
.track:last-child { margin-bottom: 0; }
.track-ico { width: 32px; height: 32px; display: grid; place-items: center; background: var(--elev); color: var(--accent-2); border-radius: 8px; font-size: 14px; }
.track-txt { display: flex; flex-direction: column; gap: 2px; min-width: 160px; flex: 1; }
.track-audio { height: 34px; flex: 1 1 220px; min-width: 180px; }
.track-dl { white-space: nowrap; }

/* ---------- Admin: Projektsuche ---------- */
.admin-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 999px;
  padding: 7px 14px; min-width: 240px;
}
.admin-search i { color: var(--muted-2); font-size: 13px; }
.admin-search input {
  background: transparent; border: none; color: var(--text); font: inherit; font-size: 14px;
  width: 100%; outline: none;
}
.admin-search input::placeholder { color: var(--muted-2); }

@media (max-width: 560px) {
  .admin-search { margin-left: 0; flex: 1 1 100%; min-width: 0; }
  .track-audio { flex-basis: 100%; }
}

/* ---------- Admin: pausiertes Projekt ---------- */
.admin-inactive { opacity: 0.62; }
.admin-inactive:hover { opacity: 1; }
.pause-badge {
  background: rgba(224, 177, 94, 0.16); color: var(--amber);
  border: 1px solid rgba(224, 177, 94, 0.4);
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  padding: 3px 9px; border-radius: 999px; margin-left: 8px;
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
}
.pause-badge i { font-size: 9px; }

/* ---------- Admin: einklappbare Projektkarten ---------- */
.admin-proj-head { cursor: pointer; gap: 12px; }
.admin-toggle { flex: none; }
.admin-collapsed .admin-toggle { transform: rotate(-90deg); }
.admin-collapsed .admin-proj-body { display: none; }
.admin-collapsed .admin-path { margin-bottom: 0; }

/* Admin-Phasen-Anker: Sprungziel landet unter der sticky Topbar */
.content > .admin-card[id^="phase-"] { scroll-margin-top: 84px; }

/* ---------- Review: Desktop zweispaltig (Player links, Kommentare rechts) ---------- */
/* Unterhalb von 1100px gilt weiter das gestapelte Layout (review-main/-side sind dann normale Blöcke). */
/* Kein Breiten-Sprung an der Grenze: Header und Inhalt der Review-Seite haben IMMER
   dieselbe max-width (1420). An der 1100px-Grenze wechselt nur die Spaltenanzahl,
   nicht die Breite — Logo/Abmelden bleiben stehen. Robust auch bei reduzierter Bewegung
   (kein Animations-Trick nötig). */
.review-page .topbar-inner,
.review-page .subbar,
.content.review { max-width: 1420px; }

@media (min-width: 1100px) {
  .content.review { display: flex; align-items: flex-start; gap: 22px; }
  .review-main { flex: 1 1 auto; min-width: 0; }
  .review-side {
    flex: 0 0 380px;
    position: sticky; top: 82px; /* bleibt beim Scrollen unter der Topbar stehen */
  }
  /* Kommentar-Panel füllt die Spalte; lange Threads scrollen INTERN,
     Eingabefeld + Zeitanker bleiben immer sichtbar. */
  .review-side .comment-panel {
    margin-bottom: 0;
    display: flex; flex-direction: column;
    max-height: calc(100vh - 106px);
  }
  .review-side .comments { overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
}

/* ---------- Burger-Menü (Topbar, nur Mobile) ---------- */
.nav-burger {
  display: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--elev); border: 1px solid var(--border-2); color: var(--text);
  place-items: center; font-size: 16px; margin-left: auto;
  transition: background 0.15s, color 0.15s;
}
.nav-burger:hover { background: var(--accent); color: #14121F; }

@media (max-width: 560px) {
  .topbar-inner { position: relative; }
  .nav-burger { display: grid; }
  .admin-badge { margin-left: 10px; }
  /* Aktionen wandern in ein Dropdown unter der Topbar */
  .topbar-actions { display: none; }
  .nav-open .topbar-actions {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    position: absolute; top: calc(100% + 8px); right: 12px; min-width: 210px;
    background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow); z-index: 40;
    margin-left: 0;
  }
  .nav-open .topbar-actions form { display: block; }
  .nav-open .topbar-actions .btn-ghost {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px; font-size: 14px; border-radius: 10px;
  }
}

/* ---------- Mobile: Textlängen & Umbrüche ---------- */
@media (max-width: 560px) {
  /* Projekttitel & Breadcrumb: bis zu 2 Zeilen umbrechen statt hart abschneiden */
  .subbar-title .proj {
    white-space: normal; overflow: hidden; text-overflow: clip;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.25;
  }
  .crumb {
    white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.35;
  }
  /* Phasen-Kopf: Chips/Label oben, Download-Button in eigener Zeile linksbündig */
  .phase-tools { margin-left: 0; width: 100%; }
  .phase-count { white-space: normal; }
  /* Kommentar-Sprechblase nie breiter als der Schirm */
  .marker-pop { max-width: calc(100vw - 72px); }
  /* Buttons: bequemere Touch-Höhe */
  .btn-ghost, .btn-primary, .btn-approve-main, .btn-approve, .btn-danger { padding: 10px 16px; }
  .subbar { row-gap: 10px; }
  /* Toast nicht über die Kanten */
  .toast { font-size: 13px; text-align: center; }
}

/* Mobile: Projektkarten-Kopf im Admin umbrechen — Titel volle Breite, Aktionen darunter */
@media (max-width: 560px) {
  .admin-proj-head { flex-wrap: wrap; }
  .admin-proj-title { flex: 1 1 calc(100% - 40px); }
  .admin-proj-actions, .phase-head-actions { width: 100%; justify-content: flex-start; }
}

/* ---------- Eigenständige Audios: kompakte Zeilen statt großer Karten ---------- */
.audio-list { display: flex; flex-direction: column; gap: 8px; }
.cards + .audio-list { margin-top: 18px; }
.audio-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px 8px 15px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s;
}
.audio-item:hover { border-color: var(--accent); }
/* klickbarer Bereich -> Waveform-Review (Icon, Name, Meta) */
.ai-open { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; padding: 4px 0; }
.ai-ico {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent-2); border-radius: 9px; font-size: 14px;
}
.ai-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ai-file { color: var(--muted-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-ok { color: var(--ok); font-size: 15px; flex: none; }
.ai-meta { color: var(--muted-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
/* Hochwertiger Download-Pfeil rechts (direkter Download, nicht in die Review) */
.ai-dl {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--elev); border: 1px solid var(--border-2); color: var(--muted);
  display: grid; place-items: center; font-size: 15px;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.08s;
}
.ai-dl:hover { background: var(--accent); color: #14121F; border-color: transparent; }
.ai-dl:active { transform: scale(0.92); }
@media (max-width: 560px) {
  .ai-meta { display: none; } /* auf schmalen Schirmen reicht Name + Download */
}

/* ---------- Anzeigename: echter Dateiname klein darunter ---------- */
.card-file {
  color: var(--muted-2); font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: -2px;
}
/* Karten-Titel braucht keine 2-Zeilen-Reserve mehr, wenn ein Dateiname darunter steht */
.card-file + .card-meta { margin-top: 1px; }
.file-label { display: block; font-weight: 700; }
.file-realname { display: block; color: var(--muted-2); font-size: 11px; font-weight: 600; }

/* ---------- Anti-Jitter: Hover-Transform der Karten auf eigener GPU-Ebene ----------
   Ohne eigenen Layer rastert der Browser beim translateY-Hover die Nachbarkarten neu,
   deren SVG-Waveforms dann sichtbar "wackeln". */
.card { transform: translateZ(0); }
.card:hover { transform: translateY(-2px) translateZ(0); }
