/* Shared content-page system (site, terms, privacy, impressum, prompts, automations, workspace/app layout) */

/* ── Toast Notifications ──────────────────────────────────────────────── */
.cd-toast-container{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}
.cd-toast{
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(138,180,255,.28);
  background: linear-gradient(160deg, rgba(18,27,46,.96) 0%, rgba(13,20,34,.96) 100%);
  backdrop-filter: blur(12px);
  box-shadow:
    0 12px 28px rgba(0,0,0,.36),
    0 3px 8px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.06);
  color: #ddeeff;
  font-size: 13px;
  line-height: 1.42;
  max-width: 100%;
  /* Slide in from right */
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .18s ease;
}
.cd-toast.is-visible{
  transform: translateX(0);
  opacity: 1;
}
.cd-toast.cd-toast--success{
  border-color: rgba(74,222,128,.34);
  background: linear-gradient(160deg, rgba(10,38,25,.96) 0%, rgba(8,28,18,.96) 100%);
}
.cd-toast.cd-toast--error{
  border-color: rgba(255,120,120,.36);
  background: linear-gradient(160deg, rgba(44,14,14,.96) 0%, rgba(32,10,10,.96) 100%);
}
.cd-toast.cd-toast--warning{
  border-color: rgba(251,191,36,.32);
  background: linear-gradient(160deg, rgba(40,28,8,.96) 0%, rgba(28,20,6,.96) 100%);
}
.cd-toast__icon{
  flex: 0 0 15px;
  margin-top: 1px;
  display: flex;
}
.cd-toast--success .cd-toast__icon{ color: #4ade80; }
.cd-toast--error   .cd-toast__icon{ color: #ff9090; }
.cd-toast--warning .cd-toast__icon{ color: #fbbf24; }
.cd-toast--info    .cd-toast__icon{ color: #8ab4ff; }
.cd-toast__msg{
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.cd-toast__close{
  flex: 0 0 auto;
  margin-left: 2px;
  margin-top: -1px;
  padding: 2px 4px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: rgba(180,200,230,.5);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color .12s, background .12s;
}
.cd-toast__close:hover{
  color: #ddeeff;
  background: rgba(138,180,255,.12);
}
.cd-toast__action{
  flex: 0 0 auto;
  margin-left: 4px;
  margin-top: -1px;
  padding: 3px 9px;
  background: rgba(138,180,255,.15);
  border: 1px solid rgba(138,180,255,.3);
  border-radius: 6px;
  color: #8ab4ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.cd-toast__action:hover{
  background: rgba(138,180,255,.28);
  color: #ddeeff;
}
@media (max-width: 480px){
  .cd-toast-container{
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .cd-toast{
    transform: translateY(12px);
  }
  .cd-toast.is-visible{
    transform: translateY(0);
  }
}

.cd-page-stack{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cd-page-hero{
  position: relative;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(138,180,255,.28);
  background: linear-gradient(180deg, rgba(21, 33, 54, .92), rgba(13, 22, 38, .90));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.cd-page-hero::before{
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(63,233,255,0), rgba(138,180,255,.44), rgba(63,233,255,0));
  pointer-events: none;
}

.cd-page-hero--home .cd-title{
  max-width: none;
}

.cd-title{
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .01em;
}

.cd-title__icon{
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.cd-page-hero__heading{
  margin: 0;
  font-size: 29px;
  line-height: 1.18;
  letter-spacing: .01em;
}

.cd-page-hero__lead{
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #c5d4ec;
  max-width: 80ch;
}

.cd-page-hero__bar{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.cd-page-hero__main{ min-width: 0; }

.cd-page-meta{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cd-page-pill{
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(138,180,255,.30);
  background: rgba(13, 20, 34, .72);
  color: #dce9ff;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .01em;
}

.cd-page-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 14px;
  align-items: start;
}

.cd-page-grid--single{ grid-template-columns: 1fr; }

.cd-doc-card{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cd-doc-card > h2{
  margin: 2px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: 18px;
}

.cd-doc-card > p,
.cd-doc-card > ul,
.cd-doc-card > ol{
  margin: 0;
  color: #c7d6ed;
  font-size: 13px;
  line-height: 1.5;
}

.cd-doc-card > ul,
.cd-doc-card > ol{ padding-left: 20px; }

.cd-impressum-page{ font-size: 13px; line-height: 1.6; }

/* Trust strip */
.cd-site-trust{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  padding: 0 4px;
}
.cd-site-trust__item{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(180,205,240,.65);
  letter-spacing: .01em;
}
.cd-site-trust__item svg{
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: .7;
}

/* Site buttons */
.cd-site-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(138,180,255,.34);
  background: linear-gradient(180deg, rgba(27, 41, 62, .92), rgba(18, 28, 45, .88));
  color: #eaf3ff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .01em;
  box-sizing: border-box;
  max-width: 100%;
  box-shadow: 0 10px 22px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .15s, box-shadow .18s;
}

.cd-site-btn--primary{
  border-color: rgba(63,233,255,.42);
  background: linear-gradient(180deg, rgba(36,72,125,.86), rgba(22,42,75,.90));
}

.cd-site-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
}

.cd-site-btn--primary:hover{
  box-shadow: 0 8px 28px rgba(63,180,255,.28), inset 0 1px 0 rgba(255,255,255,.08);
}

.cd-site-btn--hero{ min-width: 200px; }

.cd-site-btn__label{
  font-size: 14px;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.cd-site-btn__meta{
  font-size: 11px;
  opacity: .85;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.cd-site-actions{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }

@media (max-width: 820px){
  .cd-page-hero__bar{ grid-template-columns: 1fr; }
  .cd-site-actions{ grid-template-columns: 1fr; }
  .cd-site-btn--hero{
    width: 100%;
    min-width: 0;
  }
  .cd-page-grid{ grid-template-columns: 1fr; }
}

/* Core app cards */
.cd-card{ display: flex; flex-direction: column; gap: 12px; }

.cd-card__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.cd-card__header--compact{ align-items: center; justify-content: flex-start; text-align: left; }
.cd-card__header--compact .cd-card__title-row{
  display: flex;
  align-items: center;
  margin-right: auto;
}
.cd-card__header--compact .cd-card__title{
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .01em;
}
.cd-card__header--compact .cd-card__title-row svg{
  width: 18px;
  height: 18px;
  opacity: .9;
  stroke-width: 2.4;
  flex-shrink: 0;
}
.cd-card__header--center{ justify-content: center; text-align: center; }
.cd-card__title-row{
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cd-card__title-row svg{
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-width: 2.2;
  opacity: .75;
}

.cd-card__title{ margin: 0 0 4px; font-size: 16px; font-weight: 800; color: #eef5ff; }

.cd-card__subtitle{ margin: 0; font-size: 12px; color: #ccd8f0; }

.cd-card__feedback{ display: flex; flex-direction: column; gap: 10px; }

.cd-card--tool{ padding: 18px; }

.cd-card--recent{ padding: 16px; }

/* App layout grid */
.cd-grid{ display: grid; gap: 16px; }

.cd-grid--app-tool{ grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }

.cd-col{ min-width: 0; }

.cd-col--controls{ display: flex; flex-direction: column; gap: 12px; }

.cd-col--input{ min-width: 0; }

@media (max-width: 900px){
  .cd-grid--app-tool{ grid-template-columns: 1fr; }
}

.cd-field{ display: flex; flex-direction: column; gap: 6px; }

.cd-field__label{ font-size: 12px; color: #cfe0f5; font-weight: 700; }

.cd-field__help{ margin: 0; font-size: 12px; color: #c5d6ee; line-height: 1.4; }

.cd-field__hint{ margin: 0; font-size: 12px; color: #b0c6e2; }

.cd-field--switch{ flex-direction: row; align-items: center; justify-content: space-between; }

.cd-input-shell{
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(138,180,255,.28);
  background: linear-gradient(180deg, rgba(16, 24, 37, .86), rgba(12, 19, 30, .88));
  padding: 8px;
}
.cd-copy-btn,
.cd-clear-btn{
  position: absolute;
  bottom: 6px;
  background: rgba(138,180,255,.08);
  border: 1px solid rgba(138,180,255,.18);
  border-radius: 6px;
  padding: 3px 5px;
  cursor: pointer;
  color: rgba(138,180,255,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transition: opacity .15s, color .15s, background .15s;
}
.cd-copy-btn{ right: 6px; }
.cd-clear-btn{ right: 30px; }
/* When there's no copy btn sibling, move clear to right edge */
.cd-input-shell:not(:has(.cd-copy-btn)) .cd-clear-btn{ right: 6px; }
/* Prevent SVG squishing inside action buttons */
.cd-copy-btn svg, .cd-clear-btn svg{
  flex-shrink: 0;
  display: block;
}
.cd-input-shell:hover .cd-copy-btn,
.cd-input-shell:focus-within .cd-copy-btn,
.cd-input-shell:hover .cd-clear-btn,
.cd-input-shell:focus-within .cd-clear-btn{ opacity: 1; }
.cd-copy-btn:hover{ color: #8ab4ff; background: rgba(138,180,255,.15); }
.cd-clear-btn:hover{ color: #ff9898; background: rgba(255,120,120,.14); }
.cd-copy-btn.is-copied{ color: #4ade80; opacity: 1; }
/* Touch-Geräte haben kein Hover → Buttons dauerhaft sichtbar */
@media (hover: none) {
  .cd-copy-btn,
  .cd-clear-btn{ opacity: 1; }
}
.cd-auto-lang-notice{
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: rgba(138,180,255,.65);
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(138,180,255,.15);
  background: rgba(138,180,255,.05);
  margin: 0;
  line-height: 1.45;
}
.cd-auto-lang-notice svg{
  flex: 0 0 13px;
  margin-top: 1px;
  opacity: .7;
}

.cd-input-shell--core{ padding: 10px; }

/* ── Credit badge (header) ──────────────────────────────────────────────── */
.cd-credits-badge{
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(26, 33, 50, .92), rgba(18, 24, 38, .82));
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(200,222,255,.88);
  transition: background .15s, color .15s, border-color .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.cd-credits-badge:hover{
  background: rgba(138,180,255,.15);
  color: rgba(210,230,255,.9);
}
.cd-credits-badge svg{
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: .65;
}
.cd-credits-badge.is-low{
  color: rgba(255,175,80,.9);
  border-color: rgba(255,140,50,.35);
  background: rgba(255,120,40,.07);
}
.cd-credits-badge.is-low svg{ opacity: 1; }
.cd-credits-badge.is-dev{
  color: rgba(200,222,255,.88);
  border-color: rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(26, 33, 50, .92), rgba(18, 24, 38, .82));
  font-weight: 700;
}
.cd-credits-badge.is-dev svg{ opacity: .4; }

/* ── Dev hint (shown in shop section for dev accounts) ───────────────────── */
.cd-dev-hint{
  font-size: 10px;
  color: rgba(160,185,240,.55);
  padding: 3px 2px;
  line-height: 1.4;
  font-style: italic;
}

/* ── Shop section (profile dropdown) ────────────────────────────────────── */
.cd-shop-section{
  border-top: 1px solid rgba(138,180,255,.12);
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-shop-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(180,200,240,.45);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.cd-shop-balance{
  font-size: 12px;
  font-weight: 700;
  color: rgba(200,220,255,.8);
  text-transform: none;
  letter-spacing: 0;
}
.cd-shop-packs{
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cd-pack-btn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(138,180,255,.07);
  border: 1px solid rgba(138,180,255,.16);
  color: rgba(200,220,255,.85);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.cd-pack-btn:hover{
  background: rgba(138,180,255,.15);
  border-color: rgba(138,180,255,.35);
  color: #e5f0ff;
}
.cd-pack-btn__credits{ font-weight: 700; }
.cd-pack-btn__label{ font-size: 11px; color: rgba(180,200,240,.55); flex: 1; padding-left: 6px; }
.cd-pack-btn__arrow{ font-size: 11px; opacity: .5; }

.cd-paste-hint{
  font-size: 11px;
  color: rgba(138,180,255,.78);
  padding: 3px 0 0 6px;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  transition: opacity .15s;
}
.cd-paste-hint.is-hidden{ visibility: hidden; }

textarea[data-autoresize]{
  overflow: hidden;
  resize: none;
}

.cd-field__control textarea,
.cd-input-shell textarea,
.cd-input-shell input{
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e5f0ff;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
}

.cd-prompt-group{ display: flex; flex-direction: column; gap: 6px; }

.cd-prompt-head{ display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.cd-prompt-actions{ display: inline-flex; align-items: center; gap: 6px; }

/* Clear-Button in der Prompt-Kopfzeile */
.cd-clear-btn--inline{
  position: static;
  opacity: .45;
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 4px;
  color: #9db4d7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s, color .15s, background .15s, border-color .15s;
  line-height: 1;
}
.cd-clear-btn--inline:hover{
  opacity: 1;
  color: #ff9898;
  background: rgba(255,120,120,.10);
  border-color: rgba(255,120,120,.25);
}

.cd-actions{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cd-actions--primary{ margin-top: 12px; }

/* /app page: schmälere Breite, zentriert */
body.page-app .wrap{
  max-width: 800px;
}

/* /hooks page: am Inhalt ausgerichtete Breite */
body.cd-page-hooks .wrap{
  max-width: 720px;
}

/* Full-width generate button */
body.page-app .cd-actions--primary{
  display: block;
}
body.page-app .cd-actions--primary .cd-generate-btn--full{
  width: 100%;
  justify-content: center;
}

/* Hook in settings strip (kein eigener Abschnitt mehr) */
.cd-setting--hook{
  gap: 8px;
}
.cd-setting--hook .cd-hook-selector__chips{
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}
/* Hook-Chips im Strip auf Chip-Höhe normalisieren */
.cd-setting--hook .cd-hook-chip{
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.cd-actions--secondary{ flex-wrap: wrap; }

@media (max-width: 480px){
  .cd-video-preview{ width: 80px; }
  .cd-video-preview__video{ width: 80px; }
}

/* ── Prompt-Verlauf (letzte 5 Eingaben als Chips) ───────────────────────── */
.cd-prompt-history{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(138,180,255,.12);
}
.cd-prompt-history__label{
  width: 100%;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: rgba(180,210,255,.60);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 2px;
}
.cd-prompt-history__chip{
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  padding: 4px 11px;
  border-radius: 7px;
  border: 1px solid rgba(138,180,255,.22);
  background: rgba(138,180,255,.07);
  color: rgba(180,210,255,.80);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .12s, border-color .12s, color .12s;
}
.cd-prompt-history__chip:hover{
  background: rgba(138,180,255,.15);
  border-color: rgba(138,180,255,.42);
  color: #dbe8ff;
}

/* ── Video thumbnail preview ──────────────────────────────────────────── */
.cd-video-preview{
  position: relative;
  width: 110px;
  flex-shrink: 0;
}
.cd-video-preview__video{
  width: 110px;
  aspect-ratio: 9/16;
  border-radius: 10px;
  border: 1px solid rgba(138,180,255,.22);
  background: rgba(10,16,26,.95);
  object-fit: cover;
  display: block;
  transition: border-color .15s;
}
.cd-video-preview__play{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(10,16,28,.52);
  color: rgba(210,230,255,.85);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cd-video-preview__play:hover{
  background: rgba(10,16,28,.3);
  color: #fff;
}
.cd-video-preview__play svg{
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.6));
  pointer-events: none;
}

.cd-enhance-btn{
  border: 1px solid rgba(138,180,255,.34);
  background: rgba(255,255,255,.04);
  color: #e5f0ff;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.cd-enhance-btn--link{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cd-resize-bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  cursor: row-resize;
}

.cd-top-controls,
.cd-image-controls{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}

@media (max-width: 900px){
  .cd-top-controls,
  .cd-image-controls{ grid-template-columns: 1fr; }
}

.cd-top-item{ min-width: 0; }

.cd-select-shell{ position: relative; }

.cd-native-select{ width: 100%; }

.cd-select-trigger{
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(255,255,255,.04);
  color: #e5f0ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cd-select-caret{
  opacity: .6;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.cd-select-shell.is-open .cd-select-caret{ transform: rotate(180deg); }

.cd-select-trigger{
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.cd-select-trigger:hover{
  border-color: rgba(138,180,255,.48);
  background: rgba(138,180,255,.07);
}

.cd-select-list{
  position: absolute;
  z-index: 200;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border-radius: 12px;
  border: 1px solid rgba(138,180,255,.32);
  background: linear-gradient(180deg, rgba(16, 24, 40, .98), rgba(11, 17, 30, .98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(138,180,255,.08);
  padding: 5px;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}
.cd-select-shell.is-open .cd-select-list{ display: block; }

.cd-select-option{
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: #c8dcf4;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
  outline: none;
}
.cd-select-option:hover,
.cd-select-option:focus{
  background: rgba(138,180,255,.12);
  color: #e8f2ff;
}
.cd-select-option.is-selected{
  background: rgba(99,160,255,.16);
  color: #a8d0ff;
  font-weight: 600;
}
.cd-select-option.is-selected::before{
  content: "✓ ";
  font-size: 11px;
  opacity: .8;
}

.cd-mode-primary-hint{ margin: 0; color: #b8c9e2; font-size: 12px; }

.cd-methods{ display: flex; flex-direction: column; gap: 12px; }

.cd-method-card{
  border-radius: 14px;
  border: 1px solid rgba(138,180,255,.28);
  background: linear-gradient(180deg, rgba(19, 28, 44, .85), rgba(14, 21, 34, .88));
}

.cd-method-card__head{
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.cd-method-card__title{ font-weight: 800; font-size: 14px; }

.cd-method-card__badge{
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid rgba(138,180,255,.28);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255,255,255,.04);
}

.cd-method-card__body{ padding: 0 14px 14px; }

.cd-primary-mode-switch,
.cd-generate-mode-switch{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(255,255,255,.03);
}

.cd-primary-mode-btn,
.cd-generate-mode-btn{
  border: 0;
  background: transparent;
  color: #c5d6ef;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.cd-primary-mode-btn.is-active,
.cd-generate-mode-btn.is-active{
  background: rgba(138,180,255,.18);
  color: #e9f2ff;
}

.cd-layout{ display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }

.cd-main-col{ min-width: 0; }

.cd-status-col{ min-width: 0; }

@media (max-width: 1100px){
  .cd-layout{ grid-template-columns: 1fr; }
}

.cd-generate-row{ margin-top: 8px; display: flex; align-items: center; justify-content: space-between; }

.cd-tiktok-hint{ font-size: 12px; color: #ffb6c5; }

/* Automations / Agents */
.cd-auto-hero{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cd-auto-hero__main{ min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.cd-auto-card{ display: flex; flex-direction: column; gap: 16px; }

.cd-auto-minimal-v2{ gap: 16px; }

.cd-agent-buttons{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }

@media (max-width: 900px){
  .cd-agent-buttons{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 600px){
  .cd-agent-buttons{ grid-template-columns: 1fr; }
}

.cd-agent-btn{
  border-radius: 12px;
  border: 1px solid rgba(138,180,255,.24);
  background: linear-gradient(180deg, rgba(16, 23, 37, .86), rgba(12, 17, 29, .88));
  color: #eaf4ff;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cd-agent-btn--with-icon{ position: relative; padding-right: 48px; }

.cd-agent-btn__icon{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #86a8d6;
}

.cd-agent-btn__icon svg{ width: 20px; height: 20px; display: block; }

.cd-agent-btn__title{ font-size: 13px; font-weight: 800; }

.cd-agent-btn__meta{ font-size: 11px; color: #b4c9e8; }

.cd-agent-btn{
  transition: border-color .15s, background .15s, box-shadow .15s, transform .12s;
}

.cd-agent-btn:hover{
  border-color: rgba(138,180,255,.42);
  background: linear-gradient(180deg, rgba(20, 29, 46, .94), rgba(15, 22, 36, .96));
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.24);
}

.cd-agent-btn:active{ transform: translateY(0); }

.cd-agent-btn.is-active{
  border-color: rgba(63,233,255,.54);
  background: linear-gradient(180deg, rgba(24, 51, 87, .86), rgba(17, 36, 64, .90));
  box-shadow: 0 0 0 1px rgba(138,180,255,.14), 0 8px 14px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
}

.cd-agent-info{
  border-radius: 12px;
  border: 1px solid rgba(138,180,255,.24);
  background: rgba(7, 11, 18, .58);
  padding: 12px;
}

.cd-agent-info--split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .35fr);
  gap: 12px;
  align-items: center;
}

@media (max-width: 900px){
  .cd-agent-info--split{ grid-template-columns: 1fr; }
}

.cd-agent-info__main h3{ margin: 0 0 6px; font-size: 14px; }

.cd-agent-info__main p,
.cd-agent-info__list{ margin: 0; font-size: 12px; color: #bcd0ea; }

.cd-agent-name-side{ display: flex; flex-direction: column; gap: 6px; }

.cd-agent-name-side__head{ display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.cd-agent-name-count{ font-size: 11px; color: #9db4d7; }

.cd-agent-name-shell{ border-color: rgba(138,180,255,.28); background: rgba(255,255,255,.04); }

.cd-auto-duo{ display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; position: relative; }

.cd-auto-duo::before{
  content: "";
  position: absolute;
  top: 4px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  background: rgba(138,180,255,.26);
  pointer-events: none;
}

@media (max-width: 900px){
  .cd-auto-duo{ grid-template-columns: 1fr; }
  .cd-auto-duo::before{ display: none; }
}

.cd-auto-panel{ display: flex; flex-direction: column; gap: 8px; }

.cd-auto-panel__head{ display: flex; align-items: center; gap: 10px; }

.cd-auto-panel__step{
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(63,233,255,.40);
  background: linear-gradient(135deg, rgba(30,70,140,.60), rgba(18,45,100,.70));
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #a8e8ff;
  box-shadow: 0 0 8px rgba(63,233,255,.12), inset 0 1px 0 rgba(255,255,255,.08);
}

.cd-auto-panel__copy h3{ margin: 0; font-size: 14px; }

.cd-auto-panel__copy p{ margin: 2px 0 0; font-size: 12px; color: #bcd0ea; }

.cd-auto-minimal-input{ margin-top: 4px; }

.cd-auto-specialization-count{ font-size: 11px; color: #9db4d7; }

.cd-auto-specialization-shell{ border-color: rgba(138,180,255,.28); background: rgba(255,255,255,.04); }

.cd-auto-rollout{ margin-top: 10px; }

.cd-auto-rollout__split{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }

.cd-auto-rollout__split::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(138,180,255,.24);
}

@media (max-width: 900px){
  .cd-auto-rollout__split{ grid-template-columns: 1fr; }
  .cd-auto-rollout__split::before{ display: none; }
}

.cd-auto-list{ display: flex; flex-direction: column; gap: 8px; }

.cd-auto-empty{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px 24px;
  text-align: center;
  color: rgba(138,180,255,.55);
  font-size: 13px;
  line-height: 1.5;
}
.cd-auto-empty strong{
  display: block;
  color: #c8dcf8;
  font-size: 13px;
  font-weight: 600;
}
.cd-auto-empty span{
  color: rgba(138,180,255,.5);
  font-size: 12px;
}
.cd-auto-empty__icon{
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
  color: rgba(138,180,255,.35);
  animation: cd-empty-float 3s ease-in-out infinite;
}
@keyframes cd-empty-float{
  0%,100%{ transform: translateY(0); opacity: .35; }
  50%    { transform: translateY(-4px); opacity: .6; }
}
@media (prefers-reduced-motion: reduce){
  .cd-auto-empty__icon{ animation: none; }
}

.cd-auto-list-head h3{
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(180,210,255,.55);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.cd-auto-advanced{ border-radius: 12px; border: 1px solid rgba(138,180,255,.22); background: rgba(255,255,255,.03); padding: 8px 10px; }

.cd-auto-advanced > summary{ cursor: pointer; font-weight: 700; font-size: 12px; }

.cd-auto-actions{ margin-top: 8px; }

.cd-auto-help-trigger{
  margin: 0;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(20, 30, 48, .72);
  color: #d8e8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.cd-auto-help-modal{ position: fixed; inset: 0; display: none; }

.cd-auto-help-modal[aria-hidden="false"]{ display: block; }

.cd-auto-help-modal__backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.35); }

.cd-auto-help-modal__dialog{
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: 520px; width: min(520px, 92vw);
  border-radius: 14px; border: 1px solid rgba(138,180,255,.24);
  background: linear-gradient(180deg, rgba(15, 21, 34, .96), rgba(10, 15, 25, .97));
  padding: 16px;
  box-shadow: 0 22px 44px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08);
}

.cd-auto-help-close{ position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: #e8f3ff; font-size: 20px; }

.cd-auto-help-steps{ display: grid; gap: 10px; margin-top: 10px; }

.cd-auto-help-step{ display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }

.cd-auto-help-step__icon{ width: 24px; height: 24px; border-radius: 999px; border: 1px solid rgba(138,180,255,.36); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #bff7ff; }

.cd-auto-help-note{ font-size: 12px; color: #bcd0ea; margin-top: 10px; }

/* Timepicker */
.tt-timepicker{ display: grid; gap: 8px; max-width: none; }

.tt-timepicker__head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.tt-timepicker__label{ font-size: 12px; color: #b9cceb; }

.tt-timepicker__value{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; min-height: 24px; padding: 2px 10px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(12,18,30,.18); font-size: 14px; font-weight: 800; color: #e4f0ff;
}

.tt-timepicker__rail{ position: relative; padding-top: 12px; overflow: visible; }

.tt-timepicker__range{
  width: 100%; height: 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  appearance: none; outline: none; cursor: pointer;
}

.tt-timepicker__range::-webkit-slider-runnable-track{ height: 12px; border-radius: 999px; background: transparent; }

.tt-timepicker__range::-moz-range-track{ height: 12px; border-radius: 999px; background: transparent; }

.tt-timepicker__range::-webkit-slider-thumb{
  appearance: none; width: 18px; height: 18px; border-radius: 999px;
  background: rgba(14, 22, 37, .96); border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 22px rgba(0,0,0,.32); cursor: pointer; margin-top: -3px;
}

.tt-timepicker__range::-moz-range-thumb{
  width: 18px; height: 18px; border-radius: 999px;
  background: rgba(14, 22, 37, .96); border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 22px rgba(0,0,0,.32); cursor: pointer;
}

.tt-timepicker__bubble{
  position: absolute; top: -3px; left: 0;
  transform: translateX(-50%) translateY(-120%) scale(.98);
  opacity: 0; transition: opacity .16s ease, transform .16s ease; z-index: 9999;
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(12, 18, 30, .92); color: #ebf5ff; font-size: 12px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(0,0,0,.24); pointer-events: none; white-space: nowrap;
}

.tt-timepicker__bubble.is-active{ opacity: 1; transform: translateX(-50%) translateY(-130%) scale(1); }

.tt-timepicker__ticks{
  position: relative; height: 18px; margin-top: 8px;
  font-size: 11px; color: #9eb3d4;
}

.tt-timepicker__ticks > span{
  position: absolute; top: 0; left: 0; transform: translateX(-50%); white-space: nowrap;
}

/* Prompts page */
.cd-prompts-card{ display: flex; flex-direction: column; gap: 14px; }

.cd-prompts-controls{ display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.cd-prompts-controls__main{ min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.cd-prompts-controls__main p{ color: #bcd0ea; font-size: 13px; line-height: 1.45; margin: 0; }

.cd-prompts-load{ min-height: 42px; min-width: 170px; padding: 0 18px; }

.cd-prompts-quickpick{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cd-prompts-grid{ display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 12px; align-items: stretch; }

.cd-prompts-panel{ min-width: 0; border-radius: 12px; border: 1px solid rgba(138,180,255,.22); background: linear-gradient(180deg, rgba(16, 24, 37, .82), rgba(12, 20, 31, .76)); padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.cd-prompts-panel__head{ display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.cd-prompts-panel__meta{ font-size: 11px; color: #9eb6d8; }

.cd-presets-output{ margin: 0; min-height: 240px; max-height: 420px; overflow: auto; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: rgba(9, 14, 24, .78); color: #e6efff; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }

.cd-presets-actions{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.cd-presets-btn{ margin-top: 0; min-height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: #e4efff; font-size: 12px; font-weight: 650; }

.cd-presets-btn:hover{ border-color: rgba(138,180,255,.4); }

.cd-presets-btn:disabled{ opacity: .7; cursor: not-allowed; }

.cd-presets-btn--primary{ border-color: rgba(63,233,255,.36); background: linear-gradient(170deg, rgba(36,72,125,.82), rgba(22,42,75,.84)); }

.cd-presets-sources{ margin-top: 0; padding: 10px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.02); }

.cd-presets-sources__title{ margin: 0 0 6px; font-size: 11px; font-weight: 700; color: #a8b8d5; letter-spacing: .02em; text-transform: uppercase; }

.cd-presets-sources__list{ margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.cd-presets-sources__list a{ color: #c9dcff; font-size: 12px; line-height: 1.35; text-decoration: none; }

.cd-presets-sources__list a:hover{ color: #ecf5ff; text-decoration: underline; }

.cd-presets-note{ margin-top: 0; padding: 10px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.02); }

.cd-presets-note h3{ margin: 0 0 7px; font-size: 12px; color: #d7e4fb; }

.cd-presets-note ul{ margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: #c5d4ec; font-size: 12px; line-height: 1.4; }

@media (max-width: 980px){ .cd-prompts-grid{ grid-template-columns: 1fr; } }

@media (max-width: 760px){
  .cd-prompts-controls{ align-items: stretch; }
  .cd-prompts-load{ width: 100%; }
  .cd-prompts-quickpick{ grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------- */
/* Rollback lock: /automations + /prompts visual parity (before state)        */
/* -------------------------------------------------------------------------- */

body.page-automations .cd-page-stack,
body.page-prompts .cd-page-stack{
  max-width: 1140px;
  margin: 0 auto;
  gap: 16px;
}

body.page-automations .cd-page-hero,
body.page-prompts .cd-page-hero{
  padding: 20px 16px;
  border-radius: 14px;
}

body.page-automations .cd-auto-card,
body.page-prompts .cd-presets-page{
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow:
    0 12px 26px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.04);
}

body.page-automations .cd-page-hero__heading{
  font-size: 44px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: .005em;
}

body.page-prompts .cd-title{
  font-size: 44px;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: .005em;
}

body.page-automations .cd-page-hero__lead,
body.page-prompts .cd-page-hero__lead{
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

/* Automations: structure + spacing */
body.page-automations .cd-auto-card{
  gap: 12px;
}

body.page-automations .cd-agent-buttons{
  gap: 8px;
}

body.page-automations .cd-agent-btn{
  min-height: 58px;
  padding: 9px 12px;
  border-radius: 12px;
}

body.page-automations .cd-agent-btn__title{
  font-size: 14px;
  line-height: 1.2;
}

body.page-automations .cd-agent-btn__meta{
  font-size: 12px;
  line-height: 1.25;
}

body.page-automations .cd-agent-btn--with-icon{
  padding-right: 52px;
}

body.page-automations .cd-agent-btn__icon{
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
}

body.page-automations .cd-agent-info{
  padding: 10px 12px;
}

body.page-automations .cd-agent-name-side{
  max-width: 340px;
  margin-left: auto;
}

body.page-automations .cd-auto-duo{
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

body.page-automations .cd-auto-duo::before{
  top: 6px;
  bottom: 8px;
}

body.page-automations .cd-auto-panel{
  gap: 8px;
  min-height: 152px;
}

body.page-automations .cd-auto-panel__copy h3{
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0;
}

body.page-automations .cd-auto-panel__copy p{
  font-size: 12px;
  line-height: 1.35;
  margin: 2px 0 0;
}

body.page-automations .tt-timepicker{
  gap: 6px;
}

body.page-automations .tt-timepicker__head{
  min-height: 26px;
}

body.page-automations .tt-timepicker__range,
body.page-automations .tt-timepicker__range::-webkit-slider-runnable-track,
body.page-automations .tt-timepicker__range::-moz-range-track{
  height: 12px;
}

body.page-automations .tt-timepicker__ticks{
  margin-top: 6px;
}

body.page-automations .cd-auto-specialization-shell{
  min-height: 74px;
  padding: 8px;
}

body.page-automations #autoSpecialization{
  min-height: 58px;
  line-height: 1.35;
}

body.page-automations #autoCreate{
  margin-top: 2px;
  min-height: 50px;
  height: 50px;
  padding: 0 24px;
  border-radius: 13px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #294471 0%, #20365c 100%);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
}

body.page-automations .cd-auto-advanced{
  margin-top: 6px;
}

/* Force input alignment against global base textarea/select rules */
body.page-automations .cd-input-shell input,
body.page-automations .cd-input-shell textarea,
body.page-prompts .cd-input-shell input,
body.page-prompts .cd-input-shell textarea{
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Prompts: restore 3-column workflow layout */
body.page-prompts .cd-presets-page{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-prompts .cd-presets-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body.page-prompts .cd-presets-head h2{
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

body.page-prompts .cd-presets-head p{
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

body.page-prompts .cd-presets-grid{
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  grid-template-areas:
    "controls status status"
    "controls prompt sources"
    "controls actions sources"
    "controls . note";
  gap: 12px;
  align-items: start;
}

body.page-prompts .cd-presets-controls{
  grid-area: controls;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(138,180,255,.26);
  background: rgba(255,255,255,.03);
}

body.page-prompts #presetStatus{ grid-area: status; margin: 0; }
body.page-prompts #presetPrompt{ grid-area: prompt; min-height: 320px; max-height: 420px; margin: 0; }
body.page-prompts .cd-presets-actions{ grid-area: actions; margin: 0; }
body.page-prompts #presetSources{ grid-area: sources; min-height: 160px; }
body.page-prompts .cd-presets-note{ grid-area: note; }

body.page-prompts .cd-presets-load{
  margin-top: 0;
  width: 100%;
  min-height: 40px;
}

/* Header controls (language + profile menu + help) in rollback sizing */
body.page-automations .cd-auto-help-trigger{
  width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 24px;
}

body.page-automations .tt-profile-menu > summary,
body.page-prompts .tt-profile-menu > summary,
body.page-automations .cd-lang-switch,
body.page-prompts .cd-lang-switch{
  min-height: 34px !important;
  height: 34px;
  border-radius: 10px !important;
  padding: 0 10px !important;
  box-shadow: 0 2px 6px rgba(30,43,62,.10) !important;
}

/* Footer parity — pills float on all pages, no card wrapper */

@media (max-width: 1080px){
  body.page-prompts .cd-presets-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "status"
      "prompt"
      "actions"
      "sources"
      "note";
  }
}

@media (max-width: 900px){
  body.page-automations .cd-auto-duo{
    grid-template-columns: 1fr;
  }
  body.page-automations .cd-auto-duo::before{
    display: none;
  }
  body.page-automations .cd-agent-name-side{
    max-width: none;
    margin-left: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* 2026-03 UI cleanup overrides                                               */
/* -------------------------------------------------------------------------- */

/* ── Controls bar: Label links, Inhalt rechts — eine Mittellinie ─────────── */
.cd-controls-bar{
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 6px;
}

/* Jeder Block: Label links | Content rechts, vertikal zentriert */
.cd-control-block{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.cd-control-block--recent{
  flex: 1;
  min-width: 0;       /* verhindert Overflow über flex-1 hinaus */
  overflow: hidden;
}

.cd-control-block__label{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(200,225,255,.88);
  white-space: nowrap;
  line-height: 1;
  align-self: center;
}

/* ZULETZT: eigene Zeile zwischen Textarea und Controls-Bar */
#coreRecentInline{
  min-height: 0;
  overflow: hidden;
}
#coreRecentInline:empty{ display: none; }

/* ZULETZT: inline im Controls-Bar — Label links, Chips rechts, kein eigener Border */
#coreRecentInline .cd-prompt-history{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  min-width: 0;
  overflow: hidden;
}
#coreRecentInline .cd-prompt-history__label{
  width: auto;
  flex-shrink: 0;
  margin-bottom: 0;
}
#coreRecentInline .cd-prompt-history__chip{
  flex-shrink: 1;
  min-width: 60px;
  max-width: 200px;
}

/* Hook: eigene Zeile (label links, chips rechts) */
.cd-hook-row{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}
/* HOOK-Label frei verschoben — unabhängig von anderen Labels */
.cd-hook-row > .cd-control-block__label{
  position: relative;
  top: 5px;
}

/* ── Duration stepper — unified pill with SVG chevrons ───────────────────── */
.cd-dur-stepper {
  --cd-stepper-h: 34px;
  --cd-stepper-radius: 10px;
  --cd-stepper-border: rgba(138, 180, 255, 0.22);
  --cd-stepper-border-strong: rgba(138, 180, 255, 0.34);
  --cd-stepper-bg: linear-gradient(180deg, rgba(138, 180, 255, 0.08), rgba(138, 180, 255, 0.04));
  --cd-stepper-hover: rgba(138, 180, 255, 0.14);
  --cd-stepper-active: rgba(138, 180, 255, 0.20);
  --cd-stepper-text: #d7e7ff;
  --cd-stepper-text-soft: rgba(199, 220, 255, 0.72);
  display: inline-flex;
  align-items: stretch;
  height: var(--cd-stepper-h);
  border: 1px solid var(--cd-stepper-border);
  border-radius: var(--cd-stepper-radius);
  overflow: hidden;
  background: var(--cd-stepper-bg);
  backdrop-filter: blur(8px);
}

.cd-dur-step {
  width: 34px;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cd-stepper-text-soft);
  cursor: pointer;
  transition:
    background-color .16s ease,
    color .16s ease,
    opacity .16s ease,
    transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.cd-dur-step svg {
  width: 15px;
  height: 15px;
  display: block;
  flex: 0 0 auto;
}

.cd-dur-step:hover:not(:disabled) {
  background: var(--cd-stepper-hover);
  color: var(--cd-stepper-text);
}

.cd-dur-step:active:not(:disabled) {
  background: var(--cd-stepper-active);
  transform: scale(0.97);
}

.cd-dur-step:focus-visible {
  outline: none;
  background: rgba(138, 180, 255, 0.16);
  color: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(158, 200, 255, 0.26);
}

.cd-dur-step:disabled {
  opacity: 0.26;
  cursor: default;
  transform: none;
}

.cd-dur-step--minus {
  border-right: 1px solid rgba(138, 180, 255, 0.14);
}

.cd-dur-step--plus {
  border-left: 1px solid rgba(138, 180, 255, 0.14);
}

.cd-dur-step__val {
  min-width: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cd-stepper-text);
  user-select: none;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(158, 200, 255, 0.10);
}

/* ── Settings-Strip (legacy, anderswo möglich) ───────────────────────────── */
.cd-settings-strip{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 6px 0;
  border-top: 1px solid rgba(138,180,255,.08);
}

.cd-setting{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cd-setting__label{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(200,225,255,.60);
  white-space: nowrap;
  /* Force label to same height as chips so outer align-items:center works */
  display: inline-flex;
  align-items: center;
  height: 26px;
  line-height: 1;
}


/* Keep .cd-dur-chip for hook chips in strip (still used elsewhere) */
.cd-dur-chip{
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(138,180,255,.15);
  background: none;
  color: rgba(200,220,255,.50);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.cd-dur-chip:hover{
  border-color: rgba(138,180,255,.35);
  color: #dbe8ff;
  background: rgba(138,180,255,.07);
}
.cd-dur-chip.is-selected{
  border-color: rgba(99,160,255,.55);
  background: rgba(99,160,255,.14);
  color: #9ec8ff;
  font-weight: 700;
}

/* Trenner im Stepper-Pill */
.cd-stepper-sep{
  display: block;
  width: 1px;
  align-self: stretch;
  background: var(--cd-stepper-border);
  flex-shrink: 0;
}

/* Audio-Button im Stepper-Pill */
.cd-audio-chip{
  width: auto;
  padding: 0 12px;
  font-weight: 700;
  gap: 5px;
  font-size: 12px;
  color: rgba(190,215,255,.60);
}
.cd-audio-chip.is-selected{
  color: #9ec8ff;
}

/* Audio chip state spans */
.cd-audio-chip .cd-audio-chip__on,
.cd-audio-chip .cd-audio-chip__off{
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cd-audio-chip .cd-audio-chip__on svg,
.cd-audio-chip .cd-audio-chip__off svg{
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
/* Default (off): show __off, hide __on */
.cd-audio-chip .cd-audio-chip__on{ display: none; }
.cd-audio-chip .cd-audio-chip__off{ display: inline-flex; }
/* Selected (on): show __on, hide __off */
.cd-audio-chip.is-selected .cd-audio-chip__on{ display: inline-flex; }
.cd-audio-chip.is-selected .cd-audio-chip__off{ display: none; }

/* TikTok block in strip */
.cd-setting--tiktok{
  flex-wrap: wrap;
  gap: 6px;
}
.cd-setting--tiktok .cd-field__hint{
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #ffb347;
}
.cd-setting--tiktok .cd-field__help{
  margin: 0;
  font-size: 11px;
  color: rgba(157,180,212,.55);
}
.cd-setting--tiktok .tt-header-connect{
  font-size: 12px;
  padding: 4px 10px;
  min-height: 28px;
}

/* Prompt input fields: fixed scrollbar position + no manual resizing */
textarea,
.cd-field__control textarea,
.cd-input-shell textarea{
  resize: none !important;
}

.cd-input-shell--core,
#inputPromptShell,
#imagePromptGroup .cd-input-shell,
body.page-automations .cd-auto-specialization-shell{
  padding: 0;
}

#corePrompt,
#inputPrompt,
#inputImagePrompt{
  margin: 0;
  padding: 12px 12px 12px 14px;
}

body.page-automations #autoSpecialization{
  margin: 0;
  padding: 10px 16px;
}

/* /automations layout cleanup */
body.page-automations .wrap{
  max-width: 1240px; /* content = 1240px = stack max-width → kein auto-margin → header = stack */
}

body.page-automations .cd-page-stack{
  max-width: 1240px;
  gap: 18px;
}

body.page-automations .tt-footer{
  max-width: 1240px;
}

body.page-automations .cd-page-hero{
  padding: 20px 16px;
}

body.page-automations .cd-page-hero__heading{
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: .002em;
}

body.page-automations .cd-page-hero__lead{
  font-size: 14px;
  line-height: 1.45;
}

body.page-automations .cd-auto-help-trigger{
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(138,180,255,.34);
  background: linear-gradient(180deg, rgba(24, 35, 56, .92), rgba(16, 24, 40, .88));
  color: #e7f3ff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

body.page-automations .cd-auto-help-trigger:hover{
  border-color: rgba(138,180,255,.52);
  box-shadow: 0 0 0 1px rgba(138,180,255,.18), 0 8px 14px rgba(0,0,0,.24);
}

body.page-automations .cd-auto-card{
  padding: 18px 20px 16px;
  gap: 16px;
}

body.page-automations .cd-agent-buttons{
  gap: 10px;
}

body.page-automations .cd-agent-btn{
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 12px;
}

body.page-automations .cd-agent-btn__title{
  font-size: 15px;
  line-height: 1.25;
}

body.page-automations .cd-agent-btn__meta{
  font-size: 12px;
  line-height: 1.35;
}

body.page-automations .cd-agent-btn--with-icon{
  padding-right: 50px;
}

body.page-automations .cd-agent-info{
  padding: 0;
}

body.page-automations .cd-agent-info--triple{
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr) 130px;
  align-items: stretch;
}

body.page-automations .cd-agent-info__main{
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px 12px 14px;
}

body.page-automations .cd-agent-info__main h3{
  margin: 0;
  font-size: 16px;
}

body.page-automations .cd-agent-info__subtopic{
  margin: 3px 0 0 !important;
  display: inline-flex;
  align-items: center;
  font-size: 11px !important;
  font-weight: 700;
  color: rgba(138,180,255,.80) !important;
  background: rgba(138,180,255,.10);
  border: 1px solid rgba(138,180,255,.22);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: .01em;
}

body.page-automations .cd-agent-info__main p{
  margin: 0;
  font-size: 13px;
  line-height: 1.42;
}

body.page-automations .cd-agent-info__list{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
  font-size: 12px;
  line-height: 1.38;
}

body.page-automations .cd-agent-info--triple .cd-agent-name-side{
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 12px 16px;
  gap: 8px;
  justify-content: center;
}

body.page-automations .cd-agent-name-side{
  gap: 8px;
}

body.page-automations .cd-agent-name-shell{
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

body.page-automations #autoName{
  margin: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  line-height: 1.2;
  font-size: 13px;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.cd-input-shell input:focus,
.cd-input-shell textarea:focus{
  outline: none !important;
  box-shadow: none !important;
}

body.page-automations .cd-agent-info--triple{
  margin-bottom: 10px;
}

body.page-automations .cd-auto-duo{
  gap: 24px;
}

body.page-automations .cd-auto-card > .cd-auto-duo:last-of-type,
body.page-automations .cd-auto-custom-panel + .cd-auto-duo,
body.page-automations .cd-auto-duo{
  margin-bottom: 10px;
}

body.page-automations .cd-auto-duo::before{
  top: 8px;
  bottom: 10px;
  left: 50%;
}

body.page-automations .cd-auto-panel{
  padding: 0 14px;
  gap: 10px;
}

body.page-automations .cd-auto-panel__head{
  align-items: flex-start;
}

body.page-automations .cd-auto-panel__step{
  margin-top: 0;
}

body.page-automations .cd-auto-panel__copy{
  padding-top: 3px;
}

body.page-automations .cd-auto-panel__copy h3{
  font-size: 15px;
  line-height: 1.26;
}

body.page-automations .cd-auto-panel__copy p{
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.42;
}

body.page-automations .cd-auto-specialization-shell{
  height: 96px;
  min-height: 96px;
  max-height: 96px;
}

body.page-automations #autoSpecialization{
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  line-height: 1.35;
}

body.page-automations .cd-auto-actions-row{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

body.page-automations #autoCreate{
  width: 300px;
  max-width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .01em;
}

body.page-automations #autoCreateTest{
  height: 42px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, #252525 0%, #161616 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s, box-shadow .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow:
    0 6px 16px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.08);
}

body.page-automations #autoCreateTest:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.28);
  box-shadow:
    0 8px 20px rgba(0,0,0,.36),
    0 0 0 1px rgba(37,244,238,.22),
    0 0 12px rgba(254,44,85,.14),
    inset 0 1px 0 rgba(255,255,255,.09);
}

body.page-automations #autoCreateTest:active{
  transform: translateY(0);
}

body.page-automations #autoCreateTest:disabled{
  opacity: .50;
  cursor: not-allowed;
  transform: none;
}

.cd-auto-test-btn__icon{
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 1;
  filter: none !important;
  box-shadow: none !important;
  transform: none;
  mix-blend-mode: normal;
  image-rendering: auto;
}

/* ── Button spinner ─────────────────────────────────────────────────────── */
@keyframes cd-spin{
  to{ transform: rotate(360deg); }
}
.cd-spinner{
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cd-spin .65s linear infinite;
  flex: 0 0 14px;
}
/* Buttons that contain a spinner → inline-flex for alignment */
button.is-loading{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: wait !important;
  pointer-events: none;
}
/* Smaller spinner inside the ghost test button */
body.page-automations #autoCreateTest.is-loading .cd-spinner{
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-width: 1.5px;
}
/* Keep glow button text size consistent when loading */
body.page-automations #autoCreate.is-loading{
  font-size: 15px;
}
body.page-automations #autoCreate.is-loading .cd-spinner{
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-width: 2.5px;
  opacity: .9;
}

body.page-automations .cd-auto-test-result{
  margin-top: 4px;
  border-radius: 11px;
  border: 1px solid rgba(138,180,255,.24);
  background: rgba(18, 27, 43, .58);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-automations .cd-auto-test-result.is-success{
  border-color: rgba(96, 211, 171, .34);
  background: rgba(12, 44, 37, .40);
}

body.page-automations .cd-auto-test-result.is-error{
  border-color: rgba(255, 132, 132, .34);
  background: rgba(66, 24, 24, .44);
}

body.page-automations .cd-auto-test-result__text{
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.page-automations .cd-auto-test-result__text strong{
  margin: 0;
  font-size: 13px;
  color: #e6f0ff;
}

body.page-automations .cd-auto-test-result__text span{
  font-size: 12px;
  color: #b9cbe5;
  line-height: 1.34;
}

body.page-automations .cd-auto-test-result__actions{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-automations .cd-auto-test-result__btn{
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(138,180,255,.30);
  background: rgba(27, 41, 63, .85);
  color: #e8f3ff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

body.page-automations .cd-auto-test-result__btn--ghost{
  background: rgba(255,255,255,.04);
}

body.page-automations .cd-auto-rollout{
  margin-top: 8px;
  padding: 0;
  overflow: hidden;
  border-radius: 11px;
  border: 1px solid rgba(138,180,255,.22);
  background: linear-gradient(180deg, rgba(15, 22, 36, .66), rgba(11, 18, 30, .62));
}

body.page-automations .cd-auto-rollout > summary{
  list-style: none;
  cursor: pointer;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 800;
  color: #dfeeff;
  letter-spacing: .01em;
  background: linear-gradient(180deg, rgba(22, 32, 50, .72), rgba(16, 24, 38, .70));
}

body.page-automations .cd-auto-rollout > summary::-webkit-details-marker{
  display: none;
}

body.page-automations .cd-auto-rollout > summary::before{
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("/static/icons/history.svg?v=1") center / 16px 16px no-repeat;
  mask: url("/static/icons/history.svg?v=1") center / 16px 16px no-repeat;
  opacity: .86;
}

body.page-automations .cd-auto-rollout[open] > summary{
  border-bottom: 1px solid rgba(138,180,255,.20);
}

body.page-automations .cd-auto-rollout__split{
  padding: 12px 12px 14px;
}

/* Help modal cleanup */
body.cd-auto-help-open{
  overflow: hidden;
}

.cd-auto-help-modal{
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.cd-auto-help-modal[aria-hidden="false"]{
  opacity: 1;
  pointer-events: auto;
}

.cd-auto-help-modal__backdrop{
  background: rgba(8, 12, 22, .56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cd-auto-help-modal__dialog{
  width: min(560px, 92vw);
  padding: 18px 18px 16px;
  border-radius: 16px;
}

.cd-auto-help-modal__dialog h3{
  margin: 0 34px 8px 0;
  font-size: 18px;
  line-height: 1.3;
}

.cd-auto-help-close{
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(255,255,255,.03);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cd-auto-help-steps{
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.cd-auto-help-step{
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 3px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(138,180,255,.26);
  background: rgba(11, 18, 31, .62);
}

.cd-auto-help-step__icon{
  width: 24px;
  height: 24px;
  margin-top: 1px;
}

.cd-auto-help-step h4{
  grid-column: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.cd-auto-help-step p{
  grid-column: 2;
  margin: 0;
  font-size: 12px;
  line-height: 1.42;
}

.cd-auto-help-note{
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(138,180,255,.22);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-auto-help-note svg{
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .6;
}

@media (max-width: 600px){
  .cd-auto-help-modal__dialog{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: 12px;
    transform: none;
    width: auto;
    max-width: none;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    padding: 16px;
  }
}

@media (max-width: 900px){
  body.page-automations .cd-agent-info--triple{
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  body.page-automations .cd-agent-info--triple .cd-agent-info__main{
    grid-column: 1 / -1;
  }
  body.page-automations .cd-agent-info--triple .cd-agent-name-side{
    border-left: 0;
    border-top: 1px solid rgba(138,180,255,.18);
  }
  body.page-automations .cd-agent-info--triple .cd-clip-length-col{
    align-items: flex-start;
    border-top: 1px solid rgba(138,180,255,.18);
  }

  body.page-automations .cd-agent-name-side{
    min-width: 0;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-top: 0;
  }

  body.page-automations .cd-auto-panel{
    padding: 0;
  }

  body.page-automations #autoCreate{
    width: 100%;
    max-width: 380px;
    margin-left: 0;
  }

  body.page-automations .cd-auto-actions-row{
    width: 100%;
    align-items: center;
  }

  body.page-automations #autoCreateTest{
    width: 200px;
    max-width: 100%;
    justify-content: center;
  }

  body.page-automations .cd-auto-test-result{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Chips placed inside agent-buttons grid on mobile span all columns */
#autoAgentButtons > .cd-chips-row{
  grid-column: 1 / -1;
}

/* ── News Sub-Chips ────────────────────────────────────────────────────── */
.cd-chips-row{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px 22px;
  position: relative;
  margin-top: -4px; /* visually close gap to category buttons */
}

/* ↳ connector line from Nachrichten button to chips */
.cd-chips-row::before{
  content: "";
  position: absolute;
  left: 0;
  top: -10px;
  width: 14px;
  height: calc(50% + 10px);
  border-left: 1.5px solid rgba(138,180,255,.30);
  border-bottom: 1.5px solid rgba(138,180,255,.30);
  border-radius: 0 0 0 5px;
  pointer-events: none;
}

.cd-chip{
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(138,180,255,.07);
  color: rgba(210,225,255,.80);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  user-select: none;
}
.cd-chip:hover{
  background: rgba(138,180,255,.18);
  color: #c8daff;
  border-color: rgba(138,180,255,.5);
}
.cd-chip.is-active{
  background: rgba(63,157,255,.26);
  border-color: rgba(63,157,255,.65);
  color: #bdd6ff;
  font-weight: 600;
}

/* ── Agent-Info Triple Layout (Info | Name | Clip-Länge) ───────────────── */
.cd-agent-info--triple{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .35fr) auto;
  gap: 0;
}

.cd-agent-info--triple .cd-agent-name-side{
  border-left: 1px solid rgba(138,180,255,.20);
  padding: 0 16px;
}

.cd-agent-info--triple .cd-clip-length-col{
  border-left: 1px solid rgba(138,180,255,.20);
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 96px;
}

@media (max-width: 900px){
  .cd-agent-info--triple{
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .cd-agent-info--triple .cd-agent-info__main{
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(138,180,255,.18);
    padding-bottom: 10px;
    margin-bottom: 4px;
  }
  .cd-agent-info--triple .cd-agent-name-side{
    border-left: 0;
    padding-left: 0;
  }
  .cd-agent-info--triple .cd-clip-length-col{
    align-items: flex-start;
    border-left: 1px solid rgba(138,180,255,.18);
  }
}

@media (max-width: 600px){
  .cd-agent-info--triple{
    grid-template-columns: 1fr;
  }
  .cd-agent-info--triple .cd-agent-info__main{
    grid-column: 1;
  }
  .cd-agent-info--triple .cd-clip-length-col{
    border-left: 0;
    padding-left: 0;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ── Clip Length Column ─────────────────────────────────────────────────── */
.cd-clip-length-label{
  font-size: 11px;
  font-weight: 600;
  color: rgba(180,200,230,.60);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.cd-clip-length-sub{
  font-size: 11px;
  color: rgba(180,200,230,.65);
  white-space: nowrap;
}

/* ── Short/Long Toggle ─────────────────────────────────────────────────── */
.cd-clip-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-clip-toggle__label{
  font-size: 12px;
  color: rgba(210,225,255,.65);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.cd-clip-toggle__label--long{
  color: rgba(210,225,255,.65);
}

/* Toggle Switch */
.cd-switch{
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.cd-switch input{ opacity: 0; width: 0; height: 0; }
.cd-switch__slider{
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(138,180,255,.30);
  border-radius: 20px;
  transition: background 0.2s, border-color 0.2s;
}
.cd-switch__slider::before{
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(180,200,230,.75);
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s, background 0.2s;
}
.cd-switch input:checked + .cd-switch__slider{
  background: rgba(63,157,255,.30);
  border-color: rgba(63,157,255,.65);
}
.cd-switch input:checked + .cd-switch__slider::before{
  transform: translate(16px, -50%);
  background: #a8caff;
}

/* Active side highlights */
.cd-clip-toggle:has(input:not(:checked)) .cd-clip-toggle__label:first-child{
  color: rgba(210,225,255,.85);
}
.cd-clip-toggle:has(input:checked) .cd-clip-toggle__label--long{
  color: rgba(168,202,255,.90);
}

/* ── Custom Form ───────────────────────────────────────────────────────── */
.cd-auto-custom-panel{
  margin-top: 4px;
}
.cd-custom-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cd-custom-form__field{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cd-custom-form__row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px){
  .cd-custom-form__row{ grid-template-columns: 1fr; }
}
.cd-field__required{
  color: rgba(255,120,120,.8);
  font-size: 11px;
  margin-left: 2px;
}
.cd-input-shell--select select{
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  appearance: none;
}

/* ── Tips Box ──────────────────────────────────────────────────────────── */
.cd-tips-box{
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(138,180,255,.18);
  background: rgba(138,180,255,.05);
  font-size: 12px;
  color: rgba(210,225,255,.65);
  line-height: 1.6;
}
.cd-tips-box strong{
  display: block;
  color: rgba(210,225,255,.8);
  margin-bottom: 6px;
  font-size: 12px;
}
.cd-tips-box ul{
  margin: 0;
  padding: 0;
  list-style: none;
}
.cd-tips-box li{
  padding: 1px 0;
}
.cd-tips-box em{
  color: rgba(210,225,255,.85);
  font-style: normal;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* A: Video Lightbox                                                           */
/* ─────────────────────────────────────────────────────────────────────────── */
#cdLightboxOverlay{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#cdLightboxOverlay.is-open{ display: flex; }

.cd-lb__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cd-lb__dialog{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: min(90vw, 400px);
  animation: cd-lb-in .18s ease;
}
@keyframes cd-lb-in{
  from{ opacity:0; transform:scale(.94) translateY(8px); }
  to{ opacity:1; transform:scale(1) translateY(0); }
}
.cd-lb__close{
  position: absolute;
  top: -44px;
  right: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.9);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.cd-lb__close:hover{ background: rgba(255,255,255,.22); }
.cd-lb__video-wrap{
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
}
.cd-lb__video{
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}
.cd-lb__footer{
  display: flex;
  justify-content: center;
}
.cd-lb__download{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 10px;
  background: rgba(138,180,255,.1);
  border: 1px solid rgba(138,180,255,.25);
  color: #dbe8ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.cd-lb__download:hover{
  background: rgba(138,180,255,.2);
  border-color: rgba(138,180,255,.45);
}
body.cd-lb-open{ overflow: hidden; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* C: Job-Fortschrittsanzeige                                                  */
/* ─────────────────────────────────────────────────────────────────────────── */
.cd-job-progress{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.cd-job-progress__bar-wrap{
  height: 3px;
  border-radius: 999px;
  background: rgba(63,233,255,.12);
  overflow: hidden;
}
.cd-job-progress__bar{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(63,233,255,.5), rgba(138,180,255,.9), rgba(63,233,255,.5));
  background-size: 200% 100%;
  animation: cd-progress-slide 1.8s linear infinite;
}
@keyframes cd-progress-slide{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}
.cd-job-progress__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.cd-job-progress__phase{
  color: rgba(180,200,240,.7);
}
.cd-job-progress__elapsed{
  font-variant-numeric: tabular-nums;
  color: rgba(138,180,255,.5);
  font-family: ui-monospace, monospace;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* D: Landing Page                                                             */
/* ─────────────────────────────────────────────────────────────────────────── */
.cd-site-how{ padding: 24px 22px 18px; }
.cd-site-how__title{
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #dbe8ff;
  letter-spacing: -.015em;
}

.cd-site-hero{
  padding: 64px 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}
.cd-site-hero__eyebrow{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(138,180,255,.9);
}
.cd-site-hero__heading{
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 800;
  line-height: 1.14;
  color: #eef5ff;
  letter-spacing: -.025em;
  margin: 0;
}
.cd-site-hero__heading span{
  background: linear-gradient(100deg, #7eb8ff, #3fe9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(63,233,255,.22));
}
.cd-site-hero__lead{
  max-width: 540px;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(200,220,255,.75);
  margin: 0;
}
.cd-site-hero__cta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59,116,211,.65), rgba(32,169,209,.55));
  border: 1px solid rgba(138,180,255,.35);
  color: #eef8ff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(63,180,255,.18);
  transition: box-shadow .2s, transform .15s;
}
.cd-site-hero__cta:hover{
  box-shadow: 0 6px 28px rgba(63,180,255,.28);
  transform: translateY(-1px);
}
.cd-site-features{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 20px;
}
.cd-site-features--2x2{
  grid-template-columns: repeat(2, 1fr);
}
@media(max-width: 640px){
  .cd-site-features{ grid-template-columns: 1fr; }
  .cd-site-features--2x2{ grid-template-columns: 1fr; }
}
.cd-site-feature{
  background: linear-gradient(180deg, rgba(21,31,50,.84), rgba(15,23,39,.82));
  border: 1px solid rgba(138,180,255,.18);
  border-radius: 14px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform .15s, box-shadow .18s, border-color .15s;
}
.cd-site-feature:hover{
  transform: translateY(-2px);
  border-color: rgba(138,180,255,.30);
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}
.cd-site-feature__icon{
  font-size: 22px;
  line-height: 1;
  width: 24px;
  height: 24px;
  color: rgba(138,180,255,.75);
  display: flex;
  align-items: center;
}
.cd-site-feature__icon svg{
  width: 24px;
  height: 24px;
}
.cd-site-feature__title{
  font-size: 14px;
  font-weight: 700;
  color: #dbe8ff;
  margin: 0;
}
.cd-site-feature__text{
  font-size: 12px;
  line-height: 1.5;
  color: rgba(180,200,240,.65);
  margin: 0;
}
.cd-site-feature-link{
  color: #3fe9ff;
  text-decoration: none;
  font-weight: 600;
}
.cd-site-steps{
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 20px;
  counter-reset: steps;
}
.cd-site-step{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(138,180,255,.08);
  counter-increment: steps;
}
.cd-site-step:last-child{ border-bottom: none; }
.cd-site-step__num{
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(63,150,255,.22), rgba(42,100,200,.14));
  border: 1.5px solid rgba(63,170,255,.38);
  color: #9ecfff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(40,100,220,.16), inset 0 1px 0 rgba(255,255,255,.08);
  letter-spacing: -.01em;
}
.cd-site-step__num svg{
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.cd-site-step__text{
  font-size: 13px;
  line-height: 1.5;
  color: rgba(200,220,255,.8);
  margin: 0;
  padding-top: 4px;
}
/* Pricing section */
.cd-site-pricing{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 20px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18,28,46,.92), rgba(12,20,36,.90));
  border: 1px solid rgba(138,180,255,.16);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
/* ── Beta Preview Section ─────────────────────────────────────────────── */
.cd-site-beta-preview{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cd-site-beta-preview__label{
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(138,180,255,.60);
  margin: 0;
}
.cd-site-beta-preview__label svg{
  width: 13px;
  height: 13px;
  opacity: .70;
}
.cd-site-beta-cards{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px){
  .cd-site-beta-cards{ grid-template-columns: 1fr; }
}
.cd-site-beta-card{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(138,180,255,.12);
  background: rgba(8,14,28,.40);
}
.cd-site-beta-card__icon{
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(63,157,255,.08);
  color: rgba(138,180,255,.60);
}
.cd-site-beta-card__icon svg{
  width: 16px;
  height: 16px;
}
.cd-site-beta-card__name{
  font-size: 15px;
  font-weight: 700;
  color: rgba(220,235,255,.75);
}
.cd-site-beta-card__desc{
  font-size: 13px;
  line-height: 1.55;
  color: rgba(160,188,228,.55);
  margin: 0;
  flex: 1;
}
.cd-site-btn--sm{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(63,157,255,.08);
  color: rgba(138,180,255,.80);
  text-decoration: none;
  align-self: flex-start;
  margin-top: 4px;
  transition: border-color .14s, background .14s, color .14s;
}
.cd-site-btn--sm:hover{
  border-color: rgba(138,180,255,.50);
  background: rgba(63,157,255,.14);
  color: rgba(180,210,255,.95);
}

/* ── Hero CTA Beta badge ──────────────────────────────────────────────── */
.cd-site-btn__meta--beta{
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: .75;
}
.cd-site-btn__meta--beta svg{
  width: 11px;
  height: 11px;
}

/* ── Cookie Notice ────────────────────────────────────────────────────── */
  font-weight: 800;
  color: #e5f0ff;
  letter-spacing: -.01em;
}
.cd-site-pricing__sub{
  margin: 0;
  font-size: 13px;
  color: rgba(170,195,235,.65);
}
.cd-site-pricing__cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
}
.cd-site-pricing__card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 10px;
  border: 1px solid rgba(138,180,255,.18);
  background: rgba(8, 14, 28, 0.82);
}
.cd-site-pricing__card--featured{
  border-color: rgba(63,233,255,.32);
  background: rgba(6, 20, 38, 0.85);
}
.cd-site-pricing__card-icon{
  width: 20px;
  height: 20px;
  color: rgba(138,180,255,.7);
}
.cd-site-pricing__card--featured .cd-site-pricing__card-icon{
  color: rgba(63,233,255,.85);
}
.cd-site-pricing__card-icon svg{ width: 20px; height: 20px; }
.cd-site-pricing__card-name{
  font-size: 13px;
  font-weight: 700;
  color: #d8eaff;
  letter-spacing: .01em;
}
.cd-site-pricing__card-desc{
  margin: 0;
  font-size: 10.5px;
  color: rgba(160,188,228,.80);
  line-height: 1.4;
}
.cd-site-pricing__note{
  margin: 0;
  font-size: 11.5px;
  color: rgba(160,188,228,.80);
}
@media (max-width: 520px){
  .cd-site-pricing__cards{ grid-template-columns: 1fr; max-width: 320px; }
}


.cd-site-legal{
  border-top: 1px solid rgba(138,180,255,.1);
  padding-top: 16px;
  margin-top: 4px;
}
.cd-site-legal summary,
.cd-hooks-faq summary{
  cursor: pointer;
  font-size: 12px;
  color: var(--cd-text);
  user-select: none;
  list-style: none;
  display: block;
  width: 100%;
}
.cd-site-legal summary::-webkit-details-marker,
.cd-hooks-faq summary::-webkit-details-marker{ display: none; }
.cd-site-legal summary::before,
.cd-hooks-faq summary::before{ content: '+ '; }
details[open].cd-site-legal summary::before,
details[open].cd-hooks-faq summary::before{ content: '− '; }
.cd-hooks-faq{ padding: 14px 20px; }
.cd-site-legal-body{
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(180,200,240,.6);
}
.cd-site-legal-body h2{
  font-size: 13px;
  font-weight: 700;
  color: rgba(200,220,255,.7);
  margin: 16px 0 4px;
}
.cd-site-legal-body p,
.cd-site-legal-body ul,
.cd-site-legal-body ol{
  margin: 0 0 6px;
}
.cd-site-legal-body li{ margin: 0 0 3px; }
.cd-site-legal-body a{ color: rgba(138,180,255,.7); }

/* E: Pack-Buttons verbessert */
.cd-pack-btn{
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(63,180,255,.06);
  border: 1px solid rgba(138,180,255,.18);
  color: #dbe8ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
  gap: 0;
}
.cd-pack-btn:hover{
  background: rgba(63,180,255,.14);
  border-color: rgba(138,180,255,.40);
  box-shadow: 0 0 0 1px rgba(138,180,255,.12);
}
.cd-pack-btn__credits{
  font-size: 18px;
  font-weight: 800;
  color: #eef8ff;
  min-width: 32px;
}
.cd-pack-btn__label{
  flex: 1;
  padding-left: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(180,200,240,.55);
}
.cd-pack-btn__label br + *,
.cd-pack-btn__label br { display: block; }
.cd-pack-btn__arrow{
  font-size: 14px;
  opacity: .6;
  color: rgba(138,180,255,.8);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* B: Automations Run/Schedule Timeline                                        */
/* ─────────────────────────────────────────────────────────────────────────── */
.cd-auto-item{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid rgba(138,180,255,.11);
}
.cd-auto-item:last-child{ border-bottom: none; }

.cd-auto-item__dot-col{
  flex-shrink: 0;
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3px;
  gap: 0;
}
.cd-auto-item__dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(138,180,255,.3);
  border: 1.5px solid rgba(138,180,255,.4);
  flex-shrink: 0;
}
.cd-auto-item__dot.is-done{ background: #4ade80; border-color: rgba(74,222,128,.6); box-shadow: 0 0 6px rgba(74,222,128,.3); }
.cd-auto-item__dot.is-error{ background: #f87171; border-color: rgba(248,113,113,.6); box-shadow: 0 0 6px rgba(248,113,113,.3); }
.cd-auto-item__dot.is-running{ background: #fbbf24; border-color: rgba(251,191,36,.6); box-shadow: 0 0 6px rgba(251,191,36,.3); animation: dot-pulse .9s ease-in-out infinite; }
@keyframes dot-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.4; } }

.cd-auto-item__body{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cd-auto-item__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cd-auto-item__title{
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #dbe8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-auto-item__status{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  background: rgba(138,180,255,.08);
  border: 1px solid rgba(138,180,255,.2);
  color: rgba(180,200,240,.8);
}
.cd-auto-item__status.is-done{ background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25); color: #a6f4c5; }
.cd-auto-item__status.is-error{ background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.25); color: #fca5a5; }
.cd-auto-item__status.is-running,
.cd-auto-item__status.is-enabled{ background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.25); color: #fde68a; }

.cd-auto-run-badge{
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid;
  vertical-align: middle;
}
.cd-auto-run-badge.is-ok{ background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.30); color: #86efac; }
.cd-auto-run-badge.is-error{ background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.30); color: #fca5a5; }
.cd-auto-run-badge.is-running-run{ background: rgba(96,165,250,.08); border-color: rgba(96,165,250,.28); color: #93c5fd; }

.cd-auto-item__meta{
  font-size: 11px;
  color: rgba(160,185,225,.6);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-auto-job-link{
  color: rgba(138,180,255,.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(138,180,255,.25);
  transition: color .12s, border-color .12s;
}
.cd-auto-job-link:hover{
  color: #8ab4ff;
  border-color: rgba(138,180,255,.6);
}
.cd-auto-item__actions{
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.cd-auto-action{
  margin: 0;
  padding: 4px 11px;
  border-radius: 7px;
  border: 1px solid rgba(138,180,255,.24);
  background: linear-gradient(180deg, rgba(22,32,52,.80), rgba(16,24,40,.86));
  color: rgba(190,215,255,.80);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .12s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.cd-auto-action:hover{
  background: linear-gradient(180deg, rgba(30,50,88,.88), rgba(20,36,68,.92));
  border-color: rgba(138,180,255,.42);
  color: #dbe8ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.07);
}
.cd-auto-action:active{ transform: translateY(0); }
.cd-auto-action--dl{
  text-decoration: none;
  color: rgba(130,220,160,.80);
  border-color: rgba(130,220,160,.22);
  background: linear-gradient(180deg, rgba(16,38,26,.80), rgba(10,28,18,.86));
}
.cd-auto-action--dl:hover{
  color: #82dca0;
  border-color: rgba(130,220,160,.42);
  background: linear-gradient(180deg, rgba(22,56,36,.88), rgba(14,40,24,.92));
}

/* ── Viral Hook Selector ─────────────────────────────────────────────────── */
.cd-hook-selector{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 6px;
  border-top: 1px solid rgba(138,180,255,.12);
  margin-top: 10px;
}
.cd-hook-selector--auto{
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 6px;
}
.cd-hook-selector__label{
  font-size: 10px;
  font-weight: 700;
  color: rgba(180,210,255,.60);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cd-hook-selector__opt{
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(180,200,240,.65);
}
.cd-hook-selector__chips{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cd-hook-chip{
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(138,180,255,.18);
  background: rgba(138,180,255,.06);
  color: rgba(190,215,250,.92);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
  white-space: nowrap;
}
.cd-hook-chip:hover{
  background: rgba(138,180,255,.14);
  border-color: rgba(138,180,255,.38);
  color: #dbe8ff;
}
.cd-hook-chip.is-selected{
  background: rgba(99,160,255,.18);
  border-color: rgba(99,160,255,.55);
  color: #9ec8ff;
  padding-right: 8px;
}
.cd-hook-chip.is-selected::after{
  content: "✓";
  margin-left: 5px;
  font-size: 10px;
  opacity: .9;
  font-weight: 700;
}
/* Video preview bubble beim Hover */
.cd-hook-preview{
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(138,180,255,.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .18s ease;
  width: 80px;
  aspect-ratio: 9/16;
  background: #0b0f1a;
}
.cd-hook-preview.is-visible{
  opacity: 1;
}
.cd-hook-preview video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Feedback Rating Widget ──────────────────────────────────────────────── */
/* The outer div is a pure positioning shell — transparent, no background.     */
/* All pill styling lives on the <button>, which can safely use transform       */
/* on hover without conflicting with the div's translateY(-50%) centering.      */
.cd-feedback-widget{
  background: none;
  border: none;
  padding: 0;
}
.cd-feedback-widget.is-done{
  opacity: .35;
  pointer-events: none;
}
.cd-feedback-trigger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 14px;
  margin: 0;
  border-radius: 11px;
  border: 1px solid rgba(138,180,255,.34);
  background: linear-gradient(180deg, rgba(22,34,54,.96), rgba(14,22,35,.96));
  color: #ddeeff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 6px 18px rgba(0,0,0,.38),
    0 2px 6px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.cd-feedback-trigger:hover{
  border-color: rgba(138,180,255,.56);
  background: linear-gradient(180deg, rgba(30,46,72,.98), rgba(20,32,52,.98));
  color: #f3f8ff;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(138,180,255,.20),
    0 10px 24px rgba(0,0,0,.40),
    inset 0 1px 0 rgba(255,255,255,.09);
}
.cd-feedback-trigger:disabled{ cursor: default; }
.cd-feedback-trigger__star{
  font-size: 13px;
  color: #f5a623;
  line-height: 1;
}
.cd-feedback-trigger__label{
  font-size: 10px;
  font-weight: 600;
  color: inherit;
  letter-spacing: .03em;
  line-height: 1;
  user-select: none;
}

/* ── Review Modal ────────────────────────────────────────────────────────── */
.cd-review-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  opacity: 0;
  transition: opacity .22s ease;
}
.cd-review-modal-overlay.is-open{
  opacity: 1;
}
.cd-review-modal{
  position: relative;
  background: linear-gradient(160deg, #111b2e 0%, #0c1422 100%);
  border: 1px solid rgba(138,180,255,.22);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 32px;
  width: 100%;
  max-width: 480px;
  transform: translateY(40px);
  transition: transform .25s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,.45);
}
.cd-review-modal-overlay.is-open .cd-review-modal{
  transform: translateY(0);
}
.cd-review-modal__close{
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(180,200,240,.45);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  transition: color .12s;
}
.cd-review-modal__close:hover{ color: #ddeeff; }
.cd-review-modal__title{
  font-size: 16px;
  font-weight: 700;
  color: #ddeeff;
  margin: 0 0 18px;
  text-align: center;
}
.cd-review-modal__stars{
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.cd-review-modal__star{
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(160,185,230,.3);
  font-size: 34px;
  line-height: 1;
  padding: 2px;
  transition: color .12s, transform .10s;
}
.cd-review-modal__star:hover,
.cd-review-modal__star.is-active{
  color: #f5a623;
  transform: scale(1.15);
}
.cd-review-modal__text{
  width: 100%;
  background: rgba(138,180,255,.06);
  border: 1px solid rgba(138,180,255,.2);
  border-radius: 10px;
  color: #ddeeff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  resize: none;
  outline: none;
  margin-bottom: 16px;
  transition: border-color .15s;
}
.cd-review-modal__text::placeholder{ color: rgba(180,200,240,.35); }
.cd-review-modal__text:focus{ border-color: rgba(138,180,255,.45); }
.cd-review-modal__submit{
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #3fe9ff 0%, #6b8fff 100%);
  color: #050d1a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .10s;
}
.cd-review-modal__submit:hover:not(:disabled){ opacity: .88; transform: translateY(-1px); }
.cd-review-modal__submit:disabled{ opacity: .5; cursor: not-allowed; }

/* ── Ganzseitiges Drag-Drop Overlay ─────────────────────────────────────── */
.cd-page-drop{
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(8,14,28,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.cd-page-drop.is-visible{
  opacity: 1;
  pointer-events: all;
}
.cd-page-drop__card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 72px;
  border-radius: 20px;
  border: 2px dashed rgba(63,233,255,.55);
  background: rgba(18,30,54,.75);
  box-shadow: 0 24px 60px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,255,255,.06);
  text-align: center;
  pointer-events: none;  /* drop fires on document, not on card */
  animation: cd-drop-pulse 1.6s ease-in-out infinite;
}
@keyframes cd-drop-pulse{
  0%, 100%{ border-color: rgba(63,233,255,.55); box-shadow: 0 24px 60px rgba(0,0,0,.40), 0 0 0 0 rgba(63,233,255,.0); }
  50%{ border-color: rgba(63,233,255,.85); box-shadow: 0 24px 60px rgba(0,0,0,.40), 0 0 0 8px rgba(63,233,255,.08); }
}
.cd-page-drop__icon{
  width: 56px;
  height: 56px;
  color: #3fe9ff;
  opacity: .80;
}
.cd-page-drop__title{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ddeeff;
  letter-spacing: -.01em;
}
.cd-page-drop__hint{
  margin: 0;
  font-size: 13px;
  color: #6a9ac0;
}

/* ── /hooks Upload Tool ──────────────────────────────────────────────────── */

/* Suppress hooks.js hover-bubble on the /hooks page */
.cd-page-hooks .cd-hook-preview{ display: none !important; }

.cd-hooks-tool{
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ── Step indicators ── */
.cd-hooks-tool__steps{
  display: flex;
  align-items: center;
}
.cd-hooks-tool__step{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cd-hooks-tool__step-num{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(63,233,255,.38);
  background: rgba(63,233,255,.07);
  color: #6ac8e8;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.cd-hooks-tool__step-text{
  font-size: 12px;
  font-weight: 600;
  color: #7a9ab8;
  white-space: nowrap;
}
.cd-hooks-tool__step-line{
  flex: 1;
  height: 1px;
  background: rgba(138,180,255,.14);
  margin: 0 10px;
  min-width: 16px;
}

/* Step states */
.cd-hooks-tool__step.is-active .cd-hooks-tool__step-num{
  border-color: rgba(63,233,255,.75);
  background: rgba(63,233,255,.15);
  color: #3fe9ff;
  box-shadow: 0 0 0 3px rgba(63,233,255,.10);
}
.cd-hooks-tool__step.is-done .cd-hooks-tool__step-num{
  border-color: rgba(74,222,128,.50);
  background: rgba(74,222,128,.12);
  color: #4ade80;
  font-size: 0;
}
.cd-hooks-tool__step.is-done .cd-hooks-tool__step-num::before{
  content: "✓";
  font-size: 13px;
}

/* Send button pulse when ready */
@keyframes cd-send-pulse{
  0%,100%{
    box-shadow:
      0 6px 22px rgba(20,60,190,.38),
      0 2px 6px rgba(0,0,0,.28),
      inset 0 1px 0 rgba(255,255,255,.14);
  }
  50%{
    box-shadow:
      0 8px 30px rgba(20,80,220,.55),
      0 3px 8px rgba(0,0,0,.30),
      inset 0 1px 0 rgba(255,255,255,.18),
      0 0 0 4px rgba(60,120,255,.15);
  }
}
.cd-hooks-tool__send-btn.is-ready:not(:disabled){
  animation: cd-send-pulse 2s ease-in-out infinite;
}

/* ── Two-column body ── */
.cd-hooks-tool__body{
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 0;
  align-items: start;
  width: 100%;
}

/* Left column */
.cd-hooks-tool__hook-col{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* 9:16 preview thumbnail */
.cd-hooks-tool__hook-preview{
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 2px 14px rgba(0,0,0,.28);
}
.cd-hooks-tool__hook-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.cd-hooks-tool__hook-placeholder{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #3a5070;
  font-size: 11px;
  text-align: center;
  padding: 12px;
  line-height: 1.3;
  pointer-events: none;
}
.cd-hooks-tool__hook-placeholder svg{
  width: 26px;
  height: 26px;
  opacity: .38;
}

/* Chips below preview: override cd-hook-selector defaults */
.cd-hooks-tool__chips{
  flex-wrap: wrap;
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  justify-content: center;
  max-width: 260px;
}
.cd-hooks-tool__empty{
  font-size: 12px;
  color: #5a6a80;
  margin: 0;
}

/* Preview-Box: klickbar */
.cd-hooks-tool__hook-preview{
  cursor: pointer;
}
/* Placeholder hint */
.cd-hooks-tool__hook-placeholder-hint{
  font-size: 11px;
  color: #3a5070;
  margin-top: 2px;
}
/* Hover-Overlay "Hook wechseln" */
.cd-hooks-tool__hook-change-overlay{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.62) 0%, transparent 100%);
  color: rgba(255,255,255,.90);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  transition: opacity .18s;
  cursor: pointer;
}
.cd-hooks-tool__hook-preview:hover .cd-hooks-tool__hook-change-overlay{
  opacity: 1;
}
/* Selected badge below preview — jetzt als Button (öffnet Picker) */
.cd-hooks-tool__selected-badge{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(63,233,255,.30);
  background: rgba(63,233,255,.07);
  color: #3fe9ff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.cd-hooks-tool__selected-badge::before{
  content: "✓";
  font-size: 11px;
  flex-shrink: 0;
}
.cd-hooks-tool__selected-badge:hover{
  background: rgba(63,233,255,.14);
  border-color: rgba(63,233,255,.55);
}

/* ── Hook Picker Modal ──────────────────────────────────────────────────────── */
.cd-hook-picker-overlay{
  position: fixed;
  inset: 0;
  background: rgba(6,10,22,.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .20s ease;
}
.cd-hook-picker-overlay.is-open{
  opacity: 1;
  pointer-events: all;
}
.cd-hook-picker{
  background: rgba(13,20,40,.97);
  border: 1px solid rgba(138,180,255,.22);
  border-radius: 20px;
  padding: 24px 22px 28px;
  max-width: 560px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 28px 70px rgba(0,0,0,.60);
  transform: scale(.95) translateY(10px);
  transition: transform .24s cubic-bezier(.22,1,.36,1);
  scrollbar-width: none; /* Firefox */
}
.cd-hook-picker::-webkit-scrollbar{ display: none; } /* Chrome/Safari/Edge */
.cd-hook-picker-overlay.is-open .cd-hook-picker{
  transform: scale(1) translateY(0);
}
.cd-hook-picker__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cd-hook-picker__title{
  font-size: 17px;
  font-weight: 700;
  color: #e0eeff;
  margin: 0;
}
.cd-hook-picker__close{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(138,180,255,.35);
  background: rgba(138,180,255,.12);
  color: rgba(200,225,255,.85);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.cd-hook-picker__close:hover{
  background: rgba(138,180,255,.22);
  border-color: rgba(138,180,255,.55);
  color: #fff;
  transform: none;
  box-shadow: none;
}
.cd-hook-picker__close svg,
.cd-hooks-help-close svg{
  width: 16px;
  height: 16px;
  display: block;
}
.cd-hook-picker__sub{
  font-size: 13px;
  color: #5a7a9a;
  margin: 0 0 20px;
  line-height: 1.5;
}
.cd-hook-picker__grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}
.cd-hook-picker__empty{
  font-size: 13px;
  color: #5a7a9a;
  margin: 0;
}
.cd-hook-picker__item{
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  border-radius: 10px;
  outline: none;
}
.cd-hook-picker__thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 2px solid rgba(138,180,255,.16);
  transition: border-color .15s, box-shadow .15s;
}
.cd-hook-picker__thumb video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cd-hook-picker__item:hover .cd-hook-picker__thumb,
.cd-hook-picker__item:focus .cd-hook-picker__thumb{
  border-color: rgba(138,180,255,.50);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.cd-hook-picker__item.is-selected .cd-hook-picker__thumb{
  border-color: rgba(63,233,255,.70);
  box-shadow: 0 0 0 3px rgba(63,233,255,.14);
}
.cd-hook-picker__play{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.80);
  pointer-events: none;
  transition: opacity .15s;
  background: rgba(0,0,0,.12);
}
.cd-hook-picker__play svg{
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.55));
}
.cd-hook-picker__name{
  font-size: 12px;
  font-weight: 500;
  color: #7a9ab8;
  text-align: center;
  line-height: 1.3;
  padding: 0 2px;
}
.cd-hook-picker__item.is-selected .cd-hook-picker__name{
  color: #3fe9ff;
  font-weight: 600;
}

/* Connector between columns — stretches to full row height, "+" sits at video center */
.cd-hooks-tool__connector{
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  padding-bottom: 40px;
}
.cd-hooks-tool__connector-icon{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(138,180,255,.35);
  background: rgba(138,180,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(180,210,255,.70);
  font-size: 16px;
  font-weight: 400;
  flex-shrink: 0;
  user-select: none;
}

/* Right column */
.cd-hooks-tool__upload-col{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Upload zone — same size as hook preview */
.cd-hooks-tool__upload-zone{
  width: 100%;
  max-width: 260px;
  aspect-ratio: 9 / 16;
  min-height: unset;
  border-radius: 12px;
  border: 2px dashed rgba(138,180,255,.38);
  background: rgba(138,180,255,.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
  padding: 24px 20px;
  box-sizing: border-box;
}
.cd-hooks-tool__upload-zone:hover,
.cd-hooks-tool__upload-zone.is-drag-over{
  border-color: rgba(63,233,255,.65);
  background: rgba(63,233,255,.03);
}
.cd-hooks-tool__upload-icon{
  width: 38px;
  height: 38px;
  color: #4a78b0;
}
.cd-hooks-tool__upload-icon svg{ width: 100%; height: 100%; }
.cd-hooks-tool__upload-text{
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #8ab0d0;
  line-height: 1.5;
}
.cd-hooks-tool__upload-hint{
  margin: 0;
  font-size: 12px;
  color: #7a9ec0;
}

/* Video preview after upload */
.cd-hooks-tool__video-preview{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cd-hooks-tool__user-video{
  width: 100%;
  max-width: 260px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  display: block;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 2px 14px rgba(0,0,0,.28);
}
.cd-hooks-tool__change-link{
  background: none;
  border: none;
  padding: 0;
  color: #5a8ab0;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.cd-hooks-tool__change-link:hover{ color: #8ab8d8; }

/* ── Action row ── */
.cd-hooks-tool__action-row{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}
.cd-hooks-tool__btn-row{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

/* Download button — secondary ghost style */
.cd-hooks-tool__dl-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid rgba(138,180,255,.28);
  background: rgba(138,180,255,.07);
  color: #9ab8d8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  flex: 1;
  max-width: 200px;
  min-width: 150px;
  box-sizing: border-box;
  white-space: nowrap;
}
.cd-hooks-tool__dl-btn.is-ready{
  background: linear-gradient(135deg, #1a52c8 0%, #0f3590 60%, #1248a8 100%);
  border-color: rgba(80,140,255,.45);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  box-shadow:
    0 6px 22px rgba(20,60,190,.38),
    0 2px 6px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.14);
}
.cd-hooks-tool__dl-btn.is-ready:not(:disabled){
  animation: cd-send-pulse 2s ease-in-out infinite;
}
.cd-hooks-tool__dl-btn:hover:not(:disabled){
  background: linear-gradient(135deg, rgba(50,100,210,.42) 0%, rgba(28,62,170,.42) 100%);
  border-color: rgba(138,180,255,.85);
  color: #eef6ff;
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(40,90,220,.28),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.cd-hooks-tool__dl-btn.is-ready:hover:not(:disabled){
  background: linear-gradient(135deg, #2060d8 0%, #1440a8 60%, #1a58b8 100%);
  border-color: rgba(80,140,255,.65);
  color: #ffffff;
  box-shadow:
    0 10px 28px rgba(20,60,190,.46),
    0 3px 8px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.18);
  transform: translateY(-1px);
}
.cd-hooks-tool__dl-btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.cd-hooks-tool__dl-btn.is-loading{
  opacity: .80;
  cursor: wait !important;
}
.cd-hooks-tool__dl-btn svg{
  flex-shrink: 0;
}

/* Send button — always high-contrast, white text on deep blue */
.cd-hooks-tool__send-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 36px;
  border-radius: 14px;
  border: 1px solid rgba(80,140,255,.45);
  background: linear-gradient(135deg, #1a52c8 0%, #0f3590 60%, #1248a8 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 6px 22px rgba(20,60,190,.38),
    0 2px 6px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.14);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  flex: 1;
  max-width: 280px;
  min-width: 200px;
  box-sizing: border-box;
}
.cd-hooks-tool__send-btn:hover:not(:disabled){
  background: linear-gradient(135deg, #2060d8 0%, #1440a8 60%, #1a58b8 100%);
  box-shadow:
    0 10px 28px rgba(20,60,190,.46),
    0 3px 8px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.18);
  transform: translateY(-1px);
}
.cd-hooks-tool__send-btn:disabled{
  opacity: .38;
  cursor: not-allowed;
  transform: none;
}
/* Loading state: override disabled opacity so spinner is visible */
.cd-hooks-tool__send-btn.is-loading{
  opacity: .80;
  cursor: wait !important;
}
.cd-hooks-tool__tiktok-logo{
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}
.cd-hooks-tool__feature-link{
  color: #5ab0e0;
  text-decoration: none;
  font-weight: 600;
}
.cd-hooks-tool__feature-link:hover{ text-decoration: underline; }

/* ── Status messages ── */
.cd-hooks-tool__status{
  width: 100%;
  max-width: 480px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  border: 1px solid transparent;
}
.cd-hooks-tool__status a{ color: #3fe9ff; }
.cd-hooks-tool__status--info{
  background: rgba(63,233,255,.07);
  border-color: rgba(63,233,255,.22);
  color: #90c8e8;
}
.cd-hooks-tool__status--success{
  background: rgba(74,222,128,.08);
  border-color: rgba(74,222,128,.28);
  color: #80d8a0;
}
.cd-hooks-tool__status--error{
  background: rgba(255,100,100,.07);
  border-color: rgba(255,100,100,.28);
  color: #e8a0a0;
}

/* ── Help button + modal ── */
.cd-hooks-help-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px auto 0;
  padding: 5px 12px 5px 8px;
  border-radius: 20px;
  border: 1px solid rgba(138,180,255,.22);
  background: rgba(138,180,255,.06);
  color: rgba(138,180,255,.82);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.cd-hooks-help-btn span:first-child{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(138,180,255,.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.cd-hooks-help-btn__label{
  letter-spacing: .01em;
}
.cd-hooks-help-btn:hover{
  background: rgba(138,180,255,.13);
  border-color: rgba(138,180,255,.42);
  color: rgba(180,215,255,.90);
  transform: none;
  box-shadow: none;
}
.cd-hooks-help-overlay{
  position: fixed;
  inset: 0;
  background: rgba(8,12,24,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.cd-hooks-help-overlay.is-open{
  opacity: 1;
  pointer-events: all;
}
.cd-hooks-help-modal{
  position: relative;
  background: rgba(12,20,40,.97);
  border: 1px solid rgba(138,180,255,.18);
  border-radius: 20px;
  padding: 32px 28px 26px;
  max-width: 400px;
  width: calc(100% - 32px);
  box-shadow: 0 32px 80px rgba(0,0,0,.60), 0 0 0 1px rgba(138,180,255,.08);
  transform: scale(.94) translateY(10px);
  transition: transform .22s cubic-bezier(.22,1,.36,1);
}
.cd-hooks-help-overlay.is-open .cd-hooks-help-modal{
  transform: scale(1) translateY(0);
}
.cd-hooks-help-close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(138,180,255,.20);
  background: rgba(138,180,255,.07);
  color: rgba(160,200,240,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
  padding: 0;
}
.cd-hooks-help-close:hover{
  background: rgba(138,180,255,.15);
  color: rgba(200,230,255,.90);
  transform: none;
  box-shadow: none;
}
.cd-hooks-help-title{
  font-size: 17px;
  font-weight: 700;
  color: #ddeeff;
  margin: 0 32px 22px 0;
  line-height: 1.2;
}
.cd-hooks-help-steps{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.cd-hooks-help-step{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cd-hooks-help-step__num{
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(63,233,255,.38);
  background: rgba(63,233,255,.07);
  color: #3fe9ff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.cd-hooks-help-step__body strong{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #b8d4f0;
  margin-bottom: 3px;
}
.cd-hooks-help-step__body p{
  font-size: 12.5px;
  color: #5a7898;
  line-height: 1.55;
  margin: 0;
}
.cd-hooks-help-step__body em{
  font-style: normal;
  color: #7aaad0;
}
.cd-hooks-help-divider{
  height: 1px;
  background: rgba(138,180,255,.10);
  margin: 0 0 16px;
}
.cd-hooks-help-faq{ display: flex; flex-direction: column; }
.cd-hooks-help-faq-item{
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(138,180,255,.08);
}
.cd-hooks-help-faq-item:first-child{ padding-top: 0; }
.cd-hooks-help-faq-item:last-child{ border-bottom: none; padding-bottom: 0; }
.cd-hooks-help-faq-q{ font-size: 12.5px; font-weight: 600; color: #8ab0d0; }
.cd-hooks-help-faq-a{ font-size: 12px; color: #4a6880; line-height: 1.5; }

/* ── Responsive ── */
@media (max-width: 580px){
  .cd-hooks-tool{ padding: 20px; gap: 20px; }
  .cd-hooks-tool__steps{ display: flex; }
  .cd-hooks-tool__step-text{ display: none; }
  .cd-hooks-tool__body{ grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .cd-hooks-tool__hook-col{ flex-direction: column; align-items: center; gap: 10px; }
  .cd-hooks-tool__connector{ padding-top: 0; padding: 8px 0; }
  .cd-hooks-tool__hook-preview,
  .cd-hooks-tool__upload-zone,
  .cd-hooks-tool__user-video{ max-width: 200px; }
  .cd-hooks-tool__chips{ max-width: 200px; }
  .cd-hooks-tool__btn-row{ flex-direction: column; align-items: center; }
  .cd-hooks-tool__send-btn,
  .cd-hooks-tool__dl-btn{ max-width: calc(100% - 32px); min-width: 0; flex: unset; width: 100%; }
}

/* ── ClipDraft Profile Section (Dropdown) ────────────────────────────────── */

/* ── Prompt Modal (job card prompt viewer) ───────────────────────────────── */
.cd-prompt-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.cd-prompt-modal-overlay.is-open{
  opacity: 1;
  pointer-events: all;
}
.cd-prompt-modal{
  background: linear-gradient(160deg, #111b2e 0%, #0c1422 100%);
  border: 1px solid rgba(138,180,255,.24);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.30);
  transform: scale(.96) translateY(8px);
  transition: transform .22s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.cd-prompt-modal-overlay.is-open .cd-prompt-modal{
  transform: scale(1) translateY(0);
}
.cd-prompt-modal__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(138,180,255,.10);
}
.cd-prompt-modal__title{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(180,210,255,.55);
}
.cd-prompt-modal__close{
  background: none;
  border: none;
  color: rgba(180,200,240,.45);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .12s;
}
.cd-prompt-modal__close svg{ width: 18px; height: 18px; display: block; }
.cd-prompt-modal__close:hover{ color: #ddeeff; }
.cd-prompt-modal__body{
  padding: 20px 20px 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #c8dcff;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(138,180,255,.35) transparent;
}
.cd-prompt-modal__footer{
  padding: 12px 20px 18px;
  display: flex;
  justify-content: flex-end;
}
.cd-prompt-modal__use{
  padding: 8px 18px;
  border-radius: 9px;
  border: 1px solid rgba(138,180,255,.30);
  background: rgba(138,180,255,.10);
  color: #9ec8ff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
.cd-prompt-modal__use:hover{
  background: rgba(138,180,255,.20);
  border-color: rgba(138,180,255,.50);
  color: #d7e7ff;
}
