/* Designs (#/designs, #/design/<id>) and a brand kit's libraries (#/styles, #/recipes, #/sounds). Uses the colours of app.css. */
.studio section { margin-bottom: 22px; }
.studio h2 { font-size: 18px; margin: 0 0 10px; }
.st-form { display: grid; gap: 10px; cursor: default; }
.st-form:hover, .st-sources:hover { border-color: var(--line); }
.st-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-field { display: grid; gap: 4px; font-size: 13px; }
.st-label { color: var(--muted); font-size: 13px; }
.st-field input, .st-field textarea, .st-field select { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 7px 10px; font: inherit; }
.st-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.st-check { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--ink); }
.st-picked { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { display: inline-flex; align-items: center; gap: 4px; }
.st-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.st-actions { display: flex; gap: 8px; }
.st-sources { cursor: default; }
.st-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 10px; }
.st-tabs button { padding: 8px 14px; border-radius: 10px 10px 0 0; border: 1px solid transparent; border-bottom: 0; background: none;
  color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.st-tabs button:hover { color: var(--ink); }
.st-tabs button.on { color: var(--ink); background: var(--panel); border-color: var(--line); margin-bottom: -1px; }
.st-ideas { display: grid; gap: 8px; }
.st-idea { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel); }
.st-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--soft); }
.st-idea-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.st-idea-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-idea-foot { display: flex; justify-content: flex-end; }
.st-text { margin: 0; font-size: 14px; white-space: pre-line; }
.st-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.st-ad { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; }
.st-ad-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--soft); display: block; }
.st-ad-body { padding: 8px 10px; display: grid; gap: 4px; }
.st-jobgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.st-job { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; }
.st-job-pic img, .st-job-empty { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: grid; place-items: center; background: var(--soft); }
.st-job-body { padding: 8px 10px; display: grid; gap: 4px; }
.st-status { font-weight: 600; }
.st-done { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.st-failed { color: var(--bad, #c0392b); }
.st-tools { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.st-previews { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 20px; }
.st-previews figure { margin: 0; max-width: 480px; }
.st-previews img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.st-brief summary { cursor: pointer; }
@media (max-width: 900px) {
  .st-new { grid-template-columns: 1fr; }
  .st-row { grid-template-columns: 1fr; }
}
.st-ready { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); display: grid; gap: 6px; }
.st-headline { font-size: 18px; font-weight: 800; line-height: 1.25; }
.st-headline mark { background: var(--brand); color: var(--brand-ink); padding: 0 4px; border-radius: 4px; }
.st-subline { font-weight: 600; }
.st-needs { border-left: 3px solid var(--brand); padding: 4px 8px; background: var(--soft); border-radius: 4px; }
.st-ready-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.st-ready-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.st-ready-head .btn { white-space: nowrap; flex-shrink: 0; }
.st-field[hidden] { display: none; }
.st-gallery { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.st-gallery summary { cursor: pointer; font-size: 14px; color: var(--brand); }
.st-gallery .st-label { margin: 10px 0 6px; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.st-card { display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 10px; background: var(--soft);
  color: var(--ink); font: inherit; font-size: 12px; line-height: 1.25; text-align: left; cursor: pointer; }
.st-card img, .st-card-blank { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 7px; display: block; }
.st-card-blank { display: grid; place-items: center; text-align: center; padding: 6px; background: var(--panel); color: var(--muted);
  border: 1px dashed var(--line); }
.st-card:hover { border-color: var(--line); }
.st-card.on { border-color: var(--brand); background: var(--panel); }

/* Layout (27 Nov): one column, ideas first, the brief in three groups; inputs never leave their box. */
.studio .inner { max-width: 1180px; }
.st-new { display: grid; gap: 12px; }
.st-step { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 0; }
.st-form { display: grid; gap: 14px; padding: 18px; }
.st-group { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 0; display: grid; gap: 12px; min-width: 0; }
.st-group:first-child { border-top: 0; padding-top: 0; }
.st-group legend { font-weight: 700; font-size: 14px; padding: 0 8px 0 0; color: var(--ink); }
.st-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.st-grid2 > *, .st-field, .st-sources, .st-form { min-width: 0; }
.st-field input, .st-field textarea, .st-field select, .st-search input, .st-search select { width: 100%; box-sizing: border-box; max-width: 100%; }
.st-field textarea { resize: vertical; }
.st-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 13px; cursor: pointer; color: var(--ink); }
.st-pill input { margin: 0; }
.st-pill:has(input:checked) { border-color: var(--brand); background: var(--soft); font-weight: 600; }
.st-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 10px 0 2px;
  background: linear-gradient(transparent, var(--panel) 30%); }
.st-actions .btn { padding: 10px 22px; font-size: 15px; }
.st-sources { padding: 14px 18px; }
.st-sources h2 { display: none; }
.st-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.st-tabs button { white-space: nowrap; }
.st-ideas { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.st-search { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; margin: 6px 0 8px; }
.st-search input, .st-search select { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 7px 10px; font: inherit; }
.st-more { text-align: center; margin-top: 10px; }
.st-ad .btn { justify-self: start; }
@media (max-width: 640px) { .st-search { grid-template-columns: 1fr; } .st-ideas { grid-template-columns: 1fr; } }
.st-field input[type=checkbox], .st-field input[type=radio], .st-pill input, .st-check input { width: auto; flex: none; }
.st-pill { white-space: nowrap; }
.st-actions { background: var(--panel); border-top: 1px solid var(--line); margin: 0 -18px -18px; padding: 12px 18px;
  border-radius: 0 0 14px 14px; z-index: 2; }

/* Surprise me concepts, "Like it?" (save as style / recipes), the recipe book */
.st-previews video { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; background: #000; }
.st-concepts .st-previews figure { max-width: 300px; }
.st-concept figcaption { display: grid; gap: 4px; margin-top: 6px; }
.st-concept .st-tools { margin: 4px 0; align-items: center; }
.st-saver { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.st-saver input { min-width: 220px; }
.st-saver .st-field { margin: 0; }
.st-child { padding: 8px 0; border-top: 1px solid var(--line); }
.st-child:first-of-type { border-top: 0; }
.st-recipes { margin-top: 20px; }
.st-recipes summary { cursor: pointer; }
.st-recipe-img { aspect-ratio: auto; max-height: 220px; object-fit: contain; background: #10121f; }
.st-change textarea { width: 100%; box-sizing: border-box; margin: 4px 0 8px; }
.st-change .st-tools { align-items: end; }
.st-change .st-field { margin: 0; }
.st-request { margin: 4px 0; padding: 4px 10px; border-left: 3px solid var(--line); white-space: pre-wrap; }

/* video chips */
.st-chip-video { background: var(--accent); color: #fff; border-color: var(--accent); margin-left: 6px; }

/* 28 Nov tidy: four tabs (Make an ad, Ad ideas, Designs, Recipe book), picture / video switches, the theme folded
   away, the follow-up actions on a finished design, recipe states. */
.st-pagetabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 18px; overflow-x: auto; scrollbar-width: none; }
.st-pagetabs a { padding: 9px 16px; border-radius: 10px 10px 0 0; border: 1px solid transparent; border-bottom: 0; color: var(--muted);
  font-weight: 700; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.st-pagetabs a:hover { color: var(--ink); }
.st-pagetabs a.on { color: var(--ink); background: var(--panel); border-color: var(--line); margin-bottom: -1px; }
.st-badge { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.st-pane[hidden], .st-recipes[hidden] { display: none; }
.st-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--soft); margin: 0 0 10px; max-width: 100%; flex-wrap: wrap; }
.st-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.st-switch button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.st-sources-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-sources-top p { margin: 0 0 10px; }
.st-theme { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.st-theme summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.st-theme[open] { display: grid; gap: 8px; }
.st-cards.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.st-next { display: grid; gap: 14px; }
.st-next h3 { font-size: 15px; margin: 0 0 2px; }
.st-next-item p { margin: 0 0 6px; }
.st-next-keep { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.st-next-item { min-width: 0; }
.st-next-item .st-saver input { min-width: 0; }
.st-next-item .st-saver .st-field { flex: 1 1 200px; }
.st-recipes-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.st-recipe.busy { opacity: .75; }
.st-recipe .st-tools { margin: 6px 0 0; }
.st-recipe-change { display: grid; gap: 6px; }
.st-recipe-change textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 7px 10px; font: inherit; resize: vertical; }
.st-recipe-change .btn { justify-self: start; }
.st-recipe-change[hidden] { display: none; }
.st-recipe-state .st-request { margin: 4px 0 0; }
.st-danger { color: var(--bad, #c0392b); }
@media (max-width: 640px) {
  .st-pagetabs { flex-wrap: wrap; overflow: visible; border-bottom: 0; gap: 6px; }
  .st-pagetabs a { padding: 7px 12px; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; }
  .st-pagetabs a.on { margin-bottom: 0; border-color: var(--brand); }
  .st-next-keep { grid-template-columns: 1fr; }
  .st-ready-head { flex-direction: column; }
  .st-switch { border-radius: 14px; }
}
/* app.css cuts every paragraph in a card to 3 lines; the Studio's hints and intros must be read in full */
.studio .card p { display: block; -webkit-line-clamp: unset; overflow: visible; }
.studio .card p.st-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; overflow: hidden; }

/* Ohdeo: the design page's "what was asked", the libraries' frame, small things the pages share */
.ok { color: var(--ok); }
.studio .inner.wide, .videos-page .inner.wide { max-width: 1180px; }
.st-job-pic video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000; }
.st-job-title { color: var(--ink); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.st-job .st-idea-top { align-items: flex-start; }
.st-asked-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.st-asked-row:first-of-type { border-top: 0; margin-top: 8px; }
.st-asked-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.st-brieftext { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0 0; max-height: 360px; overflow: auto; }
.st-surprise { display: grid; gap: 10px; }
.st-surprise textarea, .st-surprise select { width: 100%; box-sizing: border-box; }
.lib-kit { display: flex; align-items: center; gap: 8px; }
.lib-kit select { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 7px 10px; font: inherit; }
.lib-styles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lib-styles .st-card { font-size: 14px; padding: 6px; }
dialog.lib-dialog { width: min(720px, 94vw); }
.lib-rules { max-height: 62vh; overflow-y: auto; }
@media (max-width: 640px) { .st-asked-row { grid-template-columns: 1fr; gap: 2px; } }
.studio a.btn, .videos-page a.btn { text-decoration: none; }
.studio a.btn.primary, .videos-page a.btn.primary { color: var(--brand-ink); }
.page.studio > .inner.wide, .page.videos-page > .inner.wide { max-width: 1180px; }
.st-job-pic { text-decoration: none; }
.studio section.card:hover, .studio details.card:hover { border-color: var(--line); }
