/* Contentplan am Handy (Moritz, 2026-11-18).
   Am Handy schauen Kunden schnell nach, was heute und demnaechst rausgeht, und holen sich
   Post-Text, Notizen und Video zum Posten raus. Deshalb: Liste ab heute nach Tagen,
   Beitrag zuerst zum Lesen, unten eine feste Leiste mit dem naechsten Schritt,
   Bearbeiten erst auf Wunsch.
   Gilt nur unter 768px (gleiche Grenze wie die Handy-Leiste in mobile-nav.js).
   Farben nur ueber die Theme-Variablen, animiert nur transform und opacity.
   Rot bleibt Warnungen vorbehalten: Heute, Auswahl, Freigabe und Kopieren sind neutral.
   Abstaende im 8er-Raster (8, 16, 24). */

/* Ein Ton fuer alle gestrichelten Platzhalter, etwa 3:1 in beiden Themes */
:root { --cph-strich: rgba(255,255,255,0.35); }
[data-theme="light"] { --cph-strich: #A39B98; }

/* Am Computer gibt es die Handy-Bausteine nicht */
#cph-filter, .cph-leiste, #cph-verwerfen, .cp-pfeil, .cph-freigabe-hinweis { display:none; }
.cph-unsichtbar { position:absolute !important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ---- Bausteine fuer Handy und Laptop ----
   Seit 27.11. hat auch die Schublade am Laptop die Terminzeile oben und, solange ein Beitrag auf die
   eigene Freigabe wartet, die feste Leiste unten (Design-Pruefung, Rang 1). Die Knoepfe dafuer stehen
   deshalb ausserhalb der Handy-Regeln. Andere .cph-kopieren-Knoepfe gibt es am Laptop nicht (Lesebloecke
   und Verwerfen sind dort ausgeblendet). */
.cph-kopieren { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 16px; border-radius:9999px;
  font-size:15px; font-weight:600; cursor:pointer; white-space:nowrap; text-decoration:none; touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  background:var(--btn-primary-bg, #fff); color:var(--btn-primary-fg, #0A0708); border:0;
  transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
.cph-kopieren .material-symbols-outlined { font-size:20px; color:inherit !important; }
.cph-kopieren:hover { opacity:.88; }
.cph-kopieren:active { transform:scale(.96); }
.cph-kopieren:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:2px; }
.cph-kopieren.leise { background:var(--bg-s2, #1f1f1f); color:var(--fg-1, #fff); box-shadow:inset 0 0 0 1px var(--line-a150, rgba(255,255,255,0.15)); }
.cph-kopieren.klein { padding:0 14px; font-size:14px; }
.cph-kopieren.ok .material-symbols-outlined { animation:cph-ok .3s cubic-bezier(.16,1,.3,1); }
.cph-kopieren[aria-busy="true"] { cursor:progress; }
@keyframes cph-ok { from { transform:scale(.5); opacity:0; } to { transform:scale(1); opacity:1; } }

.cph-wann { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin-bottom:16px; font-size:14px; font-weight:500; color:var(--fg-a700, rgba(255,255,255,0.7)); }
.cph-wann .material-symbols-outlined { font-size:18px; }
.cph-wann span { display:inline-flex; align-items:center; gap:4px; }
/* Termin antippen zum Aendern: sieht aus wie die Zeile, mit Stift als Hinweis */
.cph-termin { display:inline-flex; align-items:center; gap:4px; min-height:44px; margin:-12px 0 -12px -8px; padding:0 8px; border:0; border-radius:12px; background:none;
  font:inherit; color:inherit; cursor:pointer; touch-action:manipulation; transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
.cph-termin-tun { display:inline-flex; align-items:center; gap:2px; margin-left:4px; padding:2px 8px; border-radius:9999px; font-size:13px; font-weight:600;
  box-shadow:inset 0 0 0 1px var(--line-a150, rgba(255,255,255,0.15)); color:var(--fg-1, #fff); }
.cph-termin-tun .material-symbols-outlined { font-size:14px; }
/* Freigabe-Kasten: die Kopfzeile sagt schon "Wartet auf deine Freigabe", hier nur die Erklaerung.
   Beim Aenderungswunsch nur noch die Frage. */
#dp-approve-box > p:first-child { display:none; }
#dp-approve-box > p { margin-bottom:0 !important; }
#dp-approve-box:has(#rp-korrektur:not([style*="display: none"])) > p { display:none; }
#dp-approve-box #rp-korrektur.mt-3 { margin-top:0; }
.cph-termin:hover { opacity:.8; }
.cph-termin:active { transform:scale(.97); }
.cph-termin:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:0; }
/* Freigabe laeuft: Stand links, Rueckgaengig rechts */
.cph-wartet { position:relative; display:flex; align-items:center; justify-content:center; gap:6px; flex:1 1 0; min-height:48px; font-size:14px; font-weight:600; color:var(--fg-a700, rgba(255,255,255,0.7)); }
.cph-ablauf { position:absolute; left:8px; right:8px; bottom:4px; height:3px; border-radius:2px; background:var(--fg-a700, rgba(255,255,255,0.7)); transform-origin:left center;
  animation:cph-ablauf var(--dauer, 6000ms) linear forwards; }
@keyframes cph-ablauf { from { transform:scaleX(1); } to { transform:scaleX(0); } }
.cph-wartet .material-symbols-outlined { font-size:18px; }

@media (max-width:767px) {
  /* ---- Kopf: eine Zeile Werkzeuge. Der Titel steht schon in der Handy-Leiste ("Plan"). ---- */
  main.page-content { padding-top:88px !important; }
  #cp-kopf { margin-bottom:16px !important; gap:8px !important; }
  #cp-kopf h1, #cp-company { position:absolute !important; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  #role-badge, #presence-bar, #btn-abo, #btn-series, #month-nav, #approver-row { display:none !important; }
  #cp-werkzeug { width:100%; flex-wrap:nowrap !important; gap:8px !important; }
  #company-switch { flex:1 1 100%; max-width:none !important; min-height:44px; font-size:16px; }
  #cp-werkzeug:has(#company-switch:not([style*="display: none"])) { flex-wrap:wrap !important; }
  #cp-ansichten { padding:2px !important; }
  #cp-ansichten > button { min-height:40px; padding-left:16px !important; padding-right:16px !important; font-size:12px !important; letter-spacing:.06em !important; }
  /* Auswahl als erhabene Flaeche mit Ring, nicht wie der Primaerknopf. Der Ring traegt den Zustand
     (mindestens 3:1 zur Umgebung), die Flaeche allein waere im Dunkeln zu schwach. */
  #cp-ansichten > button.bg-white { background:var(--l-card, var(--bg-s4, #333)) !important; color:var(--fg-1, #fff) !important; box-shadow:inset 0 0 0 1.5px var(--fg-a700, rgba(255,255,255,0.7)); }
  #vw-liste { order:-1; }
  /* Team: Firmenauswahl, Filter, Neu und Glocke in einer Zeile, die vier Ansichten darunter */
  #cp-werkzeug.cph-team { flex-wrap:wrap !important; }
  #cp-werkzeug.cph-team #company-switch { flex:1 1 0; min-width:0; order:0; text-overflow:ellipsis; }
  #cp-werkzeug.cph-team #btn-new { width:44px; padding:0 !important; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
  #cp-werkzeug.cph-team #btn-new .material-symbols-outlined { font-size:22px; }
  #cp-werkzeug.cph-team #cph-filter, #cp-werkzeug.cph-team #btn-new, #cp-werkzeug.cph-team > .relative { order:1; }
  #cp-werkzeug.cph-team #cp-ansichten { flex:1 1 100%; order:2; }
  #cp-werkzeug.cph-team #cp-ansichten > button { flex:1; padding-left:6px !important; padding-right:6px !important; }
  #cph-filter { display:inline-flex; position:relative; margin-left:auto; flex-shrink:0; }
  #cph-filter.weg { display:none; }
  /* Ohne Filter (Kunden) schiebt "+ Idee" Neu und Glocke nach rechts */
  #cph-filter.weg + #btn-new { margin-left:auto; }
  #cph-filter .material-symbols-outlined { font-size:20px; }
  #cph-filter[aria-expanded="true"] { background:var(--l-card, var(--bg-s4, #333)); box-shadow:inset 0 0 0 1.5px var(--fg-1, #fff); }
  .cph-filterpunkt { position:absolute; top:8px; right:8px; width:8px; height:8px; border-radius:50%; background:var(--fg-1, #fff); box-shadow:0 0 0 2px var(--bg-s2, #1f1f1f); display:none; }
  #cph-filter.aktiv .cph-filterpunkt { display:block; }
  #btn-new { min-height:44px; padding-left:16px !important; padding-right:16px !important; font-size:12px !important; white-space:nowrap; }
  #cp-werkzeug .relative > button[aria-label="Benachrichtigungen"] { width:44px; height:44px; }
  /* Der alte Filter-Knopf zieht in die Werkzeugzeile (#cph-filter), die Filter klappen darunter auf */
  #filter-bereich > button, #cp-werkzeug > button[onclick="toggleFilters()"] { display:none !important; }
  #filter-bereich { margin-bottom:16px !important; }
  #filter-wrap:not(.hidden) { display:grid !important; grid-template-columns:1fr 1fr; gap:8px; padding:16px; border-radius:16px; background:var(--bg-s1, #161616); border:1px solid var(--line-a100, rgba(255,255,255,0.1)); }
  #filter-wrap .field-sm, #filter-wrap select { width:100% !important; min-height:44px; font-size:16px; }
  #filter-wrap > .relative { grid-column:1 / -1; }
  #filter-wrap #f-search { width:100% !important; }
  #filter-wrap #f-reset { grid-column:1 / -1; min-height:44px; }

  /* Hinweise oben: Freigabe ist eine Aufgabe, nichts Schlechtes. Nur "ueberfaellig" bleibt rot. */
  #openbar { margin-bottom:16px !important; gap:8px !important; }
  #openbar > button { min-height:44px; flex:1 1 0; min-width:max-content; font-size:12px !important; }
  #openbar > button:not(.cp-warnung) { display:inline-flex; align-items:center; justify-content:space-between; gap:8px; padding:0 8px 0 16px !important;
    background:var(--bg-s2, #1f1f1f) !important; border:1.5px solid var(--fg-1, #fff) !important; color:var(--fg-1, #fff) !important;
    font-family:'Funnel Display', sans-serif !important; font-size:15px !important; font-weight:600 !important; text-transform:none !important; letter-spacing:0 !important; }
  /* Ring nur, wenn du dran bist (Freigabe fuer Kunden). Team-Hinweise sind ruhige Pillen. */
  #openbar > button:not(.cp-warnung):not([onclick^="CPH.freigaben"]) { border:1px solid var(--line-a150, rgba(255,255,255,0.15)) !important; }
  /* Pfeil als echtes, versteckt markiertes Symbol (vorher ::after: VoiceOver las "chevron_right" vor) */
  #openbar > button:not(.cp-warnung) .cp-pfeil { display:inline-block; font-size:22px; font-weight:400; line-height:1; color:inherit !important; }

  /* Felder ab 16px: darunter zoomt Safari beim Antippen in die Seite */
  .detail-panel .field, .modal-bg .field, #rp-korrektur-text, #dp-comment-input { font-size:16px !important; }

  /* ---- Liste ab heute ---- */
  .cph-liste { display:flex; flex-direction:column; }
  .cph-tag { margin-bottom:16px; }
  .cph-tagkopf { position:sticky; top:var(--cph-oben, 72px); z-index:4; display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:52px;
    margin:0 -16px 8px; padding:4px 16px; border-bottom:1px solid transparent; }
  /* Haarlinie als Rand, nicht als Schatten (CI v1.1: keine Schatten) */
  .cph-tagkopf.klebt { background:color-mix(in srgb, var(--bg-body, #0A0708) 88%, transparent); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
    border-bottom-color:var(--line-a080, rgba(255,255,255,0.08)); }
  .cph-tagkopf h2 { display:flex; align-items:center; gap:8px; min-width:0; font-size:17px; font-weight:700; line-height:1.25; color:var(--fg-1, #fff); }
  .cph-tagkopf h2 .klein { font-size:14px; font-weight:500; color:var(--fg-a600, rgba(255,255,255,0.6)); white-space:nowrap; }
  /* Heute: das Wort traegt es, eine Stufe groesser (Funnel hoechstens Semibold 600, CI v1.1). Der Ring heisst nur "gewaehlt" oder "du bist dran". */
  .cph-tagkopf.heute h2 .gross { font-size:19px; font-weight:600; }
  .cph-frueher { display:inline-flex; align-items:center; gap:4px; flex-shrink:0; min-height:44px; padding:0 4px 0 8px; margin-right:-4px; border:0; background:none; cursor:pointer;
    font-size:14px; font-weight:600; color:var(--fg-a700, rgba(255,255,255,0.7)); touch-action:manipulation; transition:opacity .15s ease, transform .15s cubic-bezier(.16,1,.3,1); }
  .cph-frueher .material-symbols-outlined { font-size:18px; }
  .cph-frueher:hover { opacity:.75; }
  .cph-frueher:active { transform:scale(.96); }
  .cph-frueher:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:2px; border-radius:8px; }
  .cph-frueher-oben { margin:-8px 0 8px; }
  .cph-leerzeile .cph-kopieren { margin-top:16px; }
  .cph-leerzeile { padding:16px; margin-bottom:8px; border-radius:16px; font-size:15px; line-height:1.45; color:var(--fg-a600, rgba(255,255,255,0.6)); border:1.5px dashed var(--cph-strich); }

  .cph-karte { position:relative; margin-bottom:8px; border-radius:20px; background:var(--bg-s1, #161616); border:1px solid var(--line-a100, rgba(255,255,255,0.1)); overflow:hidden; }
  .cph-karte.vorbei { background:var(--surf-a020, rgba(255,255,255,0.02)); }
  .cph-karte.freigabe { border:1.5px solid var(--fg-1, #fff); }
  /* Reserviert: nur gestrichelt, ohne Schraffur. Uhrzeit und Titel treten zurueck. */
  .cph-karte.reserviert { background:none; border:1.5px dashed var(--cph-strich); }
  .cph-karte.reserviert .cph-zeit, .cph-karte.reserviert .cph-titel { color:var(--fg-a700, rgba(255,255,255,0.7)); }
  .cph-karte-haupt { display:flex; align-items:flex-start; gap:16px; width:100%; padding:16px; text-align:left; background:none; border:0; color:inherit; cursor:pointer;
    touch-action:manipulation; -webkit-tap-highlight-color:transparent; transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
  .cph-karte-haupt:hover { opacity:.92; }
  .cph-karte-haupt:active { transform:scale(.985); opacity:.9; }
  .cph-karte-haupt:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:-2px; border-radius:20px; }
  .cph-zeit { flex-shrink:0; width:48px; padding-top:1px; font-size:16px; font-weight:700; line-height:1.25; font-variant-numeric:tabular-nums; color:var(--fg-1, #fff); }
  .cph-zeit.offen { font-size:13px; font-weight:600; line-height:1.3; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  .cph-inhalt { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
  .cph-kanal { display:flex; align-items:center; gap:4px; font-size:13px; font-weight:600; color:var(--fg-a700, rgba(255,255,255,0.7)); }
  .cph-kanal .material-symbols-outlined { font-size:16px; }
  .cph-titel { font-size:16px; font-weight:700; line-height:1.3; color:var(--fg-1, #fff); overflow-wrap:anywhere; }
  .cph-vorschau { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:14px; line-height:1.4; color:var(--fg-a700, rgba(255,255,255,0.7)); overflow-wrap:anywhere; }
  .cph-vorschau.hinweis { font-style:normal; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  .cph-stand { margin-top:4px; }
  .cph-stand .rp-status { font-size:13px; gap:6px; }
  .cph-bild { flex-shrink:0; width:52px; height:52px; border-radius:12px; object-fit:cover; background:var(--surf-a080, rgba(255,255,255,0.08)); }
  .cph-bild.hoch { height:80px; }
  .cph-aktionen { display:flex; align-items:center; gap:8px; padding:0 16px 16px 80px; margin-top:-4px; }
  .cph-aktionen .cph-kopieren { font-size:14px; padding:0 16px; }
  .cph-aktionen .cph-kopieren .material-symbols-outlined { font-size:18px; }

  .cph-umschalt { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:48px; margin:0 0 16px; border-radius:9999px;
    font-size:15px; font-weight:600; cursor:pointer; color:var(--fg-1, #fff); background:none; border:1px solid var(--line-a150, rgba(255,255,255,0.15));
    touch-action:manipulation; transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
  .cph-umschalt .material-symbols-outlined { font-size:20px; }
  .cph-umschalt:hover { opacity:.8; }
  .cph-umschalt:active { transform:scale(.98); }
  .cph-umschalt:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:2px; }
  /* "Ab heute" und "Spaeter": nur das Wort, ohne Linie dahinter (Manual: nie ein Strich mit Text als Label).
     Die Gruppen trennt der Abstand. */
  .cph-trenner { margin:8px 0; font-size:13px; font-weight:600; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  .cph-fuss { margin-top:8px; }

  /* ---- Kalender am Handy: Monat kompakt, darunter der gewaehlte Tag ---- */
  #view-kalender .cal-scroll { display:none; }
  .cph-monat { padding:16px 8px 8px; margin-bottom:16px; border-radius:20px; background:var(--bg-s1, #161616); border:1px solid var(--line-a100, rgba(255,255,255,0.1)); }
  .cph-monat-kopf { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 8px 8px; }
  .cph-monat-kopf h2 { font-size:17px; font-weight:700; color:var(--fg-1, #fff); }
  .cph-monat-kopf .knoepfe { display:flex; gap:8px; }
  .cph-rund { width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; border-radius:9999px; cursor:pointer;
    background:var(--bg-s2, #1f1f1f); color:var(--fg-1, #fff); border:1px solid var(--line-a100, rgba(255,255,255,0.1)); touch-action:manipulation;
    transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
  .cph-rund:hover { opacity:.8; }
  .cph-rund:active { transform:scale(.94); }
  .cph-rund:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:2px; }
  .cph-rund.text { width:auto; padding:0 16px; font-size:14px; font-weight:600; }
  .cph-wt { display:grid; grid-template-columns:repeat(7, 1fr); margin-bottom:4px; text-align:center; font-size:12px; font-weight:600; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  .cph-raster { display:grid; grid-template-columns:repeat(7, 1fr); }
  .cph-tagknopf { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:46px; padding:0;
    border-radius:12px; cursor:pointer; background:none; border:0; color:var(--fg-1, #fff); touch-action:manipulation; -webkit-tap-highlight-color:transparent;
    transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
  .cph-tagknopf:hover { opacity:.8; }
  .cph-tagknopf:active { transform:scale(.92); }
  .cph-tagknopf:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:-2px; }
  .cph-tagknopf .n { display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:30px; border-radius:9999px; font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; }
  .cph-tagknopf.fremd { visibility:hidden; }
  .cph-tagknopf.vorbei .n { color:var(--fg-a600, rgba(255,255,255,0.6)); }
  /* Heute: heller Kreis in Papier (--sel-bg, Moritz 18.11.2026, Variante A). Gewaehlter Tag: gefuellt
     in Tinte (der Tag, der unten steht); ist heute gewaehlt, gewinnt die Tinte.
     Hohl ist im Kalender nur der kleine Punkt "wartet auf deine Freigabe". */
  .cph-tagknopf.heute:not(.gewaehlt) .n { background:var(--sel-bg, #EDE8E5); }
  .cph-tagknopf.gewaehlt .n { background:var(--btn-primary-bg, #fff); color:var(--btn-primary-fg, #0A0708); font-weight:600; }
  .cph-legende-kreis { display:inline-block; width:8px; height:8px; margin:0 2px 1px 0; border-radius:50%; vertical-align:middle; box-shadow:inset 0 0 0 1.5px var(--fg-1, #fff); }
  .cph-punkte { display:flex; gap:3px; height:5px; }
  .cph-punkte i { width:5px; height:5px; border-radius:50%; background:var(--fg-a700, rgba(255,255,255,0.7)); }
  /* Ring: wartet auf deine Freigabe (wie die Hinweiszeile oben) */
  .cph-punkte { align-items:center; height:7px; }
  .cph-punkte { height:9px; }
  .cph-punkte i.dran { width:9px; height:9px; background:none; box-shadow:inset 0 0 0 2px var(--fg-1, #fff); }
  .cph-legende { padding:8px 8px 4px; font-size:13px; line-height:1.4; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  #cph-kalender .cph-karte, #cph-kalender .cph-leerzeile { scroll-margin-bottom:112px; }

  /* ---- Beitrag am Handy: ganzer Schirm, ueber der Handy-Leiste (z 120). IDs, weil der Seiten-Stil nach dieser Datei laedt. ---- */
  #detail-panel { z-index:130; }
  /* Zu ist zu: auch fuer Tastatur und VoiceOver, erst nach dem Wegschieben */
  #detail-panel:not(.open) { visibility:hidden; transition:transform .3s cubic-bezier(.16,1,.3,1), visibility 0s linear .3s; }
  #detail-panel.open { visibility:visible; }
  #panel-scrim { z-index:125; }
  body .modal-bg { z-index:140; padding:12px; }
  .modal-bg > .card { padding:24px 16px !important; max-height:calc(100dvh - 24px) !important; }
  .detail-panel > div { padding:0 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important; }
  .detail-panel.cph-lesen:has(.cph-leiste[data-leer="0"]) > div { padding-bottom:0 !important; }
  .cph-panelkopf { position:sticky; top:0; z-index:5; margin:0 -16px 16px !important; padding:calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
    background:var(--bg-s1, #161616); border-bottom:1px solid var(--line-a080, rgba(255,255,255,0.08)); align-items:center !important; }
  .cph-panelkopf h2 { font-size:18px !important; line-height:1.25 !important; text-transform:none !important; font-family:'Funnel Display',sans-serif !important; font-weight:700 !important; }
  .cph-panelkopf #dp-status-label { margin-bottom:2px !important; }
  /* Der Titel bekommt beim Oeffnen den Fokus (fuer VoiceOver), ist aber nichts zum Anklicken */
  #dp-title-display:focus { outline:none !important; }
  .cph-panelkopf button[aria-label="Schließen"] { width:44px !important; height:44px !important; }
  /* Notizen-Hinweis auf der Karte: dann stehen Aufgaben fuers Posten im Beitrag */
  .cph-stand { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  /* "mit Notizen": leise Zusatzinfo hinter dem Stand, kein zweiter Status und kein Knopf */
  .cph-stand { gap:4px; }
  .cph-notiz { font-size:13px; font-weight:500; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  /* Speichern-Leiste: Verwerfen neben Speichern */
  .detail-panel #dp-aktionen.offen #cph-verwerfen { display:inline-flex; }
  /* Gleiche Haelften wie die Leiste im Lesemodus */
  .detail-panel #dp-aktionen.offen > div { flex:1 1 auto; display:flex; gap:8px; }
  .detail-panel #dp-aktionen.offen > div > button:not([style*="display: none"]) { flex:1 1 0; min-height:48px; padding:0 8px; font-size:14px !important; }
  .detail-panel #dp-aktionen.offen #dp-save { justify-content:center; text-transform:none !important; letter-spacing:0 !important; font-family:'Funnel Display', sans-serif !important; font-weight:600 !important; }
  /* "Ungespeichert" sagen Speichern und die umrandeten Felder schon; Fehler bleiben sichtbar */
  .detail-panel #dp-aktionen.offen #dp-meta.offen { display:none; }
  /* Dialoge am Handy: Knoepfe fingergross */
  body .modal-bg .card button.btn { min-height:44px; font-size:12px !important; }
  /* Medium: so gross wie noetig, ohne schwarze Balken */
  #dp-media { margin:0 0 16px !important; background:none !important; border:0 !important; border-radius:0 !important; text-align:center; }
  #dp-media video, #dp-media img { display:block; margin:0 auto; max-width:100%; border-radius:16px; background:var(--surf-a080, rgba(255,255,255,0.08)); object-fit:cover !important; }
  #dp-media.cph-hoch video, #dp-media.cph-hoch img { height:min(44vh, 400px) !important; max-height:none !important; width:auto !important; aspect-ratio:9 / 16; }
  #dp-media:not(.cph-hoch) video, #dp-media:not(.cph-hoch) img { width:100% !important; height:auto !important; max-height:none !important; aspect-ratio:16 / 9; }
  .cph-sichern-inline { width:100%; margin-bottom:16px; }

  .cph-block { margin-bottom:24px; }
  .cph-block-kopf { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:8px; }
  .cph-block-kopf:has(button) { min-height:44px; }
  /* Ein Stil fuer alle Abschnittstitel im Beitrag, in beiden Themes (theme.js faerbt h3 im Hellen schwarz) */
  html .detail-panel h3.cph-block-titel, .cph-block-titel, .detail-panel .seclabel { font-size:13px !important; font-weight:700 !important; color:var(--fg-a600, rgba(255,255,255,0.6)) !important; }
  /* Fokus im Beitrag neutral: ein roter Rahmen um ein Feld liest sich wie ein Fehler */
  .detail-panel :focus-visible { outline-color:var(--fg-1, #fff) !important; }
  .cph-bearbeiten { scroll-margin-top:80px; }
  .cph-text { font-size:16px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--fg-1, #fff);
    padding:16px; border-radius:16px; background:var(--bg-s2, #1f1f1f); -webkit-user-select:text; user-select:text; }
  .cph-text.leer { color:var(--fg-a600, rgba(255,255,255,0.6)); font-size:15px; background:none; border:1.5px dashed var(--cph-strich); }

  /* Leiste unten: das, was jetzt zu tun ist */
  .cph-leiste { position:sticky; bottom:0; z-index:6; display:none; gap:8px; margin:24px -16px 0; padding:12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background:var(--bg-s1, #161616); border-top:1px solid var(--line-a100, rgba(255,255,255,0.1)); }
  .detail-panel.cph-lesen .cph-leiste[data-leer="0"]:not([hidden]) { display:flex; }
  /* Feste Haelften: kein Knopf wandert, wenn sich eine Beschriftung aendert ("Kopiert", "In Fotos sichern").
     Schmaler Innenabstand, damit "Post-Text kopieren" auch am iPhone SE passt. */
  .cph-leiste > * { flex:1 1 0; min-width:0; min-height:48px; }
  .cph-leiste .cph-kopieren { padding:0 6px; gap:4px; font-size:14px; letter-spacing:-0.005em; }
  .cph-leiste .cph-kopieren .material-symbols-outlined { font-size:18px; }
  /* Kleine Handys (iPhone SE, viele Android): ganze Worte gehen vor Symbolen */
  @media (max-width:400px) { .cph-leiste .cph-kopieren > .material-symbols-outlined { display:none; } .cph-leiste .cph-kopieren { padding:0 10px; }
    .cph-leiste .cph-kopieren.ok > .material-symbols-outlined { display:inline-block; } }
  /* Meldung hebt sich von den Textflaechen ab (sonst gleiche Flaeche wie der Post-Text): mit Kontur statt Schatten (CI v1.1) */
  #toast:not(.fehler) { background:#2a2a2a !important; box-shadow:inset 0 0 0 1px rgba(244,244,244,0.2) !important; }
  /* Offene Tastatur: Leisten bleiben darueber (--tastatur aus visualViewport, contentplan-handy.js) */
  .cph-leiste, .detail-panel #dp-aktionen.offen { bottom:var(--tastatur, 0px) !important; }
  /* Rueckmeldung bei offenem Beitrag ueber der Leiste, beim Daumen, nicht oben ueber dem Titel */
  /* Meldung: so breit wie ihr Text, hoechstens Bildschirm minus Rand. Mit left:50% allein schrumpfte sie
     auf die halbe Breite und brach ohne Not um. */
  #toast { left:16px !important; right:16px !important; transform:none !important; width:max-content; max-width:calc(100vw - 32px); margin:0 auto; text-align:center; }
  body:has(#detail-panel.open) #toast { top:auto !important; bottom:calc(84px + var(--tastatur, 0px) + env(safe-area-inset-bottom, 0px)) !important; }
  .cph-leiste .cph-kopieren > span:last-child { overflow:hidden; text-overflow:ellipsis; }
  /* Das Theme blendet Flaechen beim Hell/Dunkel-Wechsel 0,4 s ueber. Klebende Leisten wuerden
     beim Auftauchen sonst kurz durchscheinen. */
  #dp-aktionen, .cph-leiste, .cph-panelkopf, .cph-tagkopf { transition:none !important; }

  /* Freigabe: neutrale Hinweisflaeche ohne Rahmen. Im Lesemodus stehen die Knoepfe in der Leiste unten. */
  #dp-approve-box { background:var(--bg-s2, #1f1f1f) !important; border:0 !important; padding:16px !important; margin-bottom:24px !important; }
  /* Freigeben und Aenderung wuenschen gibt es am Handy nur in der Leiste (mit Rueckgaengig), auch
     beim Bearbeiten. Dort sagt der Kasten, wie man zurueckkommt. */
  .detail-panel #dp-approve-box > .flex, .detail-panel #rp-korrektur > button { display:none !important; }
  .detail-panel:not(.cph-lesen) .cph-freigabe-hinweis { display:block; margin-top:8px; font-size:14px; font-weight:600; color:var(--fg-1, #fff); }
  #dp-approve-box button { min-height:44px; }
  #dp-approve-box button.bg-s2 { color:var(--fg-1, #fff) !important; }
  #rp-korrektur > button { background:var(--btn-primary-bg, #fff) !important; color:var(--btn-primary-fg, #0A0708) !important; }
  #rp-korrektur { scroll-margin-bottom:96px; }

  .cph-bearbeiten { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:48px; margin:0 0 24px; border-radius:9999px;
    font-size:15px; font-weight:600; cursor:pointer; color:var(--fg-1, #fff); background:none; border:1px solid var(--line-a150, rgba(255,255,255,0.15));
    touch-action:manipulation; transition:transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
  .cph-bearbeiten .material-symbols-outlined { font-size:18px; }
  .cph-bearbeiten .pfeil { transition:transform .2s cubic-bezier(.16,1,.3,1); }
  .cph-bearbeiten[aria-expanded="true"] .pfeil { transform:rotate(180deg); }
  .cph-bearbeiten:hover { opacity:.8; }
  .cph-bearbeiten:active { transform:scale(.98); }
  .cph-bearbeiten:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:2px; }
  .detail-panel.cph-lesen #rp-panel-info,
  .detail-panel.cph-lesen #dp-felder,
  .detail-panel.cph-lesen #dp-status-row,
  .detail-panel.cph-lesen #dp-aktionen:not(.offen) { display:none !important; }
  .detail-panel #rp-panel-info { display:none !important; }
  .cph-formhinweis { margin:-8px 0 16px; font-size:14px; line-height:1.4; color:var(--fg-a600, rgba(255,255,255,0.6)); }
  .detail-panel.cph-lesen .cph-formhinweis { display:none !important; }

  /* Formular: Reihenfolge wie beim Lesen. Post-Text zuerst (das Feld, das Kunden am ehesten aendern),
     dann Briefing und Termin, danach der Rest. */
  #dp-felder { display:flex; flex-direction:column; gap:16px; }
  #dp-felder > * { margin-top:0 !important; margin-bottom:0 !important; }
  #dp-felder > div:has(#dp-caption) { order:-3; }
  #dp-felder > div:has(#dp-desc) { order:-2; }
  #dp-felder > div:has(#dp-date) { order:-1; }
  html:not([data-theme="light"]) .detail-panel .field { color-scheme:dark; }
  .detail-panel textarea.field { resize:none; overflow-y:auto; }
  .detail-panel .field::placeholder { color:var(--fg-a500, rgba(255,255,255,0.5)); }
  .detail-panel #dp-meta:not(.offen):not(.ok):not(.fehler) { display:none; }
  .detail-panel #dp-aktionen.offen { bottom:0; margin:0 -16px 16px; padding:12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .detail-panel #dp-aktionen button { min-height:44px; }

  /* Kommentare: leere Zustaende lesbar, Senden erst gefuellt, wenn etwas drinsteht */
  #dp-comments > p, #dp-timeline > p { color:var(--fg-a600, rgba(255,255,255,0.6)) !important; }
  /* Leerer Verlauf sagt nichts: ausblenden */
  .detail-panel p.seclabel:has(+ #dp-timeline > p:only-child), #dp-timeline:has(> p:only-child) { display:none !important; }
  .cph-panelkopf #dp-status-label.cph-dran, .cph-panelkopf #dp-status-label.cph-dran * { color:var(--fg-1, #fff) !important; font-size:14px !important; }
  .detail-panel #dp-comment-input { min-height:44px; }
  #dp-comment-input:placeholder-shown + button { background:var(--bg-s2, #1f1f1f) !important; box-shadow:inset 0 0 0 1px var(--line-a150, rgba(255,255,255,0.15)); }
  #dp-comment-input:placeholder-shown + button .material-symbols-outlined { color:var(--fg-a600, rgba(255,255,255,0.6)) !important; }

  /* ---- Rechte Spalte unter der Liste ---- */
  #pool-list .chip { min-height:44px; padding:8px 12px; font-size:14px; border-radius:12px; }
  #pool-list .chip .material-symbols-outlined { font-size:16px !important; }
  #pool-hint, .rp-tipp { font-size:13px !important; }
  .rp-liste-karte .rp-umschalter button { min-height:40px; }
  .rp-liste-karte .rp-umschalter button.an { background:var(--l-card, var(--bg-s4, #333)); color:var(--fg-1, #fff); box-shadow:inset 0 0 0 1.5px var(--fg-a700, rgba(255,255,255,0.7)); }
  /* Leere Bereiche weg: Nullen helfen am Handy niemandem */
  #rp-karte:not(:has(.rp-asset)), #pool-aside > .card:has(#pool-list:empty) { display:none !important; }
  #rp-aelter, #rp-mehr { min-height:44px; }
  /* Sprachschalter nicht ueber dem Schliessen-Knopf der Beitrags-Ansicht */
  body:has(#detail-panel.open) #vl-lang.vl-lang-fix { display:none; }
}

/* ---- Laptop: Schublade mit Terminzeile oben und fester Freigabe-Leiste unten ----
   Gleiche Leiste wie am Handy (contentplan-handy.js, leisteZeichnen), nur wenn der Beitrag auf die
   eigene Freigabe wartet. Sie klebt unten in der Schublade, Freigeben bleibt so im ersten Bildschirm,
   auch wenn ein Check aufgeklappt ist. Die Knoepfe im Freigabe-Kasten weichen ihr (keine doppelten). */
@media (min-width:768px) {
  .cph-wann { margin:-8px 0 20px; }
  #dp-status-label.cph-dran, #dp-status-label.cph-dran * { color:var(--fg-1, #fff) !important; font-size:13px !important; font-weight:600; }
  /* Fuer Lesende stand Kanal, Format und Termin in der Info-Zeile, jetzt oben */
  #detail-panel:has(#cph-wann) .rp-panel-zeile { display:none; }
  .cph-leiste.cph-leiste-breit[data-leer="0"]:not([hidden]) { display:flex; position:sticky; bottom:0; z-index:6; gap:8px; margin:8px -28px 0; padding:16px 28px;
    background:var(--bg-s1, #161616); border-top:1px solid var(--line-a100, rgba(255,255,255,0.1)); }
  /* Hauptknopf nimmt den Rest, der Zweitknopf so breit wie sein Wort (480 px Schublade, "Änderung wünschen" ganz) */
  .cph-leiste-breit > * { flex:1 1 auto; min-width:0; min-height:48px; }
  .cph-leiste-breit > .cph-kopieren.leise { flex:0 1 auto; }
  .cph-leiste-breit .cph-kopieren { gap:6px; padding:0 18px; font-size:15px; }
  .cph-leiste-breit .cph-kopieren .material-symbols-outlined { font-size:18px; }
  .cph-leiste-breit .cph-kopieren > span:last-child { overflow:hidden; text-overflow:ellipsis; }
  .detail-panel:has(.cph-leiste-breit[data-leer="0"]:not([hidden])) > div { padding-bottom:0 !important; }
  .detail-panel:has(.cph-leiste-breit[data-leer="0"]:not([hidden])) #dp-approve-box > .flex,
  .detail-panel:has(.cph-leiste-breit[data-leer="0"]:not([hidden])) #rp-korrektur > button { display:none !important; }
  #rp-korrektur { scroll-margin-bottom:96px; }
  #cph-leiste, .cph-wann, .cph-termin { transition:none !important; }
}

@media (max-width:767px) and (prefers-reduced-motion:reduce) {
  .cph-karte-haupt, .cph-umschalt, .cph-rund, .cph-tagknopf, .cph-bearbeiten, .cph-bearbeiten .pfeil, .cph-kopieren, .cph-frueher { transition:none !important; animation:none !important; }
  .cph-karte-haupt:active, .cph-tagknopf:active, .cph-kopieren:active, .cph-rund:active, .cph-umschalt:active, .cph-bearbeiten:active, .cph-frueher:active { transform:none; }
  .cph-kopieren.ok .material-symbols-outlined { animation:none; }
  .cph-ablauf { animation:none; }
}
