/* projekt-aufbau.css: Projekte im neuen Aufbau (gehoert zu projekt-aufbau.js). Gilt nur unter html.vl-rahmen und html.vl-pj-aufbau (ab 768 px).
 * Nur Token der Seite (theme.js), keine Farbwerte. Fokusring aus theme.js. Gleich gewichtige Regeln: die spaetere gewinnt. */
html.vl-rahmen.vl-pj-aufbau .vl-pj[hidden] { display: none !important; }

/* Direkteinstieg: bis projekt-aufbau.js umgebaut hat, keine alten Knoepfe (hoechstens 1,5 s) */
@media (min-width: 768px) { html.vl-rahmen:not(.vl-pj-aufbau) #detail-grid > .dg-info { animation: vl-pj-vor 1.5s step-end; } }
@keyframes vl-pj-vor { from { visibility: hidden; } }

/* Team: der Ordnerbaum schiebt den Inhalt wieder (rahmen.css setzt margin-left: 0 !important und hob das auf) */
html.vl-rahmen.vl-pj-aufbau:not(.vl-rahmen-katalog) body.sidebar-open main.page-content { margin-left: 260px !important; }

/* Ordner: kleiner Titel, Karte "Wartet auf dich" */
/* Titel: theme.js zwingt grosse Titel mit !important auf Unbounded 900, darum hier auch !important (hoehere Spezifitaet reicht nicht) */
html.vl-rahmen.vl-pj-aufbau #project-title, html.vl-rahmen.vl-pj-aufbau #detail-title { font-family: var(--font-body, 'Funnel Display', system-ui, sans-serif) !important; font-weight: 600 !important; font-size: 22px; line-height: 1.3 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text-primary) !important; overflow-wrap: anywhere; }
html.vl-rahmen.vl-pj-aufbau #project-title { margin-bottom: 4px; }
html.vl-rahmen.vl-pj-aufbau #project-title[tabindex="-1"]:focus { outline: none; }   /* Fokusziel nach "Zurück zum Projekt", kein Bedienelement */
html.vl-rahmen.vl-pj-aufbau #videos-view .flex-1 > .mb-8 { margin-bottom: 20px; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-karte { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 20px; padding: 16px 24px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-s1); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-k-text { flex: 1 1 280px; min-width: 0; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-k-titel { margin: 0 0 4px; font: 600 17px/1.3 var(--font-body, 'Funnel Display', system-ui, sans-serif); letter-spacing: 0; text-transform: none; color: var(--text-primary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-k-zeile { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-secondary); }

/* Knoepfe: Freigeben gefuellt, Aenderung als Kontur-Pille, nie Gruen oder Rot als Flaeche */
html.vl-rahmen.vl-pj-aufbau .vl-pj-knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; box-sizing: border-box; border: 1px solid var(--kontur); border-radius: 999px; background: transparent; color: var(--text-primary);
  font: 600 15px/1.2 var(--font-body, 'Funnel Display', system-ui, sans-serif); letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-voll { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: var(--btn-primary-line); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-kontur:hover { border-color: var(--text-primary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-knopf:disabled { opacity: .5; cursor: default; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-k-text + .vl-pj-knopf { flex: 0 0 auto; }

/* Video: Fach rechts (Entscheidung, Kommentare, "Als Nächstes wartet"), Werkzeuge unter dem Player */
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach { display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-s1); overflow: hidden; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach:focus:not(:focus-visible) { outline: none; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach > .dg-info { padding: 20px 24px 20px; flex: none; }
html.vl-rahmen.vl-pj-aufbau.vl-pj-laedt #fp-desk,
html.vl-rahmen.vl-pj-aufbau.vl-pj-laedt #vl-pj-fach > .dg-info, html.vl-rahmen.vl-pj-aufbau.vl-pj-laedt #vl-pj-weiter { visibility: hidden; }   /* Platz bleibt, nichts Falsches */
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach > .dg-info > .flex:first-child { margin-bottom: 4px; }
html.vl-rahmen.vl-pj-aufbau :is(#detail-status, #detail-actions) { display: none !important; }   /* die Seite bleibt Herr ueber Stand und Knoepfe, hier zeigt sie das Fach */
html.vl-rahmen.vl-pj-aufbau #detail-date { font-size: 13px; color: var(--text-secondary) !important; }
html.vl-rahmen.vl-pj-aufbau #detail-title { margin: 4px 0 8px; }
html.vl-rahmen.vl-pj-aufbau.vl-pj-leer #detail-desc { display: none; }   /* "Keine Beschreibung." nicht zeigen */
html.vl-rahmen.vl-pj-aufbau.vl-pj-fotos #rv-submit:disabled { display: none; }   /* "Noch N offen": die Karte sagt es schon */
html.vl-rahmen.vl-pj-aufbau #detail-desc { font-size: 14px; color: var(--text-secondary) !important; margin: 0 0 12px; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-stand { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font: 600 15px/1.3 var(--font-body, 'Funnel Display', system-ui, sans-serif); color: var(--text-primary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-satz { max-width: 60ch; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-satzz { display: block; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-swn { min-width: 0; overflow-wrap: anywhere; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-stand .material-symbols-outlined { font-size: 20px; color: var(--text-primary) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-stand[data-art="ok"] .material-symbols-outlined { color: var(--ok) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-stand[data-art="offen"] .material-symbols-outlined { color: var(--offen) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-satz { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-secondary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-hinweis { margin: 0 0 8px; padding: 0 16px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach.vl-pj-schreibt .vl-senden { display: none !important; }   /* im Schreibmodus gibt es nur "Änderung senden" */
html.vl-rahmen.vl-pj-aufbau #chat-input + .vl-pj-knopf { flex: 0 0 auto; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach.vl-pj-schreibt #chat-input { border-color: var(--text-primary) !important; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach #tc-panel { flex: 1 1 auto; min-height: 280px; height: 520px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-fach #chat-messages { min-height: 0; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-weiter { flex: none; padding: 16px 24px 20px; border-top: 1px solid var(--line); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-kopf { margin: 0 0 8px; font: 600 13px/1.3 var(--font-body, 'Funnel Display', system-ui, sans-serif); letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-text { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--text-primary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 8px 16px; box-sizing: border-box; border: 1px solid var(--kontur); border-radius: 14px; background: transparent; color: var(--text-primary);
  font: 600 15px/1.3 var(--font-body, 'Funnel Display', system-ui, sans-serif); text-align: left; cursor: pointer; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-zeile > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-zeile::after { content: ''; flex: none; width: 7px; height: 7px; margin-right: 3px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-zeile:hover { background: var(--sel-bg); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-rest { margin: 8px 0 0; font-size: 13px; color: var(--text-secondary); }
html.vl-rahmen.vl-pj-aufbau #vl-pj-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1023px) {
  html.vl-rahmen.vl-pj-aufbau .vl-pj-karte .vl-pj-knopf { flex: 1 1 100%; }
  html.vl-rahmen.vl-pj-aufbau #vl-pj-weiter { border-top: 0; border-bottom: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  html.vl-rahmen.vl-pj-aufbau .detail-grid > #vl-pj-fach { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: calc(var(--vlr-band) + var(--vlr-zeile) + 16px); max-height: calc(100vh - var(--vlr-band) - var(--vlr-zeile) - 32px); overflow-y: auto; }
  html.vl-rahmen.vl-pj-aufbau .detail-grid > #vl-pj-werkzeuge { grid-column: 1; grid-row: 2; margin-top: -16px; }
  html.vl-rahmen.vl-pj-aufbau #vl-pj-fach #tc-panel { height: auto; }
  html.vl-rahmen.vl-pj-aufbau body.sidebar-open .detail-grid:not(.ohne-panel) { grid-template-columns: minmax(0, 1fr) 400px; }   /* offener Baum: das Fach wird schmaler */
  html.vl-rahmen.vl-pj-aufbau .detail-grid.ohne-panel > #vl-pj-fach { grid-column: 1; grid-row: 3; position: static; max-height: none; }   /* Vergleich bleibt wie er ist */
  html.vl-rahmen.vl-pj-aufbau .detail-grid:not(.ohne-panel) { grid-template-rows: auto auto auto 1fr; }
  html.vl-rahmen.vl-pj-aufbau .detail-grid > .dg-chat { grid-row: 4; }
  html.vl-rahmen.vl-pj-aufbau .detail-grid > #fp-desk { grid-column: 1; grid-row: 3; }
  html.vl-rahmen.vl-pj-aufbau .detail-grid:not(.ohne-panel):has(> #vl-pj-werkzeuge[hidden]) > #fp-desk { margin-top: -32px; }
  html.vl-rahmen.vl-pj-aufbau .detail-grid.ohne-panel > #fp-desk { grid-row: 5; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  html.vl-rahmen.vl-pj-aufbau .detail-grid:not(.ohne-panel), html.vl-rahmen.vl-pj-aufbau body.sidebar-open .detail-grid:not(.ohne-panel) { grid-template-columns: minmax(0, 1fr) 360px; }
  html.vl-rahmen.vl-pj-aufbau .vl-pj-knoepfe { flex-direction: column; }
  html.vl-rahmen.vl-pj-aufbau .vl-pj-knoepfe .vl-pj-knopf { width: 100%; }
}

/* "Als Nächstes" nach der Entscheidung: oben im Fach unter dem Satz, Knopf gefuellt */
html.vl-rahmen.vl-pj-aufbau #vl-pj-weiter.vl-pj-oben { padding: 0; border: 0; margin: 16px 0 12px; }
html.vl-rahmen.vl-pj-aufbau #vl-pj-weiter.vl-pj-oben .vl-pj-w-zeile { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: var(--btn-primary-line); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-zeile:disabled { opacity: .5; cursor: default; }

/* Teil 4b-1: Stand auf Kacheln und in der Projektliste */
html.vl-rahmen.vl-pj-aufbau .detail-grid > #fp-desk { margin-top: 0; min-width: 0; }
html.vl-rahmen.vl-pj-aufbau .detail-grid > #fp-desk .fp-karte:not(.fp-schmal) { padding: 14px 16px; }
html.vl-rahmen.vl-pj-aufbau .detail-grid > #fp-desk :is(.fp-h, .fp-bez) { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
html.vl-rahmen.vl-pj-aufbau #videos-grid .vl-grid { align-items: stretch; }   /* gemischte Reihe: gleich hohe Kacheln, Titel auf einer Linie */
html.vl-rahmen.vl-pj-aufbau .vl-pj-kstand, html.vl-rahmen.vl-pj-aufbau .vl-pj-pstand { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 0; font: 600 13px/1.3 var(--font-body, 'Funnel Display', system-ui, sans-serif); letter-spacing: 0; text-transform: none; color: var(--text-primary); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-pstand { min-height: 3.9em; color: var(--text-secondary); }
@media (min-width: 1024px) { html.vl-rahmen.vl-pj-aufbau .vl-pj-pstand { min-height: 1.3em; } }
html.vl-rahmen.vl-pj-aufbau .vl-pj-pstand[data-art="offen"] { color: var(--text-primary); }
html.vl-rahmen.vl-pj-aufbau :is(.vl-pj-kstand, .vl-pj-pstand) .material-symbols-outlined { flex: none; font-size: 16px; color: var(--text-secondary) !important; }
html.vl-rahmen.vl-pj-aufbau :is(.vl-pj-kstand, .vl-pj-pstand) .material-symbols-outlined:empty { display: none; }
html.vl-rahmen.vl-pj-aufbau :is(.vl-pj-kstand, .vl-pj-pstand) .vl-pj-sw { min-width: 0; overflow-wrap: anywhere; }   /* nie abschneiden, notfalls mitten im Wort umbrechen */
html.vl-rahmen.vl-pj-aufbau :is(.vl-pj-kstand, .vl-pj-pstand)[data-art="ok"] .material-symbols-outlined { color: var(--ok) !important; }
html.vl-rahmen.vl-pj-aufbau :is(.vl-pj-kstand, .vl-pj-pstand)[data-art="offen"] .material-symbols-outlined { color: var(--offen) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-row :is(.vl-pj-kstand, .vl-pj-pstand) { display: inline-flex; flex: none; margin: 0 0 0 8px; min-height: 0; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* Team, Baum zu: der Knopf "Sidebar öffnen" sitzt in der Pfad-Zeile vor "Eine Ebene höher" und scrollt mit (rahmen.css haelt ihn fest, links unter der Leiste) */
@media (min-width: 768px) {
  html.vl-rahmen body #sidebar-toggle-btn { position: absolute !important; left: calc(var(--vlr-b) + 24px) !important; top: calc(var(--vlr-band) + var(--vlr-zeile) + 25px) !important; }
  html.vl-rahmen body:has(#videos-view:not(.hidden)) #sidebar-toggle-btn { top: calc(var(--vlr-band) + var(--vlr-zeile) + 24px) !important; }
  html.vl-rahmen body:has(#detail-view:not(.hidden)) #sidebar-toggle-btn { top: calc(var(--vlr-band) + var(--vlr-zeile) + 24px) !important; }
  html.vl-rahmen body:not(.sidebar-open):has(#sl-tray:not(.sl-offen)) #main-content { padding-bottom: 76px; }
  html.vl-rahmen body:not(.sidebar-open) #sl-tray:not(.sl-offen) #sl-pill { width: 44px; height: 44px; padding: 0 !important; gap: 0 !important; justify-content: center; position: relative; }
  html.vl-rahmen body:not(.sidebar-open) #sl-tray:not(.sl-offen) #sl-pill > :not(.material-symbols-outlined) { position: absolute; padding: 0 !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.vl-rahmen body:not(.sidebar-open):has(#sidebar-toggle-btn[style*="flex"]) :is(#share-links-trigger-wrap, #videos-view > div:first-child, #breadcrumb-detail) { padding-left: 48px; }
  html.vl-rahmen body:not(.sidebar-open):has(#sidebar-toggle-btn[style*="flex"]) :is(#videos-view > div:first-child, #breadcrumb-detail) { min-height: 40px !important; align-items: center; }
}

html.vl-rahmen.vl-pj-aufbau .vl-pj-w-nk { margin-top: 16px; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-nz { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; row-gap: 2px; margin-bottom: 8px; background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: var(--btn-primary-line); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-nz:hover { background: var(--btn-primary-bg); opacity: .9; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-nk ~ .vl-pj-knopf { display: flex; width: 100%; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-nz::after { grid-area: 1 / 2 / 3; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-w-nz > :last-child { font-size: 13px; font-weight: 400; color: inherit; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-mstand { position: absolute; top: 6px; right: 6px; z-index: 12; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 50%; background: var(--bg-s1); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-mstand .material-symbols-outlined { font-size: 14px; color: var(--text-secondary) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-mstand[data-art="ok"] { background: var(--ok); border-color: var(--ok); }
html.vl-rahmen.vl-pj-aufbau .vl-pj-mstand[data-art="ok"] .material-symbols-outlined { color: var(--bg-s1) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-mstand[data-art="offen"] .material-symbols-outlined { color: var(--offen) !important; }
html.vl-rahmen.vl-pj-aufbau .vl-pj-mstand .vl-pj-sw { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
