.reels-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 56px;
  display: grid;
  gap: 20px;
}
.section-heading,
.catalog-toolbar,
.review-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.section-heading h1,
.section-heading h2 {
  margin-bottom: 4px;
}
.catalog-toolbar {
  justify-content: flex-start;
  margin: 18px 0 8px;
}
.catalog-toolbar input {
  min-width: min(420px, 100%);
}
.catalog-toolbar input,
.catalog-toolbar select,
#caption {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--text);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f6f6f7;
  border-radius: 6px;
}
.product-card h3 {
  font-size: 15px;
  margin: 0;
}
.campaign-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.campaign-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}
.campaign-row:hover { background: #f6f6f7; }
.review-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) 1fr;
  gap: 24px;
  margin: 18px 0 28px;
}
.preview-frame {
  aspect-ratio: 9 / 16;
  background: #111;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.preview-frame video,
.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.preview-frame .muted { padding: 20px; text-align: center; color: #ddd; }
.field-label { display: block; font-weight: 600; margin-bottom: 7px; }
#caption { width: 100%; resize: vertical; font: inherit; }
.publish-destinations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.publish-destinations legend {
  margin-bottom: 7px;
  font-weight: 600;
}
.destination-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfb;
}
.destination-option small {
  grid-column: 2;
  color: var(--text-subdued);
  text-transform: capitalize;
}
.destination-option:has(input:disabled) {
  opacity: 0.65;
}
.review-actions { justify-content: flex-start; margin-top: 10px; }
.btn-danger { background: #fff; color: var(--critical); border: 1px solid var(--critical); }
details { margin-top: 18px; }
pre { white-space: pre-wrap; max-height: 260px; overflow: auto; font-size: 12px; }
.asset-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.asset-card { border: 1px solid var(--border); border-radius: 6px; padding: 9px; }
.asset-card video,
.asset-card img { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #111; }
.asset-card p { margin: 7px 0 0; font-size: 12px; }
.asset-card .error { color: var(--critical); }
.metrics-block { margin: 24px 0; }
.publication-block { margin: 24px 0; }
.publication-statuses { display: grid; gap: 8px; margin-top: 10px; }
.publication-status {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(0, 2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.publication-status small { color: var(--critical); }
.metric-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.metric { min-width: 100px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; display: grid; }
.metric strong { font-size: 20px; }
.metric span { color: var(--text-subdued); font-size: 12px; text-transform: capitalize; }
.warning-panel { border-color: #d6a84b; background: #fff8e5; }
.feedback.error { color: var(--critical); }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ideas-shell {
  width: min(1060px, calc(100% - 32px));
  gap: 12px;
}
.ideas-breadcrumb {
  font-size: 13px;
}
.ideas-breadcrumb a {
  display: inline-flex;
  align-items: center;
  color: var(--text-subdued);
  font-weight: 500;
}
.ideas-panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ideas-step-heading {
  max-width: 720px;
}
.ideas-step-heading h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
}
.ideas-step-heading p:last-child {
  margin: 0;
  font-size: 15px;
}
.ideas-step-heading .eyebrow {
  margin-bottom: 6px;
}
.idea-product-overview {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 180px;
  margin: 26px 0 30px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfb;
}
.idea-product-placeholder {
  grid-column: 1 / -1;
  color: var(--text-subdued);
  text-align: center;
}
.idea-product-media {
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-subdued);
  overflow: hidden;
}
.idea-product-media img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}
.idea-product-copy {
  min-width: 0;
}
.idea-product-copy h2 {
  margin: 2px 0 7px;
  font-size: 22px;
  line-height: 1.25;
}
.idea-product-meta {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.idea-product-description {
  display: -webkit-box;
  max-width: 680px;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.idea-picker-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.idea-picker-heading h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.idea-picker-heading p {
  margin: 0;
}
.idea-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.idea-fieldset[disabled] {
  opacity: 0.65;
}
.idea-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-height: 120px;
  margin-top: 14px;
}
.idea-grid[aria-busy="true"] {
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent),
    #f6f6f7;
  background-size: 200% 100%;
  animation: reel-ideas-loading 1.4s linear infinite;
}
@keyframes reel-ideas-loading {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.idea-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}
.idea-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.idea-card-content {
  display: grid;
  grid-template-areas:
    "header header"
    "title prompt-label"
    "summary prompt";
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  grid-template-rows: auto auto 1fr;
  height: 100%;
  min-height: 0;
  column-gap: 24px;
  row-gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.idea-option:hover .idea-card-content {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.idea-option > input:focus-visible + .idea-card-content {
  outline: 3px solid rgba(0, 128, 96, 0.25);
  outline-offset: 2px;
}
.idea-option > input:checked + .idea-card-content {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 128, 96, 0.18);
}
.idea-card-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.idea-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #255995;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.idea-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: transparent;
  font-size: 13px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.idea-option > input:checked + .idea-card-content .idea-check {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.idea-title {
  grid-area: title;
  display: block;
  font-size: 17px;
  line-height: 1.3;
}
.idea-summary {
  grid-area: summary;
  color: var(--text-subdued);
  line-height: 1.5;
}
.idea-prompt-label {
  grid-area: prompt-label;
  display: block;
  align-self: end;
  margin-top: 0;
  color: var(--text-subdued);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.idea-prompt {
  grid-area: prompt;
  display: block;
  max-height: none;
  padding: 10px;
  border-radius: 6px;
  background: #f6f6f7;
  color: #4a4d50;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.idea-rationale {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 18px;
  color: #4a4d50;
  font-size: 12px;
  line-height: 1.45;
}
.idea-rationale li + li {
  margin-top: 6px;
}
  line-height: 1.45;
}
.custom-idea {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfb;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.custom-idea.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 128, 96, 0.14);
}
.custom-idea-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  cursor: pointer;
}
.custom-idea-choice input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}
.custom-idea-choice span {
  display: grid;
  gap: 2px;
}
.custom-idea-choice strong {
  font-size: 16px;
}
.custom-idea-choice small {
  color: var(--text-subdued);
}
#custom-brief {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
#custom-brief:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 128, 96, 0.2);
}
.custom-idea-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.idea-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.idea-submit-bar p {
  margin: 2px 0 0;
}
.idea-generate-button {
  min-width: 190px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .publish-destinations { grid-template-columns: 1fr; }
  .idea-card-content {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }
  .idea-prompt-label { margin-top: 4px; }
  .idea-prompt { max-height: none; }
}

@media (max-width: 760px) {
  .review-grid { grid-template-columns: 1fr; }
  .preview-frame { width: min(100%, 360px); }
  .campaign-row { grid-template-columns: 1fr auto; }
  .campaign-row span:nth-child(2) { display: none; }
  .ideas-panel { padding: 20px; }
  .idea-product-overview {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
  }
  .idea-product-media,
  .idea-product-media img {
    min-height: 96px;
    height: 96px;
  }
  .idea-product-copy h2 { font-size: 18px; }
  .idea-product-description { display: none; }
  .idea-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .idea-generate-button { width: 100%; }
}

@media (max-width: 560px) {
  .ideas-shell { width: min(100% - 20px, 1060px); }
  .ideas-panel { padding: 16px; }
  .ideas-step-heading h1 { font-size: 24px; }
  .idea-product-overview { grid-template-columns: 1fr; }
  .idea-product-media,
  .idea-product-media img {
    width: 100%;
    min-height: 180px;
    height: 180px;
  }
  .idea-picker-heading { flex-direction: column; }
  .custom-idea-footer { align-items: flex-end; flex-direction: column; }
}
