/* =========================================================
   POLITIQ Portal – App-Oberfläche (baut auf pq-base.css auf)
   Bewegung nur transform/opacity, ease-out var(--pq-ease).
   ========================================================= */

html.pq-portal-html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--pq-fill); }
body.pq-portal-body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--pq-fill); overscroll-behavior-y: none; }
.pq-portal-body.is-locked { overflow: hidden; }
.pq-ui button { font-family: inherit; }
.pq-ui [hidden] { display: none !important; }
.pq-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pq-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pq-link { color: var(--pq-blue); font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .pq-link:hover { text-decoration: underline; } }
.pq-optional { font-style: normal; font-weight: 500; color: var(--pq-muted); font-size: 13px; margin-left: 4px; }
.pq-text-danger { color: var(--pq-red) !important; }
.pq-inset { margin: 0 16px; }

/* Wortmarke */
.pq-wordmark { font-weight: 800; letter-spacing: .2em; font-size: 20px; color: var(--pq-navy); display: inline-flex; align-items: baseline; gap: 8px; }
.pq-wordmark span { font-weight: 600; letter-spacing: 0; font-size: 15px; color: var(--pq-muted); }
.pq-wordmark--small { font-size: 16px; }
.pq-wordmark--small span { font-size: 13px; }

/* Runde Icon-Buttons */
.pq-icon-btn {
  -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: var(--pq-blue); cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; text-decoration: none;
  transition: background-color .15s ease, transform 160ms var(--pq-ease); -webkit-tap-highlight-color: transparent;
}
.pq-icon-btn:active { transform: scale(0.94); background: var(--pq-fill); }
@media (hover: hover) and (pointer: fine) { .pq-icon-btn:hover { background: rgba(70, 113, 159, .08); } }

