.ae-output-item {
  width: min(100%, 420px);
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.ae-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ae-output-preview {
  border: 1px solid #29445d;
  border-radius: 10px;
  padding: 8px;
}
.ae-output-preview summary {
  cursor: pointer;
  color: #75dfce;
}
.ae-output-preview video {
  display: block;
  width: min(100%, 320px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #050b12;
  border-radius: 8px;
  margin-top: 8px;
  max-height: 560px;
}
.ae-script-section {
  display: grid;
  gap: 10px;
}
.ae-script-heading,
.ae-script-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ae-script-heading > span {
  color: #bbcbdd;
  font-size: 12px;
  font-weight: 600;
}
.ae-script-heading button,
.ae-script-card-head button {
  min-height: 32px;
  padding: 6px 10px;
}
.ae-script-list {
  display: grid;
  gap: 12px;
}
.ae-script-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1928;
}
.ae-script-card textarea {
  min-height: 138px;
}
.ae-script-card small,
.ae-script-total {
  color: var(--muted);
}
.ae-script-total {
  display: block;
  text-align: right;
}
.ae-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 9, 17, 0.78);
  backdrop-filter: blur(4px);
}
.ae-picker {
  width: min(1040px, 96vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 20px;
  border: 1px solid #38546c;
  border-radius: 14px;
  background: #101e30;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.ae-picker-head,
.ae-picker-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ae-picker-head h2 {
  margin: 0 0 4px;
}
.ae-picker-head > button {
  width: 38px;
  min-height: 38px;
  font-size: 20px;
}
.ae-picker-controls input {
  flex: 1;
}
.ae-picker-controls span {
  color: var(--muted);
  white-space: nowrap;
}
.ae-picker-grid {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-right: 4px;
}
.ae-picker-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1726;
}
.ae-picker-grid .ae-picker-thumb {
  width: 100%;
  height: 150px;
  background: #07111e;
}
.ae-picker-grid .ae-picker-thumb img,
.ae-picker-grid .ae-picker-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ae-picker-grid article[hidden] {
  display: none;
}
.ae-picker-grid article > button {
  grid-column: 1 / -1;
  width: 100%;
}
.ae-video-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  color: #9cc7d8;
  background: linear-gradient(145deg, #132a3d, #0b1726);
}
.ae-video-placeholder > i {
  font-size: 25px;
  color: var(--accent);
}
.ae-video-placeholder > b {
  font-size: 11px;
}
.ae-picker-grid strong,
.ae-picker-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ae-picker-grid small {
  margin-top: 5px;
  color: var(--muted);
}
.ae-picker-no-results,
.ae-picker-empty {
  color: var(--muted);
  text-align: center;
}
@media (max-width: 850px) {
  .ae-picker-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ae-picker-backdrop { padding: 10px; }
  .ae-picker { padding: 14px; }
  .ae-picker-controls { align-items: stretch; flex-direction: column; }
  .ae-picker-grid { grid-template-columns: 1fr; }
  .ae-picker-grid .ae-picker-thumb { height: 180px; }
}
/* 自动标点按钮（2026-10-16 追加）。卡片头在窄栏里会被挤成两行，这里统一 nowrap：
   「脚本 N」、自动标点、删除此脚本 三个都不折行，按钮留在卡片右上角 */
.ae-panel .ae-script-card-head{flex-wrap:nowrap;justify-content:space-between;gap:8px}
.ae-panel .ae-script-card-head > strong{white-space:nowrap}
.ae-panel .ae-script-card-head .ae-script-head-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.ae-panel .ae-script-card-head .ae-script-head-actions button{white-space:nowrap;padding:5px 9px;font-size:12px}
