.cga-bell { position: relative; flex: 0 0 auto; }
.cga-bell[hidden], .cga-dialog [hidden] { display: none !important; }
.cga-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  padding: 1px 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #603a91;
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  font-weight: 750;
  text-align: center;
}
.cga-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: min(780px, 88dvh);
  padding: 0;
  color: #23211e;
  background: #fbfaf7;
  border: 1px solid #e6dfd3;
  border-radius: 16px;
  box-shadow: 0 20px 80px #21192b40;
  overflow: auto;
  overscroll-behavior: contain;
}
.cga-dialog::backdrop { background: #1b182575; }
.cga-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #fbfaf7;
  border-bottom: 1px solid #e8e2d9;
}
.cga-head p { margin: 0 0 3px; color: #6c596b; font-size: 12px; font-weight: 700; }
.cga-head h2 { margin: 0; font-size: clamp(19px, 4vw, 25px); }
.cga-close { min-width: 44px; min-height: 44px; font-size: 22px; }
.cga-filters {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, .65fr) auto;
  gap: 10px;
  padding: 16px 20px 0;
  align-items: end;
}
.cga-filters label { display: grid; min-width: 0; gap: 5px; color: #554b54; font-size: 13px; font-weight: 650; }
.cga-filters input, .cga-filters select { width: 100%; min-width: 0; min-height: 44px; padding: 7px 10px; border: 1px solid #dcd4cc; border-radius: 8px; background: #fff; color: #23211e; font-size: 14px; }
.cga-filters button, .cga-file-actions button, .cga-preview button { min-height: 44px; }
.cga-note { margin: 12px 20px; color: #5d535d; font-size: 14px; }
.cga-list { display: grid; gap: 8px; padding: 0 20px 20px; }
.cga-card, .cga-preview { padding: 13px 15px; border: 1px solid #e8e0e2; border-radius: 10px; background: #fff; }
.cga-card-line, .cga-preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; }
.cga-card strong { overflow-wrap: anywhere; line-height: 1.35; }
.cga-card p { margin: 4px 0 0; color: #625b63; font-size: 13px; }
.cga-chip { padding: 3px 8px; border-radius: 999px; background: #eeeaef; color: #5e4b64; font-size: 12px; font-weight: 700; }
.cga-chip[data-state="generated"] { background: #e8f1e7; color: #2b542c; }
.cga-chip[data-state="failed"] { background: #f8e4e7; color: #8b253b; }
.cga-file-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cga-preview { margin: 0 20px 12px; }
.cga-preview img, .cga-preview video { display: block; max-width: 100%; max-height: 58dvh; margin: 10px auto 0; object-fit: contain; }
@media (max-width: 520px) {
  .cga-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cga-filters button { grid-column: 1 / -1; }
}