/* ---------- Anmelden ---------- */
.pq-auth {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: calc(32px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.pq-auth-card { width: 100%; max-width: 400px; animation: pq-rise 500ms var(--pq-ease) both; }
.pq-auth-card .pq-wordmark { margin-bottom: 36px; }
.pq-auth-lead { margin: 10px 0 24px; }
.pq-auth-form { display: grid; gap: 14px; }
.pq-auth-remember { font-size: 15px; color: var(--pq-muted); padding: 2px 4px; min-height: 32px; align-items: center; }
.pq-auth-alt { text-align: center; margin: 18px 0 0; }
.pq-auth-alt .pq-link { display: inline-block; padding: 12px; }
.pq-auth-foot { font-size: 13px; color: var(--pq-muted); margin: 0; }
.pq-auth-foot .pq-link { font-weight: 500; }
@keyframes pq-rise { from { opacity: 0; transform: translateY(12px); } }

/* Gruppierte Eingabefelder wie in iOS-Einstellungen */
.pq-group { background: #fff; border-radius: 14px; box-shadow: var(--pq-shadow); overflow: hidden; }
.pq-group-row { display: block; position: relative; }
.pq-group-row + .pq-group-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--pq-line); z-index: 1; }
.pq-ui .pq-group input { border: 0; border-radius: 0; min-height: 54px; padding: 15px 16px; background: transparent; box-shadow: none; }
.pq-ui .pq-group input:focus { box-shadow: inset 0 0 0 2px rgba(70, 113, 159, .35); }

.pq-notice { padding: 12px 14px; border-radius: 12px; font-size: 15px; margin: 0 0 18px; }
.pq-notice--error { background: #fdecef; color: #9b1c2e; }
.pq-notice--ok { background: #e3f3e9; color: #17603a; }
.pq-notice--info { background: #fdf6dc; color: #6b5300; }

/* ---------- App-Rahmen ---------- */
.pq-app { min-height: 100vh; min-height: 100dvh; }
.pq-main {
  max-width: 760px; margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* Kompakte Titelleiste: erscheint, wenn der große Titel wegscrollt */
.pq-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: calc(44px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: rgba(242, 241, 238, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(17, 27, 44, .08); opacity: 0; transition: opacity 200ms ease;
}
.pq-topbar.is-on { opacity: 1; }
.pq-topbar-title { font-size: 17px; font-weight: 600; color: var(--pq-ink); transform: translateY(4px); transition: transform 300ms var(--pq-ease); }
.pq-topbar.is-on .pq-topbar-title { transform: none; }

.pq-panel-head { padding: calc(28px + env(safe-area-inset-top)) 0 14px; }
.pq-panel-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pq-panel-head .pq-large-title { overflow-wrap: anywhere; }
.pq-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -8px 0 4px -8px; padding: 0 8px; color: var(--pq-blue); font-weight: 500; text-decoration: none; font-size: 17px; }
.pq-back .pq-icon { width: 22px; height: 22px; stroke-width: 2.2; }
.pq-panel { animation: pq-fade 200ms ease; }
@keyframes pq-fade { from { opacity: 0; } }

/* Plus-Button oben rechts */
.pq-add-btn {
  -webkit-appearance: none; border: 0; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 44px; height: 44px; border-radius: 22px; background: var(--pq-navy); color: #fff; font: 600 15px/1 var(--pq-font);
  transition: transform 160ms var(--pq-ease), background-color .15s ease; -webkit-tap-highlight-color: transparent;
}
.pq-add-btn .pq-icon { width: 22px; height: 22px; stroke-width: 2.2; }
.pq-add-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pq-add-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .pq-add-btn:hover { background: var(--pq-navy-deep); } }
@media (min-width: 600px) {
  .pq-add-btn { width: auto; padding: 0 18px 0 14px; }
  .pq-add-btn span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* Admin: Kundenauswahl */
.pq-switcher {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: calc(12px + env(safe-area-inset-top)) 0 -12px;
  padding: 8px 8px 8px 14px; background: #fff; border-radius: 14px; box-shadow: var(--pq-shadow);
}
.pq-switcher-label { font-size: 13px; font-weight: 600; color: var(--pq-muted); }
.pq-ui .pq-switcher select { flex: 1; min-width: 160px; width: auto; min-height: 40px; padding: 8px 10px; border: 0; background: var(--pq-fill); }
.pq-switcher + .pq-panel .pq-panel-head { padding-top: 22px; }

/* Team: offene Vereinbarung (verschoben) – roter Banner, bleibt beim Scrollen oben */
.pq-agree-bar {
  position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 55;
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: calc(12px + env(safe-area-inset-top)) 0 -12px;
  padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--pq-red); color: #fff; font-size: 15px; line-height: 1.35;
  box-shadow: 0 6px 20px rgba(215, 38, 61, .28);
}
.pq-agree-bar > .pq-icon { width: 22px; height: 22px; flex: none; }
.pq-agree-bar > span { flex: 1; min-width: 200px; }
.pq-agree-bar .pq-btn { background: #fff; color: var(--pq-red); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .pq-agree-bar .pq-btn:hover { background: #fdecef; } }
.pq-agree-bar + .pq-panel .pq-panel-head { padding-top: 22px; }

/* Tab-Leiste unten (mobil) */
.pq-app-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
.pq-app-tabbar .pq-tab { transition: color .15s ease, transform 160ms var(--pq-ease); }
.pq-app-tabbar .pq-tab:active { transform: scale(0.94); }
.pq-tab .pq-icon { width: 26px; height: 26px; }

/* Sidebar (Desktop) */
.pq-side { display: none; }
@media (min-width: 900px) {
  .pq-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .pq-app-tabbar { display: none; }
  .pq-side {
    display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; padding: 28px 16px 20px;
    background: rgba(251, 250, 248, .7); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border-right: 1px solid rgba(17, 27, 44, .07);
  }
  .pq-side .pq-wordmark { padding: 0 12px; }
  .pq-side-nav { display: grid; gap: 2px; }
  .pq-side-link {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px;
    color: var(--pq-text); text-decoration: none; font-weight: 600; font-size: 15px; transition: background-color .15s ease;
  }
  .pq-side-link .pq-icon { color: var(--pq-blue); width: 22px; height: 22px; }
  .pq-side-link .pq-badge { margin-left: auto; }
  .pq-side-link.is-active { background: var(--pq-navy); color: #fff; }
  .pq-side-link.is-active .pq-icon { color: #fff; }
  .pq-side-link:active { transform: scale(0.98); }
  .pq-side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 4px 0 12px; border-top: 1px solid var(--pq-line); }
  .pq-side-user .pq-avatar { width: 36px; height: 36px; font-size: 14px; }
  .pq-side-user-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
  .pq-side-user-name small { display: block; font-weight: 500; color: var(--pq-muted); font-size: 12px; }
  .pq-main { padding: 0 40px 64px; }
  .pq-topbar { display: none; }
  .pq-panel-head { padding-top: 48px; }
  .pq-switcher { margin-top: 24px; }
  .pq-agree-bar { margin-top: 24px; top: 16px; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .pq-side-link:not(.is-active):hover { background: rgba(17, 27, 44, .05); }
}

/* ---------- Listen ---------- */
.pq-ui ul.pq-list { list-style: none; }
.pq-list > li { position: relative; }
.pq-list > li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--pq-line); z-index: 1; }
button.pq-row { -webkit-appearance: none; appearance: none; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a.pq-row { -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { button.pq-row:hover { background: #faf9f7; } }
.pq-row-main { display: grid; gap: 2px; }
.pq-row-end { display: grid; justify-items: end; gap: 4px; flex: none; }
.pq-row-chip { margin-top: 4px; }
.pq-row-chip .pq-chip { height: 24px; font-size: 12px; padding: 0 10px; }
.pq-row-icon { color: var(--pq-blue); display: grid; place-items: center; flex: none; }
.pq-row-icon--tint, .pq-row-icon--danger { width: 32px; height: 32px; border-radius: 8px; background: var(--pq-navy); color: #fff; }
.pq-row-icon--tint .pq-icon, .pq-row-icon--danger .pq-icon { width: 20px; height: 20px; }
.pq-row-icon--danger { background: var(--pq-red); }
.pq-row .pq-row-chevron { flex: none; }
.pq-list--past { opacity: .72; }
.pq-section-title--big { font-size: 20px; text-transform: none; letter-spacing: -0.02em; color: var(--pq-ink); font-weight: 700; margin: 36px 0 4px; }
.pq-section-title--big + .pq-section-title { margin-top: 10px; }

/* Segmented Control in voller Breite */
.pq-seg--full { display: grid; width: 100%; margin: 0 0 18px; }
.pq-seg button { min-height: 36px; }
.pq-seg-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: rgba(17, 27, 44, .08); font-size: 12px; line-height: 18px; }
.pq-seg label { position: relative; padding: 0; display: grid; }
.pq-seg label span { display: grid; place-items: center; min-height: 36px; padding: 6px 10px; border-radius: 9px; transition: background-color .2s var(--pq-ease), box-shadow .2s var(--pq-ease); }
.pq-seg input:focus-visible + span { outline: 2px solid var(--pq-blue); outline-offset: 1px; }
.pq-seg--wrap { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .pq-seg--wrap { grid-auto-flow: column; grid-template-columns: none; } }

/* Freigaben: Vorschaubild */
.pq-thumb { position: relative; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex: none; background: linear-gradient(135deg, #e6eef7, #fde6f0); }
.pq-thumb img, .pq-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pq-thumb--ig_reel, .pq-thumb--tiktok { width: 44px; height: 64px; border-radius: 10px; margin: 0 6px; }
.pq-thumb-play { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; color: #fff; fill: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.pq-thumb-count { position: absolute; right: 4px; top: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(17, 27, 44, .7); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pq-row--item { align-items: center; }

/* ---------- Sheet ---------- */
.pq-sheet { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); will-change: transform; touch-action: pan-y; }
@media (max-width: 899px) { .pq-sheet { width: 100%; } }
.pq-sheet.is-dragging { transition: none; }
.pq-sheet-grabber { position: sticky; top: 0; margin: 0 -16px; padding: 8px 16px 10px; width: auto; height: auto; background: var(--pq-paper); z-index: 3; cursor: grab; }
.pq-sheet-grabber::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #cfcdc8; margin: 0 auto; }
.pq-sheet-head { position: sticky; top: 22px; margin: 0 -16px; padding-left: 16px !important; padding-right: 16px !important; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 0 12px; background: var(--pq-paper); }
.pq-sheet-head-main { min-width: 0; padding-top: 6px; }
.pq-sheet-head .pq-icon-btn { margin: -2px -10px 0 0; color: var(--pq-muted); background: var(--pq-fill); width: 36px; height: 36px; box-shadow: 0 0 0 4px var(--pq-paper); }
.pq-sheet-head .pq-icon-btn .pq-icon { width: 18px; height: 18px; stroke-width: 2.4; }
.pq-sheet-head .pq-title { overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .pq-sheet { padding: 0 28px 28px; }
  .pq-sheet-grabber { display: block; padding: 0 28px; margin: 0 -28px; height: 20px; }
  .pq-sheet-grabber::before { display: none; }
  .pq-sheet-head { top: 20px; margin: 0 -28px; padding-left: 28px !important; padding-right: 28px !important; }
}

/* Formulare im Sheet */
.pq-form { display: grid; gap: 4px; }
.pq-form .pq-field > span { display: flex; align-items: baseline; }
.pq-form-for { margin: -6px 0 14px; }
.pq-field-row { display: grid; gap: 0 12px; }
@media (min-width: 520px) { .pq-field-row { grid-template-columns: 1fr 1fr; } }
.pq-counter { justify-self: end; font-size: 12px; color: var(--pq-muted); font-variant-numeric: tabular-nums; }
.pq-drop { position: relative; display: block; border: 1.5px dashed #c9c7c1; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.pq-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pq-drop-inner { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; text-align: center; color: var(--pq-muted); pointer-events: none; }
.pq-drop-inner .pq-icon { width: 28px; height: 28px; color: var(--pq-blue); }
.pq-drop-inner strong { color: var(--pq-navy); }
.pq-drop.is-over, .pq-drop:focus-within { border-color: var(--pq-blue); background: #f4f8fc; }
.pq-media-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.pq-media-preview:empty { display: none; }
.pq-media-preview figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--pq-stone); animation: pq-pop 300ms var(--pq-ease) both; }
.pq-media-preview img, .pq-media-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pq-media-preview figcaption { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(17, 27, 44, .7); color: #fff; font-size: 11px; font-weight: 700; }
@keyframes pq-pop { from { opacity: 0; transform: scale(.94); } }

.pq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pq-chips button.pq-chip { -webkit-appearance: none; border: 0; cursor: pointer; height: 34px; padding: 0 14px; font-family: inherit; transition: background-color .15s ease, color .15s ease, transform 160ms var(--pq-ease); }
.pq-chips button.pq-chip:active { transform: scale(0.96); }
.pq-chips button.pq-chip.is-active { background: var(--pq-navy); color: #fff; }
.pq-chip-radio { position: relative; cursor: pointer; }
.pq-chip-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.pq-chip-radio .pq-chip { height: 36px; padding: 0 16px; transition: background-color .15s ease, color .15s ease; }
.pq-chip-radio input:checked + .pq-chip { background: var(--pq-navy); color: #fff; }
.pq-chip-radio input:focus-visible + .pq-chip { outline: 2px solid var(--pq-blue); outline-offset: 2px; }

/* ---------- Freigabe-Detail ---------- */
.pq-item { display: grid; gap: 14px; }
.pq-item-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: -6px; }
.pq-preview { --pv-text: #111; margin: 0 auto; width: 100%; user-select: none; -webkit-user-select: none; }
.pq-preview textarea { user-select: text; -webkit-user-select: text; }
.pq-item-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-bottom: calc(-24px - env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(251, 250, 248, 0), var(--pq-paper) 30%); z-index: 2; }
.pq-item-actions .pq-btn--block { grid-column: 1 / -1; }
.pq-item-actions .pq-btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.pq-item-note { margin: 0; }
.pq-item-feedback { box-shadow: none; background: #fff; border: 1px solid var(--pq-line); }
.pq-item-feedback p { margin: 4px 0 0; }
.pq-item-wait { text-align: center; }
.pq-item-retention { text-align: center; margin: 4px 0 0; }
.pq-item-history { border-top: 1px solid var(--pq-line); padding-top: 12px; }
.pq-item-history ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--pq-muted); }
.pq-media-gone { display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--pq-muted); background: var(--pq-stone); font-size: 14px; line-height: 1.4; width: 100%; height: 100%; box-sizing: border-box; }
.pq-media-gone .pq-icon { width: 28px; height: 28px; }
.pq-li-gone { aspect-ratio: 16 / 9; height: auto; }
.pq-revise-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pq-revise-list:empty { display: none; }
.pq-revise-list li { display: grid; gap: 4px; }
.pq-revise-thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--pq-stone); }
.pq-revise-thumb img, .pq-revise-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pq-revise-thumb small { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(17, 27, 44, .7); color: #fff; font-size: 11px; font-weight: 700; }
.pq-revise-list li.is-new .pq-revise-thumb { outline: 2px solid var(--pq-blue); outline-offset: -2px; }
.pq-revise-actions { display: flex; justify-content: space-between; }
.pq-revise-actions .pq-icon-btn { width: 30px; height: 30px; }
.pq-revise-actions .pq-icon { width: 16px; height: 16px; }
.pq-cap-tools { display: flex; justify-content: space-between; align-items: center; min-height: 36px; margin-top: -6px; font-variant-numeric: tabular-nums; }
.pq-cap-tools .is-over { color: var(--pq-red); font-weight: 600; }

/* Bearbeitbarer Text: sieht aus wie die Caption der Plattform */
.pq-ui textarea.pq-cap {
  display: block; width: 100%; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 4px; background: transparent; box-shadow: none;
  font: inherit; color: inherit; line-height: inherit; resize: none; overflow: hidden;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.pq-ui textarea.pq-cap:not([readonly]) { cursor: text; }
.pq-ui textarea.pq-cap:not([readonly]):focus { background: rgba(70, 113, 159, .07); box-shadow: 0 0 0 4px rgba(70, 113, 159, .07); }
.pq-ui textarea.pq-cap:not([readonly]):not(:focus) { background-image: linear-gradient(to right, rgba(70, 113, 159, .35) 50%, transparent 0); background-size: 6px 1px; background-repeat: repeat-x; background-position: 0 100%; }

/* Instagram-Post */
.pq-ig { max-width: 470px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--pq-shadow); color: #0f0f0f; font-size: 14px; line-height: 1.4; }
.pq-ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pq-ig-ring { width: 36px; height: 36px; padding: 2px; border-radius: 50%; background: conic-gradient(from 210deg, #f2b84b, #ef5a9b, #8f5cf0, #f2b84b); flex: none; }
.pq-ig-avatar { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; background: var(--pq-navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pq-ig-user { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.pq-ig-user strong { font-weight: 600; font-size: 14px; }
.pq-ig-user small { color: #737373; font-size: 12px; }
.pq-ig-more { width: 22px; height: 22px; }
.pq-ig-media { position: relative; background: #000; }
.pq-ig-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.pq-ig-track::-webkit-scrollbar { display: none; }
.pq-ig-slide { position: relative; flex: 0 0 100%; aspect-ratio: 4 / 5; scroll-snap-align: start; scroll-snap-stop: always; }
.pq-ig-slide img, .pq-ig-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pq-ig-empty { display: grid; place-items: center; color: #aaa; aspect-ratio: 1; }
.pq-ig-counter { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 12px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pq-ig-actions { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 12px 6px; }
.pq-ig-actions .pq-icon { width: 25px; height: 25px; stroke-width: 1.7; }
.pq-ig-save { margin-left: auto; }
.pq-dots { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 4px; }
.pq-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; transition: background-color .2s ease, transform .2s var(--pq-ease); }
.pq-dots i.is-on { background: #3897f0; transform: scale(1.1); }
.pq-ig-caption { padding: 0 12px 14px; }
.pq-ig-caption > strong { font-weight: 600; margin-right: 4px; float: left; }
.pq-cap-wrap { position: relative; }
.pq-cap--ig { font-size: 16px !important; line-height: 1.4 !important; text-indent: 0; }
.pq-cap-wrap.is-clamped textarea { max-height: calc(1.4em * 2); }
.pq-cap-more { position: absolute; right: 0; bottom: 0; border: 0; padding: 0 0 0 28px; background: linear-gradient(to right, rgba(255,255,255,0), #fff 40%); color: #737373; font: inherit; font-size: 15px; cursor: pointer; min-height: 22px; }
.pq-ig-time { display: block; clear: both; color: #737373; font-size: 11px; letter-spacing: .02em; margin-top: 6px; text-transform: uppercase; }

/* Reel / TikTok: Handy-Rahmen 9:16 */
.pq-phone { display: grid; justify-items: center; gap: 8px; }
.pq-phone-screen {
  position: relative; height: min(68vh, 640px); aspect-ratio: 9 / 16; max-width: 100%; border-radius: 28px; overflow: hidden; background: #000; color: #fff;
  box-shadow: 0 0 0 6px #1b1b1d, 0 0 0 7px #3a3a3e, 0 24px 48px -20px rgba(17, 27, 44, .5); margin: 7px;
}
.pq-phone-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pq-phone-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0) 18%, rgba(0,0,0,0) 55%, rgba(0,0,0,.6)); }
.pq-phone-top { position: absolute; z-index: 2; top: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pq-phone--ig_reel .pq-phone-top { justify-content: flex-start; padding-left: 16px; font-size: 20px; }
.pq-phone-top span { opacity: .7; }
.pq-phone-top strong { font-weight: 700; }
.pq-phone--tiktok .pq-phone-top strong { border-bottom: 2px solid #fff; padding-bottom: 3px; }
.pq-phone-side { position: absolute; z-index: 3; right: 8px; bottom: 96px; display: grid; justify-items: center; gap: 16px; pointer-events: none; }
.pq-phone-side span { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pq-phone-side .pq-icon { width: 28px; height: 28px; stroke-width: 1.8; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pq-phone-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; background: var(--pq-navy); display: grid !important; place-items: center; font-weight: 700; font-size: 15px; }
.pq-phone-avatar--sm { width: 30px; height: 30px; font-size: 12px; border-width: 1.5px; }
.pq-phone-disc { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle, #555 0 22%, #222 23% 100%); border: 6px solid #2a2a2a; }
.pq-phone-bottom { position: absolute; z-index: 4; left: 12px; right: 64px; bottom: 16px; display: grid; gap: 6px; font-size: 14px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.pq-phone-user { display: flex; align-items: center; gap: 8px; }
.pq-phone-user strong { font-weight: 700; font-size: 15px; }
.pq-phone-follow { border: 1px solid rgba(255,255,255,.8); border-radius: 8px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.pq-cap--phone { font-size: 16px !important; line-height: 1.35 !important; color: #fff !important; max-height: 7.2em; overflow-y: auto !important; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pq-ui .pq-cap--phone::placeholder { color: rgba(255,255,255,.7); }
.pq-ui textarea.pq-cap--phone:not([readonly]):focus { background: rgba(0, 0, 0, .45); box-shadow: 0 0 0 6px rgba(0, 0, 0, .45); }
.pq-ui textarea.pq-cap--phone:not([readonly]):not(:focus) { background-image: linear-gradient(to right, rgba(255,255,255,.55) 50%, transparent 0); }
.pq-phone-sound { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pq-phone-sound .pq-icon { width: 15px; height: 15px; }
.pq-phone-sound span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-phone-tap { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pq-phone-hint {
  position: absolute; z-index: 2; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px;
  background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; pointer-events: none;
  transform: translate(-50%, -50%); transition: opacity 250ms ease, transform 250ms var(--pq-ease);
}
.pq-phone-hint .pq-icon { width: 18px; height: 18px; }
.pq-phone-hint.is-off { opacity: 0; transform: translate(-50%, -50%) scale(.92); }
.pq-phone-label { margin: 0; font-size: 12px; color: var(--pq-muted); font-weight: 600; }

/* Ton-Schalter für Videos im Feed */
.pq-mute { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pq-mute .pq-icon { width: 16px; height: 16px; grid-area: 1 / 1; }
.pq-mute .pq-mute-on, .pq-mute.is-on .pq-mute-off { display: none; }
.pq-mute.is-on .pq-mute-on { display: block; }

/* LinkedIn-Beitrag */
.pq-li { max-width: 555px; background: #fff; border-radius: 10px; box-shadow: var(--pq-shadow); color: rgba(0,0,0,.9); font-size: 14px; line-height: 1.43; overflow: hidden; }
.pq-li-head { display: flex; gap: 8px; padding: 12px 16px 0; }
.pq-li-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--pq-navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.pq-li-user { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pq-li-user strong { font-weight: 600; font-size: 14px; }
.pq-li-user small { color: rgba(0,0,0,.6); font-size: 12px; display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-li-globe { width: 13px; height: 13px; }
.pq-li-more { width: 22px; height: 22px; color: rgba(0,0,0,.6); }
.pq-li-text { padding: 10px 16px 12px; }
.pq-cap--li { font-size: 16px !important; line-height: 1.43 !important; }
.pq-li-media { display: grid; gap: 2px; background: #f3f2ef; }
.pq-li-media--2 { grid-template-columns: 1fr 1fr; }
.pq-li-media--3 { grid-template-columns: 1fr 1fr; }
.pq-li-media--3 .pq-li-cell:first-child { grid-column: 1 / -1; }
.pq-li-cell { position: relative; }
.pq-li-cell img, .pq-li-cell video { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.pq-li-media--2 img, .pq-li-media--3 img, .pq-li-media--2 video, .pq-li-media--3 video { aspect-ratio: 1; height: 100%; }
.pq-li-media--3 .pq-li-cell:first-child img { aspect-ratio: 16 / 9; }
.pq-li-more-count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 28px; font-weight: 600; }
.pq-li-stats { padding: 8px 16px; color: rgba(0,0,0,.6); font-size: 12px; border-bottom: 1px solid #e8e8e8; margin: 0 0 0; }
.pq-li-actions { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 8px; }
.pq-li-actions span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; color: rgba(0,0,0,.6); font-weight: 600; font-size: 13px; }
.pq-li-actions .pq-icon { width: 20px; height: 20px; }
@media (max-width: 420px) { .pq-li-actions span { flex-direction: column; gap: 0; font-size: 11px; } }

/* ---------- Nachrichten ---------- */
.pq-thread-people { margin: -6px 0 12px; }
.pq-thread { display: flex; flex-direction: column; min-height: calc(100vh - 230px - env(safe-area-inset-bottom)); min-height: calc(100dvh - 230px - env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .pq-thread { min-height: calc(100dvh - 200px); } }
.pq-thread-list { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 8px 0 16px; }
.pq-thread-empty { text-align: center; padding: 40px 16px; }
.pq-day { align-self: center; margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: var(--pq-muted); }
.pq-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; animation: pq-msg-in 320ms var(--pq-ease) both; }
.pq-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.pq-msg-from { font-size: 12px; color: var(--pq-muted); margin: 8px 12px 2px; }
.pq-msg-bubble { padding: 9px 14px; border-radius: 20px; background: #fff; color: var(--pq-text); box-shadow: 0 1px 1px rgba(17,27,44,.06); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.38; }
.pq-msg.is-mine .pq-msg-bubble { background: var(--pq-navy); color: #fff; box-shadow: none; }
.pq-msg.is-tail .pq-msg-bubble { border-bottom-left-radius: 6px; }
.pq-msg.is-mine.is-tail .pq-msg-bubble { border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.pq-msg-time { font-size: 11px; color: var(--pq-muted); margin: 3px 10px 6px; font-variant-numeric: tabular-nums; }
.pq-msg.is-pending { opacity: .6; }
@keyframes pq-msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.pq-msg.is-mine { transform-origin: bottom right; }
.pq-composer {
  position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: flex-end; gap: 8px;
  margin: 0 -8px; padding: 8px; border-radius: 26px;
  background: rgba(242, 241, 238, .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.pq-ui .pq-composer textarea { flex: 1; min-height: 44px; max-height: 160px; padding: 10px 16px; border-radius: 22px; resize: none; line-height: 1.38; overflow-y: auto; }
.pq-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--pq-navy); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 160ms var(--pq-ease), opacity .15s ease; }
.pq-send .pq-icon { width: 22px; height: 22px; stroke-width: 2.4; }
.pq-send:active { transform: scale(0.92); }
.pq-send[disabled] { opacity: .35; cursor: default; }
@media (min-width: 900px) { .pq-composer { bottom: 16px; } }

/* ---------- Termine ---------- */
.pq-event { align-items: flex-start; }
.pq-date-tile { width: 48px; flex: none; display: grid; justify-items: center; border-radius: 12px; overflow: hidden; background: var(--pq-fill); padding-bottom: 4px; }
.pq-date-tile small { display: block; width: 100%; text-align: center; background: var(--pq-red); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 0; }
.pq-date-tile b { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--pq-ink); font-variant-numeric: tabular-nums; }
.pq-event .pq-row-main .pq-sub { white-space: normal; }
.pq-event-loc { display: flex; align-items: center; gap: 4px; }
.pq-event-loc .pq-icon { width: 15px; height: 15px; }
.pq-event-notes { font-size: 14px; color: var(--pq-text); margin-top: 4px; }
.pq-event .pq-icon-btn { margin: -2px -8px 0 0; }

/* ---------- Dokumente ---------- */
.pq-doc-icon { position: relative; width: 40px; height: 48px; flex: none; display: grid; place-items: center; color: var(--pq-blue); }
.pq-doc-icon .pq-icon { width: 40px; height: 44px; stroke-width: 1.3; }
.pq-doc-icon small { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 8px; font-weight: 800; letter-spacing: .04em; background: currentColor; padding: 1px 3px; border-radius: 3px; }
.pq-doc-icon small { color: #fff; background: var(--pq-blue); }
.pq-doc-icon--rechnung { color: var(--pq-green); }
.pq-doc-icon--rechnung small { background: var(--pq-green); }
.pq-doc-icon--vertrag { color: var(--pq-navy); }
.pq-doc-icon--vertrag small { background: var(--pq-navy); }
.pq-doc-icon--briefing { color: #b8336f; }
.pq-doc-icon--briefing small { background: #b8336f; }

/* ---------- Team ---------- */
.pq-team-status { display: grid; gap: 8px; justify-items: start; margin-bottom: 16px; }
.pq-team-status .pq-sub { margin: 0; }
.pq-team-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .pq-team-grid { grid-template-columns: 1fr 1fr; } }
.pq-team-card { display: flex; gap: 14px; align-items: flex-start; }
.pq-team-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; font-size: 22px; }
.pq-team-main { min-width: 0; }
.pq-team-main p { margin: 0; }
.pq-team-about { margin-top: 4px !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pq-team-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px !important; }
.pq-team-empty { display: grid; gap: 10px; justify-items: start; }
.pq-team-empty p { margin: 0; }

/* Einstellungen */
.pq-settings .pq-row { flex-wrap: wrap; }
.pq-settings .pq-row-main { min-width: 160px; }
.pq-settings .pq-row-main .pq-sub { white-space: normal; }
.pq-settings [data-pq-push-toggle] { margin-left: 46px; }
@media (min-width: 520px) { .pq-settings .pq-row { flex-wrap: nowrap; } .pq-settings [data-pq-push-toggle] { margin-left: 0; } }
.pq-settings [data-pq-push-status] { margin: 4px 0 0; }
.pq-install:not(:empty) { padding: 12px 16px 14px 62px; font-size: 14px; color: var(--pq-muted); border-top: 1px solid var(--pq-line); }

/* Team: Kunden-Detail */
.pq-client-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 8px; }
.pq-client-actions .pq-icon { width: 18px; height: 18px; }
.pq-facts { margin: 0; }

/* Kunde: Pakete */
.pq-contract + .pq-contract { margin-top: 16px; }
.pq-contract.is-past { opacity: .72; }
.pq-contract-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pq-contract-head .pq-title { margin: 0; }
/* Status-Etikett: nicht antippbar, daher bewusst kein Chip-/Knopf-Look */
.pq-status { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--pq-muted); white-space: nowrap; padding-top: 4px; }
.pq-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pq-contract-status--aktiv { color: var(--pq-green); }
.pq-contract-status--geplant { color: var(--pq-blue); }
.pq-contract-features { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }

/* Team: voraussichtliche Vergütung */
.pq-pay-sum { margin: 0 0 18px; }
.pq-pay-sum .pq-sub { margin: 0; }
.pq-pay-total { margin: 2px 0 6px; font-size: 26px; font-weight: 700; color: var(--pq-ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pq-pay .pq-sub { margin: 0 0 6px; }
.pq-pay-role { margin: 18px 0 6px; font-size: 14px; font-weight: 600; color: var(--pq-muted); }
.pq-pay-lines { width: 100%; border-collapse: collapse; font-size: 15px; }
.pq-pay-lines td { padding: 8px 0; border-top: 1px solid var(--pq-line); vertical-align: top; }
.pq-pay-lines small { display: block; color: var(--pq-muted); font-size: 13px; }
.pq-pay-lines .pq-num { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.pq-pay .pq-caption, .pq-pay-sum .pq-caption { margin: 14px 0 0; }
.pq-facts .pq-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; min-height: 50px; }
.pq-facts dt, .pq-facts dd { margin: 0; }
.pq-facts dd { overflow-wrap: anywhere; }
.pq-profile-intro { margin-bottom: 16px; }
.pq-profile-intro p { margin: 0 0 6px; }

/* ---------- Onboarding & Teamwahl ---------- */
.pq-flow { max-width: 680px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); min-height: 100vh; min-height: 100dvh; }
.pq-flow--wide { max-width: 980px; padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.pq-flow-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin-bottom: 20px; }
.pq-steps { padding-top: 12px; }
.pq-step-count { margin: -18px 0 18px; font-variant-numeric: tabular-nums; }
.pq-option span { flex-wrap: wrap; }
.pq-option small { flex-basis: 100%; font-weight: 500; color: var(--pq-muted); font-size: 14px; order: 2; }
.pq-option input:checked + span::after { order: 1; }
.pq-options--wide { grid-template-columns: 1fr; }
.pq-steps .pq-ui textarea, .pq-steps textarea { min-height: 120px; }
.pq-step-nav { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(242,241,238,0), var(--pq-fill) 35%); }
.pq-step-nav > span { flex: 1; }
.pq-step.is-back { animation-name: pq-step-back; }
@keyframes pq-step-back { from { opacity: 0; transform: translateY(-14px); } }
.pq-option.is-shake span { animation: pq-shake 300ms var(--pq-ease); }
@keyframes pq-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.pq-choose-lead { max-width: 560px; margin: 10px 0 8px; }
.pq-choose-role .pq-section-title { margin-left: 0; font-size: 20px; text-transform: none; letter-spacing: -0.02em; color: var(--pq-ink); font-weight: 700; margin-top: 32px; }
.pq-pick-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .pq-pick-grid { grid-template-columns: repeat(3, 1fr); } }
.pq-pick { position: relative; display: flex; flex-direction: column; }
.pq-pick-input { position: absolute; opacity: 0; pointer-events: none; }
.pq-pick-card {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; background: #fff; cursor: pointer;
  box-shadow: var(--pq-shadow), inset 0 0 0 1.5px transparent; transition: box-shadow .2s ease, transform 160ms var(--pq-ease); -webkit-tap-highlight-color: transparent;
}
.pq-pick-card:active { transform: scale(0.985); }
.pq-pick-input:checked + .pq-pick-card { box-shadow: var(--pq-shadow), inset 0 0 0 2px var(--pq-navy); background: #f7f9fc; }
.pq-pick-input:focus-visible + .pq-pick-card { outline: 2px solid var(--pq-blue); outline-offset: 3px; }
.pq-pick-head { display: flex; align-items: center; gap: 12px; }
.pq-pick-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; font-size: 20px; }
.pq-pick-name { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.pq-pick-best { height: 22px; font-size: 11px; padding: 0 8px; margin-top: 4px; }
.pq-pick-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.pq-pick-reasons .pq-chip { height: auto; min-height: 26px; padding: 4px 10px; font-size: 12px; line-height: 1.3; }
.pq-pick-about { font-size: 14px; color: var(--pq-text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pq-pick-projects { display: block; }
.pq-pick-check { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #d4d2cd; background: #fff; transition: background-color .15s ease, border-color .15s ease; }
.pq-pick-check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 200ms var(--pq-ease); }
.pq-pick-input:checked + .pq-pick-card .pq-pick-check { background: var(--pq-navy); border-color: var(--pq-navy); }
.pq-pick-input:checked + .pq-pick-card .pq-pick-check::after { transform: rotate(45deg) scale(1); }
.pq-pick-head .pq-match { margin-right: 22px; }
.pq-pick-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; color: var(--pq-blue); font-weight: 600; font-size: 14px; text-decoration: none; }
.pq-pick-link .pq-icon { width: 18px; height: 18px; }
.pq-choose-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(251, 250, 248, .85); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid rgba(17,27,44,.08);
}
.pq-choose-bar p { margin: 0; }
.pq-choose-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Barrierefreiheit ---------- */
@media (prefers-reduced-motion: reduce) {
  .pq-auth-card, .pq-panel, .pq-msg, .pq-media-preview figure { animation: none !important; }
  .pq-sheet { transition: opacity 200ms ease !important; }
  .pq-sheet:not(.is-on) { opacity: 0; }
}
@media (prefers-reduced-transparency: reduce) {
  .pq-topbar, .pq-tabbar, .pq-side, .pq-composer, .pq-choose-bar { background: var(--pq-paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .pq-list, .pq-card, .pq-group { box-shadow: 0 0 0 1px #8a8990; }
}

/* ---------- Freigeben: gedrückt halten ---------- */
.pq-btn.pq-hold { position: relative; overflow: hidden; background: rgba(31, 122, 77, .12); color: var(--pq-green);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.pq-hold .pq-hold-fill { position: absolute; inset: 0; display: grid; place-items: center; background: var(--pq-green); color: #fff;
  clip-path: inset(0 100% 0 0); transition: clip-path 220ms var(--pq-ease); pointer-events: none; }
.pq-hold.is-holding .pq-hold-fill { clip-path: inset(0 0 0 0); transition: clip-path 1200ms linear; }
.pq-hold.is-hint { animation: pq-hold-hint 400ms var(--pq-ease); }
@keyframes pq-hold-hint { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (hover: hover) and (pointer: fine) { .pq-btn.pq-hold:hover { background: rgba(31, 122, 77, .18); } }
.pq-hold[data-pqm="load"] { background: var(--pq-green); color: #fff; }
@media (prefers-reduced-motion: reduce) { .pq-hold.is-hint { animation: none; } }

/* ---------- Platzhalter beim Laden (Freigabe-Sheet, Nachrichten) ---------- */
.pq-skel { display: block; position: relative; overflow: hidden; border-radius: 10px; background: var(--pq-stone, #ecebe7); }
.pq-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: pq-shimmer 1.3s ease-in-out infinite; }
@keyframes pq-shimmer { to { transform: translateX(100%); } }
.pq-skel-item { display: grid; gap: 14px; padding: 4px 0 24px; }
.pq-skel-head { display: grid; gap: 8px; }
.pq-skel-l1 { height: 22px; width: 62%; }
.pq-skel-l2 { height: 12px; width: 40%; }
.pq-skel-preview { width: min(300px, 78%); aspect-ratio: 9 / 14; justify-self: center; border-radius: 28px; margin: 8px 0; }
.pq-skel-l3 { height: 12px; width: 90%; }
.pq-skel-l4 { height: 12px; width: 70%; }
.pq-skel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pq-skel-actions .pq-skel { height: 50px; border-radius: 14px; }
.pq-skel-in { animation: pq-skel-in 320ms var(--pq-ease) both; }
@keyframes pq-skel-in { from { opacity: 0; transform: translateY(6px); } }
.pq-skel-thread { display: grid; gap: 10px; padding: 12px 0; }
.pq-skel-bubble { height: 44px; width: 62%; border-radius: 18px 18px 18px 6px; }
.pq-skel-bubble.is-mine { justify-self: end; width: 48%; border-radius: 18px 18px 6px 18px; }
.pq-skel-bubble.is-short { width: 36%; }
@media (prefers-reduced-motion: reduce) {
  .pq-skel::after { animation: none; }
  .pq-skel-in { animation: none; }
}

/* ---------- E-Mail-Benachrichtigungen (Einstellungen) ---------- */
.pq-mailprefs { display: contents; }
.pq-switch-row { cursor: pointer; }
.pq-switch-row .pq-row-main { padding-left: 46px; }
@media (max-width: 380px) { .pq-switch-row .pq-row-main { padding-left: 0; } }
.pq-switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0 0 0 12px;
  border-radius: 999px; background: #e3e2df; cursor: pointer; transition: background-color 200ms ease;
}
.pq-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18), 0 0 1px rgba(0, 0, 0, .1); transition: transform 260ms var(--pq-ease);
}
.pq-switch:checked { background: var(--pq-green); }
.pq-switch:checked::after { transform: translateX(20px); }
.pq-switch:focus-visible { outline: 2px solid var(--pq-blue); outline-offset: 3px; }
.pq-mailprefs-save { display: flex; justify-content: flex-end; padding: 10px 16px 14px; }
@media (prefers-reduced-motion: reduce) { .pq-switch, .pq-switch::after { transition: none; } }

/* ---------- Passkeys ---------- */
.pq-passkeys { display: contents; }
.pq-passkey-item .pq-row-main { padding-left: 46px; }
@media (max-width: 380px) { .pq-passkey-item .pq-row-main { padding-left: 0; } }
.pq-passkey-item .is-confirm { color: #fff !important; background: var(--pq-red); }
.pq-auth-sep { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--pq-muted); font-size: 13px; }
.pq-auth-sep::before, .pq-auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--pq-line); }
.pq-auth-sep[hidden], .pq-passkey-login[hidden] { display: none; }
.pq-passkey-msg { margin: 10px 0 0; min-height: 1.2em; }

/* ---------- Rahmenvertrag & NDA bestätigen (Team) ---------- */
.pq-agree-item { margin-top: 28px; display: grid; gap: 12px; }
.pq-agree-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.pq-agree-summary { background: #fff; border-radius: 14px; box-shadow: var(--pq-shadow); padding: 14px 16px; }
.pq-agree-summary p { margin: 0; }
.pq-agree-summary .pq-headline { margin-bottom: 4px; }
.pq-agree-doc {
  max-height: 55vh; max-height: 55dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: #fff; border-radius: 14px; border: 1px solid var(--pq-line); padding: 18px 20px;
  font-size: 15px; line-height: 1.65; overflow-wrap: anywhere;
}
.pq-agree-doc > :first-child { margin-top: 0; }
.pq-agree-doc > :last-child { margin-bottom: 0; }
.pq-agree-doc h1, .pq-agree-doc h2, .pq-agree-doc h3 { font-size: 17px; line-height: 1.3; color: var(--pq-ink); margin: 1.4em 0 .4em; }
.pq-agree-doc p, .pq-agree-doc ul, .pq-agree-doc ol { margin: 0 0 .8em; }
.pq-agree-print { margin: 0; font-size: 15px; }

/* ---------- Kapazität (Team, Profil-Tab) ---------- */
.pq-capacity { display: grid; gap: 4px; }
.pq-capacity > .pq-sub { margin-bottom: 8px; }
.pq-capacity-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 6px 0; border-top: 1px solid var(--pq-line); }
.pq-capacity-label { display: grid; gap: 2px; min-width: 0; }
.pq-ui .pq-capacity-row input[type="number"] { width: 88px; flex: none; text-align: center; font-variant-numeric: tabular-nums; }
.pq-capacity-save { display: flex; justify-content: flex-end; padding-top: 10px; }


/* ---------- Profil-Übersicht (Team) ---------- */
.pq-profile-summary { margin-bottom: 16px; }
.pq-profile-summary-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pq-profile-summary-head .pq-avatar { width: 56px; height: 56px; font-size: 20px; }
.pq-profile-summary-name { flex: 1; min-width: 160px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.pq-profile-summary-about { margin: 14px 0 0; white-space: pre-line; }
.pq-profile-summary-hint { display: block; margin-top: 6px; }
.pq-profile-revoke { display: flex; justify-content: flex-end; margin: 8px 0 0; }

/* ---------- Unterlagen (Team) ---------- */
.pq-docs-lead { margin: 0 0 16px; }
.pq-docs-item { display: grid; gap: 10px; margin-bottom: 16px; }
.pq-docs-item > p { margin: 0; }
.pq-docs-view > summary { list-style: none; cursor: pointer; width: fit-content; }
.pq-docs-view > summary::-webkit-details-marker { display: none; }
.pq-docs-view[open] > summary { margin-bottom: 10px; }
.pq-docs-old { border-top: 1px solid var(--pq-line); padding-top: 10px; }
.pq-docs-old > .pq-caption { margin: 0 0 8px; }

/* Rahmenvertrag/NDA: Code-Schritt */
.pq-agree-code { margin-top: 18px; display: grid; gap: 6px; }
.pq-agree-code input[name="code"] { font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; max-width: 260px; }
.pq-agree-code .pq-caption { margin: 0; }
.pq-agree-resend { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.pq-docs-locked { margin: 0; }

/* Automatische Abmeldung: Hinweis zwei Minuten vorher */
.pq-idle-bar {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 200; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: calc(100% - 32px); padding: 12px 14px 12px 18px;
  background: var(--pq-ink); color: #fff; border-radius: 16px; box-shadow: var(--pq-shadow); font-size: 15px;
}
.pq-idle-bar .pq-btn { background: #fff; color: var(--pq-navy); }
@media (min-width: 900px) { .pq-idle-bar { bottom: 32px; } }

/* ---------- Vertragstext (.agr, Vergütungstabelle .pay) ---------- */
.pq-agree-doc .agr { --agr-text: var(--pq-text); --agr-ink: var(--pq-ink); --agr-muted: var(--pq-muted); --agr-line: var(--pq-line); --agr-fill: var(--pq-fill); --agr-accent: var(--pq-blue); }
.agr { font-size: 15px; line-height: 1.65; color: var(--agr-text, #1f1e1f); }
.agr > :first-child { margin-top: 0; }
.agr h1 { font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 .6em; color: var(--agr-ink, #111b2c); }
.agr h2 { font-size: 17px; line-height: 1.3; margin: 1.8em 0 .5em; padding-top: .9em; border-top: 1px solid var(--agr-line, #e2e0dc); color: var(--agr-ink, #111b2c); }
.agr h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 1.6em 0 .5em; color: var(--agr-accent, #46719f); }
.agr p { margin: 0 0 .8em; }
.agr ul, .agr ol { margin: 0 0 .9em; padding-left: 1.3em; }
.agr li { margin: 0 0 .3em; }
.agr table { width: 100%; border-collapse: collapse; margin: .6em 0 1.4em; font-size: 14px; font-variant-numeric: tabular-nums; }
.agr th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .03em; color: var(--agr-muted, #5d6170); background: var(--agr-fill, #f2f1ee); padding: 8px 10px; border-bottom: 1px solid var(--agr-line, #e2e0dc); }
.agr td { padding: 9px 10px; border-bottom: 1px solid var(--agr-line, #e2e0dc); vertical-align: top; }
.agr tbody tr:nth-child(even) td { background: rgba(17, 27, 44, .025); }
.agr small { color: var(--agr-muted, #5d6170); font-size: 12px; }
.agr .pay th:nth-child(n+4), .agr .pay td:nth-child(n+4) { text-align: right; white-space: nowrap; }
.agr .pay td:nth-child(6), .agr .pay th:nth-child(6) { text-align: left; }
@media (max-width: 639px) {
  .agr .pay, .agr .pay tbody, .agr .pay tr, .agr .pay td { display: block; width: 100%; }
  .agr .pay thead { display: none; }
  .agr .pay tr { border: 1px solid var(--agr-line, #e2e0dc); border-radius: 12px; padding: 6px 12px; margin: 0 0 10px; background: #fff; }
  .agr .pay tbody tr:nth-child(even) td { background: transparent; }
  .agr .pay td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--agr-line, #e2e0dc); text-align: right !important; white-space: normal !important; }
  .agr .pay td:last-child { border-bottom: 0; }
  .agr .pay td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: 12px; font-weight: 600; color: var(--agr-muted, #5d6170); }
  .agr .pay td:first-child { font-weight: 600; }
}


/* ---------- Unterschreiben: Schritte, Aktionsleiste unten ---------- */
.pq-agree-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; counter-reset: none; }
.pq-agree-steps li { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: var(--pq-shadow); color: var(--pq-muted); font-size: 13px; font-weight: 600; }
.pq-agree-steps li b { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pq-fill); color: var(--pq-muted); font-size: 12px; }
.pq-agree-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-agree-steps li.is-current { color: var(--pq-navy); box-shadow: var(--pq-shadow), inset 0 0 0 2px var(--pq-navy); }
.pq-agree-steps li.is-current b { background: var(--pq-navy); color: #fff; }
.pq-agree-steps li.is-done b { background: var(--pq-green); color: #fff; }
@media (max-width: 420px) { .pq-agree-steps li { padding: 8px; } .pq-agree-steps li:not(.is-current) span { display: none; } }
.pq-flow--agree { padding-bottom: 0; }
.pq-flow--agree .pq-agree-doc { max-height: none; overflow: visible; padding: 22px 24px; }
.pq-agree-actions {
  position: sticky; bottom: 0; z-index: 20; margin: 20px calc(-1 * max(16px, env(safe-area-inset-left))) 0; display: grid; gap: 10px;
  padding: 14px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(251, 250, 248, .92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(17, 27, 44, .08);
}
.pq-agree-stage { display: grid; gap: 10px; }
.pq-agree-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.pq-agree-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--pq-navy); }
.pq-agree-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pq-agree-row .pq-btn { flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.pq-agree-row .pq-btn[disabled] { opacity: .45; }
.pq-agree-later, .pq-agree-resend { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 8px 0; font: inherit; font-size: 15px; cursor: pointer; }
.pq-agree-later { color: var(--pq-muted); font-weight: 500; }
.pq-agree-codelabel { font-size: 14px; color: var(--pq-muted); }
.pq-ui .pq-agree-codeinput { font-size: 28px; font-weight: 700; letter-spacing: .5em; text-align: center; padding: 12px 0 12px .5em; font-variant-numeric: tabular-nums; max-width: 320px; }
.pq-agree-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecef; color: #9b1c2e; font-size: 14px; font-weight: 600; }
.pq-agree-success { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #e3f3e9; color: #17603a; font-weight: 600; }
.pq-agree-success[hidden] { display: none; }
.pq-agree-success .pq-icon { width: 22px; height: 22px; flex: none; }
@media (min-width: 720px) { .pq-agree-actions { margin-left: 0; margin-right: 0; border-radius: 16px 16px 0 0; } }

/* Archivierte Kunden, ehemalige Kunden */
.pq-archived-note { margin: calc(12px + env(safe-area-inset-top)) 0 -12px; }
.pq-archived-note + .pq-panel .pq-panel-head { padding-top: 22px; }
@media (min-width: 900px) { .pq-archived-note { margin-top: 24px; } }
.pq-former-list .pq-row { opacity: .8; }

/* ---------- Planung (Team): Agenda, Aufgaben, Kalender-Abo ---------- */
.pq-empty-inline { padding: 16px 18px; }
.pq-empty-inline .pq-sub { margin: 0; }
.pq-agenda-section { margin: 22px 4px 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pq-blue); }
.pq-agenda-day { margin: 14px 4px 6px; font-size: 15px; font-weight: 700; color: var(--pq-ink); }
.pq-agenda-day.is-today { color: var(--pq-navy); }
.pq-agenda-item { align-items: center; }
.pq-agenda-time { flex: none; min-width: 92px; font-size: 14px; font-weight: 600; color: var(--pq-navy); font-variant-numeric: tabular-nums; }
.pq-agenda-past, .pq-todo-done { margin-top: 14px; }
.pq-agenda-past > summary, .pq-todo-done > summary { cursor: pointer; padding: 8px 4px; font-weight: 600; color: var(--pq-muted); }
.pq-todo-add { display: grid; gap: 12px; margin-bottom: 14px; }
.pq-todo-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.pq-todo-fields label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--pq-muted); flex: 1 1 140px; }
.pq-todo-fields .pq-todo-prio-check { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 50px; color: var(--pq-text); }
.pq-todo-fields .pq-btn { flex: 0 0 auto; min-height: 50px; }
.pq-todo-filter { margin: 4px 0 10px; }
.pq-todo-filter a.pq-chip { text-decoration: none; }
.pq-todo-filter a.pq-chip.is-active { background: var(--pq-navy); color: #fff; }
.pq-todo-group { margin: 18px 4px 6px; font-size: 15px; font-weight: 700; color: var(--pq-ink); }
.pq-todo-group small { font-weight: 500; color: var(--pq-muted); }
.pq-todo-group--ueberfaellig { color: var(--pq-red); }
.pq-todo { align-items: center; gap: 12px; }
.pq-todo form { margin: 0; }
.pq-todo-box { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9c7c2; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; }
.pq-todo-box .pq-icon { width: 16px; height: 16px; }
.pq-todo.is-done .pq-todo-box { background: var(--pq-green); border-color: var(--pq-green); }
.pq-todo.is-done .pq-headline { text-decoration: line-through; color: var(--pq-muted); }
.pq-todo.is-high .pq-todo-box { border-color: var(--pq-red); }
.pq-todo-prio { display: inline-block; padding: 0 6px; border-radius: 6px; background: #fdecef; color: #9b1c2e; font-size: 11px; font-weight: 700; vertical-align: 2px; }
.pq-feed { display: grid; gap: 10px; }
.pq-feed .pq-sub, .pq-feed-actions { margin: 0; }
.pq-feed input[readonly] { font-size: 13px; }
.pq-client-photo { align-items: flex-start; }
.pq-client-photo .pq-row-main .pq-sub { white-space: normal; }
.pq-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pq-photo-actions form { margin: 0; }
.pq-client-photo-form { display: contents; }
.pq-file-btn { position: relative; cursor: pointer; }
.pq-file-btn:focus-within { outline: 2px solid var(--pq-blue); outline-offset: 2px; }

/* Profilfoto zuschneiden (photo-crop.js): Sheet über abgedunkeltem Hintergrund, runde Vorschau im quadratischen Ausschnitt */
html.pq-crop-open { overflow: hidden; }
.pq-crop-scrim { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 20, 30, .45); animation: pq-crop-fade 200ms var(--pq-ease) both; }
.pq-crop-sheet { width: 100%; max-width: 340px; background: #fff; border-radius: 22px; padding: 20px 20px 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); text-align: center; animation: pq-crop-pop 320ms var(--pq-ease) both; }
.pq-crop-title { margin: 0 0 4px; }
.pq-crop-hint { margin: 0 0 14px; }
.pq-crop-stage { position: relative; width: 280px; height: 280px; margin: 0 auto; overflow: hidden; border-radius: 14px; background: #1d1d1f; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; }
.pq-crop-stage.is-dragging { cursor: grabbing; }
.pq-crop-stage:focus-visible { box-shadow: 0 0 0 3px var(--pq-blue); }
.pq-crop-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
/* Kreis zeigt, was in runden Avataren sichtbar ist; außerhalb abgedunkelt */
.pq-crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .9); pointer-events: none; }
.pq-crop-zoom { width: 280px; max-width: 100%; margin: 16px auto 4px; display: block; accent-color: var(--pq-navy); }
.pq-crop-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
@keyframes pq-crop-fade { from { opacity: 0; } }
@keyframes pq-crop-pop { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .pq-crop-scrim, .pq-crop-sheet { animation: none; } }

/* Einführung (tour.js): Markierung mit abgedunkeltem Umfeld, Karte unten bzw. oben, Beispielinhalte */
.pq-tour-shade { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.pq-tour-shade.is-dim { background: rgba(15, 20, 30, .45); pointer-events: auto; animation: pq-crop-fade 200ms var(--pq-ease) both; }
.pq-tour-ring { position: fixed; z-index: 901; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 3px var(--pq-blue), 0 0 0 9999px rgba(15, 20, 30, .42); transition: left 320ms var(--pq-ease), top 320ms var(--pq-ease), width 320ms var(--pq-ease), height 320ms var(--pq-ease); }
.pq-tour-card { position: fixed; z-index: 902; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); background: #fff; border-radius: 20px; padding: 18px 18px 14px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 18px 50px rgba(0, 0, 0, .25); }
.pq-tour-card.is-top { bottom: auto; top: calc(16px + env(safe-area-inset-top)); }
.pq-tour-card.is-center { top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.pq-tour-card.is-in { animation: pq-tour-in 320ms var(--pq-ease) both; }
.pq-tour-card.is-center.is-in { animation-name: pq-tour-in-center; }
.pq-tour-count { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--pq-muted); }
.pq-tour-title { margin: 0 0 6px; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; color: var(--pq-ink); }
.pq-tour-text { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--pq-ink); }
.pq-tour-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.pq-tour-actions .pq-tour-end { margin-right: auto; }
.pq-tour-demo { pointer-events: none; border: 1.5px dashed rgba(178, 107, 0, .45); margin-bottom: 12px; }
.pq-tour-demo-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
@keyframes pq-tour-in { from { opacity: 0; transform: translate(-50%, 8px) scale(.98); } }
@keyframes pq-tour-in-center { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .pq-tour-ring { transition: none; } .pq-tour-card.is-in { animation: none; } }

/* Videokampagnen (videos.js): Pflicht-Video als Dialog, Story-Kreise */
.pq-video-dlg { border: 0; padding: 0; background: transparent; max-width: min(720px, calc(100vw - 24px)); width: 100%; }
.pq-video-dlg::backdrop { background: rgba(10, 14, 22, .72); }
.pq-video-dlg[open] { animation: pq-crop-pop 320ms var(--pq-ease) both; }
.pq-video-box { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
.pq-video-head { padding: 18px 20px 12px; }
.pq-video-kicker { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--pq-muted); letter-spacing: .02em; }
.pq-video-title { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; color: var(--pq-ink); }
.pq-video-player { display: block; width: 100%; max-height: 70vh; background: #000; }
.pq-video-foot { display: flex; align-items: center; gap: 12px; justify-content: flex-end; padding: 14px 20px 18px; }
.pq-video-hint { margin: 0 auto 0 0; font-size: 14px; color: var(--pq-muted); }
.pq-stories { display: flex; gap: 14px; overflow-x: auto; padding: 6px 0 12px; scrollbar-width: none; }
.pq-stories::-webkit-scrollbar { display: none; }
.pq-story { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pq-story-ring { width: 62px; height: 62px; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, #f7b500, #ef5a9b, #3f6fa6, #f7b500); transition: transform 160ms var(--pq-ease); }
.pq-story:active .pq-story-ring { transform: scale(.94); }
.pq-story.is-seen .pq-story-ring { background: #d6d4cf; }
.pq-story-dot { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--pq-navy); color: #fff; box-shadow: 0 0 0 3px #fff; }
.pq-story-dot svg { width: 22px; height: 22px; margin-left: 3px; }
.pq-story-label { max-width: 72px; font-size: 12px; line-height: 1.2; color: var(--pq-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-story:focus-visible .pq-story-ring { box-shadow: 0 0 0 3px var(--pq-blue); }
@media (prefers-reduced-motion: reduce) { .pq-video-dlg[open] { animation: none; } }

/* Web-App auf iPad/iPhone (Home-Bildschirm): Statusleiste oben und Home-Balken unten freihalten – auch im
   Seitenleisten-Layout ab 900 px (iPad quer) und für die Video-Kreise. Ohne Notch/Statusleiste sind alle Werte 0. */
.pq-stories { padding-top: calc(10px + env(safe-area-inset-top)); }
.pq-stories ~ .pq-panel .pq-panel-head { padding-top: 16px; }
.pq-stories ~ .pq-switcher, .pq-stories ~ .pq-agree-bar { margin-top: 8px; }
@media (min-width: 900px) {
  .pq-side {
    height: 100vh; height: 100dvh;
    padding-top: calc(28px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
  }
  .pq-main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); padding-right: max(40px, env(safe-area-inset-right)); }
  .pq-panel-head { padding-top: calc(48px + env(safe-area-inset-top)); }
  .pq-switcher, .pq-agree-bar, .pq-archived-note { margin-top: calc(24px + env(safe-area-inset-top)); }
  .pq-agree-bar { top: calc(16px + env(safe-area-inset-top)); }
  .pq-composer { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .pq-idle-bar { bottom: calc(32px + env(safe-area-inset-bottom)); }
  .pq-stories { padding-top: calc(24px + env(safe-area-inset-top)); }
  .pq-stories ~ .pq-panel .pq-panel-head { padding-top: 24px; }
}
/* Als Web-App geöffnet: Hintergrund bis in die Ränder (kein weißer Streifen hinter Statusleiste/Home-Balken) */
@media (display-mode: standalone) {
  html.pq-portal-html, body.pq-portal-body { min-height: 100dvh; }
  .pq-app-tabbar { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
}

/* Teamwahl: Rollen, die POLITIQ persönlich zusammenstellt */
.pq-choose-manual-card { padding: 18px 20px; display: grid; gap: 4px; }
.pq-choose-manual-card .pq-sub { margin: 0; }

/* Freelancer: eigene Leistungen im Projekt markieren */
mark.pq-mine { background: color-mix(in srgb, var(--pq-blue, #0a66ff) 16%, transparent); color: inherit; border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.pq-contract-features li.pq-mine-li { font-weight: 600; background: color-mix(in srgb, var(--pq-blue, #0a66ff) 12%, transparent); border-radius: 8px; padding: 2px 8px; margin-left: -8px; }
.pq-mine-legend { display: block; margin-bottom: 8px; }

/* AGB-Hinweis bei laufendem Vertrag: Haken + Zustimmen, darunter „Bisherige behalten“ */
.pq-agb-bar { position: static; background: #fff8e8; color: var(--pq-ink); box-shadow: 0 0 0 1px #f0dfb4; }
.pq-agb-bar a { color: var(--pq-blue); }
.pq-agb-bar .pq-agb-accept { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.pq-agb-bar .pq-agb-accept .pq-consent { flex: 1 1 280px; margin: 4px 0; }
.pq-agb-bar .pq-btn { background: var(--pq-navy); color: #fff; }
.pq-agb-bar .pq-btn--plain { background: transparent; color: var(--pq-navy); }
.pq-agree-check.pq-consent { font-weight: 600; }

/* Einführung: Karte direkt am markierten Element (tour.js anchor()) */
.pq-tour-card.is-anchored { bottom: auto; transform: none; transition: left 320ms var(--pq-ease), top 320ms var(--pq-ease); }
.pq-tour-card.is-anchored.is-in { animation-name: pq-tour-in-anchored; }
.pq-tour-arrow { position: absolute; width: 16px; height: 16px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); box-shadow: -1px -1px 0 0 rgba(0, 0, 0, .06); pointer-events: none; }
.pq-tour-card:not(.is-anchored) .pq-tour-arrow { display: none; }
.pq-tour-card[data-dir="down"] .pq-tour-arrow { top: 0; }
.pq-tour-card[data-dir="up"] .pq-tour-arrow { top: 100%; box-shadow: 1px 1px 0 0 rgba(0, 0, 0, .06); }
.pq-tour-card[data-dir="right"] .pq-tour-arrow { left: 0; }
.pq-tour-card[data-dir="left"] .pq-tour-arrow { left: 100%; box-shadow: 1px -1px 0 0 rgba(0, 0, 0, .06); }
@keyframes pq-tour-in-anchored { from { opacity: 0; transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) { .pq-tour-card.is-anchored { transition: none; } }

/* Empfehlung: Passkey einrichten */
.pq-passkey-nudge { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 14px 0 0; padding: 14px 16px; border-radius: 16px; background: #eef4fb; box-shadow: 0 0 0 1px #d6e3f2; }
.pq-passkey-nudge[hidden] { display: none; }
.pq-passkey-nudge-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pq-navy); color: #fff; }
.pq-passkey-nudge-icon .pq-icon { width: 22px; height: 22px; }
.pq-passkey-nudge-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.4; color: var(--pq-ink); }
.pq-passkey-nudge-actions { display: flex; gap: 6px; margin-left: auto; }

/* Vorschauen passen in den Handybildschirm: ganzes Bild + Anfang der Caption ohne Scrollen.
   Platz außerhalb des Bildes im Sheet: Griff/Titel/Status (~150 px) + Insta-Kopf, Aktionen, 2 Zeilen Caption (~150 px). */
.pq-ig { width: min(100%, 470px, calc((92dvh - 280px) * 0.8)); min-width: min(100%, 200px); }
.pq-phone-screen { height: min(640px, calc(92dvh - 190px)); }
@media (min-width: 900px) { .pq-ig { width: min(100%, 470px, calc((88vh - 300px) * 0.8)); } .pq-phone-screen { height: min(640px, calc(88vh - 190px)); } }
