/* Concept Art: the designs (left), a design's pictures or one picture large (centre); Properties in a window. */
#main { display: flex; flex-direction: row; flex: 1; min-width: 0; min-height: 0; background: var(--panel); }
#ca-left { min-height: 0; }
.ca-pane { display: flex; flex-direction: column; min-height: 0; }
.ca-pane.grow { flex: 1; }
.ca-designs { flex: 1; min-height: 0; overflow: auto; padding: 6px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.ca-design-list { display: flex; flex-direction: column; }
.ca-design .lr-lead { display: inline-flex; }
.ca-cover { width: 28px; height: 28px; object-fit: cover; border-radius: var(--radius-xs); background: var(--checker); display: block; }
.ca-design.ca-drop { box-shadow: inset 0 0 0 2px var(--prog); }
.ca-newdesign { align-self: flex-start; margin: 4px 10px 0; }
.ca-hint { margin: 4px 12px; line-height: 1.45; }
.ca-props { padding: 0 0 12px; }
.ca-notes { width: 100%; resize: vertical; }
.ca-new { display: flex; flex-direction: column; gap: 12px; }

/* the centre */
.ca-center { flex: 1; min-width: 0; min-height: 0; overflow: auto; background: var(--desk); padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 12px; }
.ca-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ca-titles { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ca-titles h2 { margin: 0; font-size: var(--fs-h); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-kind { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border: 0; border-radius: var(--radius-pill); background: var(--sunk); color: var(--text-2); font: inherit; font-size: var(--fs-s); cursor: pointer; }
.ca-kind:hover { background: var(--hover); }
.ca-kind .material-symbols-outlined { font-size: 16px; }
.ca-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ca-noteline { margin: -4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile, 180px), 1fr)); gap: 14px; align-content: start; min-height: 120px; }
.ca-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; outline: none; }
.ca-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.ca-card.on { box-shadow: inset 0 0 0 2px var(--prog); background: var(--prog-soft); }
.ca-card:focus-visible { box-shadow: inset 0 0 0 2px var(--prog), 0 0 0 3px var(--sel-soft); }
.ca-card.ca-before { box-shadow: inset 3px 0 0 0 var(--prog), inset 0 0 0 1px var(--line); }
.ca-card.ca-after { box-shadow: inset -3px 0 0 0 var(--prog), inset 0 0 0 1px var(--line); }
.ca-pic { position: relative; aspect-ratio: 1; border-radius: var(--radius-s); background: var(--checker); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ca-pic img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
/* tags: a chip each – its own colour (set in concept/tags.js), its name in a colour that reads on it */
.ca-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.ca-tag { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0; padding: 1px 8px; border: 0; border-radius: var(--radius-pill); font: inherit; font-size: var(--fs-xs, 11px); line-height: 18px; white-space: nowrap; }
button.ca-tag { cursor: pointer; }
button.ca-tag:hover { filter: brightness(0.95); }
.ca-tag.some { opacity: 0.6; }
.ca-tag.on { box-shadow: 0 0 0 2px var(--accent); }
.ca-tag-name { overflow: hidden; text-overflow: ellipsis; }
.ca-tag-n { margin-left: 4px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.ca-tag-x { display: inline-flex; margin: 0 -4px 0 2px; cursor: pointer; opacity: 0.7; }
.ca-tag-x:hover { opacity: 1; }
.ca-tag-x .material-symbols-outlined { font-size: 14px; }
.ca-tag-add .material-symbols-outlined { font-size: 16px; }
.ca-card-tags { max-height: 42px; overflow: hidden; }
.ca-tag-filter { padding: 2px 0; }
.ca-one-side .ca-tags-edit { margin: 4px 0; }
.ca-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ca-swatch { width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.ca-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.ca-name { font-size: var(--fs-s); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-star { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--surface); color: var(--text-3); box-shadow: var(--shadow); cursor: pointer; opacity: 0; transition: opacity .12s; }
.ca-card:hover .ca-star, .ca-card.on .ca-star, .ca-star:focus-visible, .ca-star.on { opacity: 1; }
.ca-star.on { color: var(--warn); }
.ca-star.on .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
.ca-star .material-symbols-outlined { font-size: 18px; }
.ca-ai { position: absolute; left: 6px; bottom: 6px; display: inline-flex; padding: 2px; border-radius: var(--radius-pill); background: var(--surface); color: var(--ai-spark); }
.ca-ai .material-symbols-outlined { font-size: 14px; }

/* one picture, large */
.ca-one { gap: 14px; }
.ca-one-top { display: flex; align-items: center; gap: 12px; }
.ca-one-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ca-one-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.ca-one-stage { position: relative; min-height: 0; border-radius: var(--radius); background: var(--checker); overflow: hidden; cursor: crosshair; touch-action: none; outline: none; }
.ca-one-stage.hand { cursor: grab; }
.ca-one-stage.panning { cursor: grabbing; }
.ca-one-img { position: absolute; display: block; max-width: none; user-select: none; pointer-events: none; }
.ca-one-stage.pixels .ca-one-img { image-rendering: pixelated; }
.ca-one-hint { margin-left: 4px; }
.ca-part { position: absolute; box-shadow: 0 0 0 1px var(--surface), 0 0 0 9999px var(--scrim); outline: 2px solid var(--prog); pointer-events: none; }
.ca-part::after { content: attr(data-size); position: absolute; left: 0; top: -22px; padding: 1px 6px; border-radius: var(--radius-xs); background: var(--prog); color: var(--surface); font-size: var(--fs-xs); white-space: nowrap; }
.ca-part-bar { position: absolute; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--pop-shadow); cursor: default; z-index: 2; }
.ca-part-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ca-part-side:empty { display: none; }
.ca-part-h { font-weight: 600; font-size: var(--fs-s); }
.ca-one-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow: auto; }
.ca-one-name { font-size: var(--fs-l); font-weight: 600; }
.ca-one-star { align-self: flex-start; }
.ca-one-star.on { color: var(--warn); }
.ca-one-star.on .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
.ca-one-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 4px; }
.ca-words { white-space: pre-wrap; font-size: var(--fs-s); line-height: 1.45; padding: 8px 10px; border-radius: var(--radius-s); background: var(--sunk); color: var(--text-2); max-height: 220px; overflow: auto; }
@media (max-width: 760px) { .ca-one-body { grid-template-columns: minmax(0, 1fr); } .ca-center { padding: 14px; } }

/* 3D models: a card's badge, and pictures from a model (concept/shots.js) */
.ca-3d { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 5px; border-radius: var(--radius-pill); background: var(--surface); color: var(--prog-strong); font-size: var(--fs-xs); font-weight: 600; box-shadow: var(--pop-shadow); }
.ca-3d .material-symbols-outlined { font-size: var(--ic-s); }
.ca-model-name { flex: 1; min-width: 120px; max-width: 360px; font-weight: 600; }
.ca-turn { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ca-spin { display: flex; align-items: center; gap: 6px; margin: 0; }
.ca-spin .pf-label { width: auto; min-width: 0; cursor: ew-resize; }
.ca-spin .pf-num { width: 64px; }
.ca-model-body { grid-template-columns: minmax(0, 1fr) 320px; }
.ca-model-stage { position: relative; min-height: 0; border-radius: var(--radius); background: var(--checker); overflow: hidden; cursor: grab; touch-action: none; outline: none; }
.ca-model-stage.turning, .ca-model-stage.panning { cursor: grabbing; }
.ca-model-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ca-model-frame { position: absolute; pointer-events: none; box-shadow: 0 0 0 9999px var(--scrim); outline: 1px solid var(--surface); }
.ca-model-frame::after { content: attr(data-size); position: absolute; left: 0; top: -22px; padding: 1px 6px; border-radius: var(--radius-xs); background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; }
.ca-model-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--text-2); background: var(--sunk); }
.ca-model-msg.bad { color: var(--danger); }
.ca-model-msg[hidden] { display: none; }
.ca-model-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ca-ms-scroll { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 16px; }
.ca-ms-foot { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 12px; border-top: 1px solid var(--line-soft); }
.ca-ms-foot .muted { text-align: center; }
.ca-ms-go { justify-content: center; }
.ca-ms-sec { display: flex; flex-direction: column; gap: 10px; }
.ca-ms-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ca-ms-h .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-ms-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ca-ms-chip.on { background: var(--prog-soft); border-color: var(--prog); color: var(--prog-strong); font-weight: 600; }
.ca-ms-add { align-self: flex-start; }
.ca-ms-shots { display: flex; flex-direction: column; gap: 6px; }
.ca-ms-shot { border: 1px solid var(--line); border-radius: var(--radius); }
.ca-ms-shot.open { border-color: var(--prog); }
.ca-ms-shead { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; }
.ca-ms-shead:hover { background: var(--hover); border-radius: var(--radius); }
.ca-ms-thumb { flex: none; width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius-xs); background: var(--checker); }
.ca-ms-sname { flex: 1; min-width: 0; padding: 4px 6px; }
.ca-ms-shot .pf-rows { padding: 4px 10px 0; }
.ca-ms-sacts { display: flex; gap: 6px; padding: 8px 10px 10px; }
.ca-ms-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ca-ms-look { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-s); cursor: pointer; }
.ca-ms-look:hover { background: var(--hover); }
.ca-ms-look.on { border-color: var(--prog); box-shadow: 0 0 0 1px var(--prog); font-weight: 600; }
.ca-ms-sw { height: 30px; border-radius: var(--radius-xs); }
.ca-ms-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ca-ms-colour { width: 32px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xs); background: none; cursor: pointer; }
.ca-ms-range { flex: 1; min-width: 100px; }
.ca-ms-pct { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ca-model-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(280px, 1fr) auto; } }

/* Ideas (concept/ideas.js, concept/ideasai.js): the left panel's two parts, an idea's page – its rounds of cells to pick */
.ca-sec { display: flex; align-items: center; justify-content: space-between; margin: 6px 6px 0 12px; }
.ca-sec .sec-label { margin: 0; }
.ca-brief { white-space: normal; }
.ca-keepline { margin: -6px 0 0; }
.ca-pickbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); position: sticky; top: -20px; z-index: 2; }
.ca-pickn { font-weight: 600; font-size: var(--fs-s); }
.ca-round { display: flex; flex-direction: column; gap: 8px; }
.ca-round-h { display: flex; align-items: center; gap: 10px; }
.ca-round-t { font-weight: 600; font-size: var(--fs-s); }
.ca-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 900px; }
.ca-cells.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.ca-cell { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; outline: none; }
.ca-cell:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.ca-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--prog), 0 0 0 3px var(--sel-soft); }
.ca-cell.picked { box-shadow: inset 0 0 0 2px var(--prog); background: var(--prog-soft); }
.ca-cell .ca-pic { aspect-ratio: 1; background: var(--surface); }
.ca-cell .ca-pic img { width: 100%; height: 100%; object-fit: contain; }
.ca-cell-star { position: absolute; top: 6px; right: 6px; display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--surface); color: var(--warn); box-shadow: var(--shadow); }
.ca-cell-star .material-symbols-outlined { font-size: 18px; font-variation-settings: 'FILL' 1; }
.ca-cell-design { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 2px; max-width: calc(100% - 12px); padding: 1px 8px 1px 4px; border: 0; border-radius: var(--radius-pill); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); font: inherit; font-size: var(--fs-xs); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-cell-design .material-symbols-outlined { font-size: 14px; }
.ca-cell-stage { display: flex; align-items: center; justify-content: center; cursor: default; background: var(--surface); }
.ca-cell-img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; }
.ca-sheet { display: flex; flex-direction: column; gap: 10px; }
.ca-sheet-big { width: 100%; height: auto; border-radius: var(--radius-s); }
/* the window */
.ca-ai-how { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--radius-s); background: var(--prog-soft); color: var(--prog-strong); font-size: var(--fs-s); }
.ca-ai-how[hidden] { display: none; }
.ca-ai-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ca-keep-chip { background: var(--sunk); color: var(--text-2); }
.ca-keep-chip img { width: 18px; height: 18px; object-fit: cover; border-radius: var(--radius-xs); margin-right: 4px; }
.ca-ai-round { display: flex; flex-direction: column; gap: 8px; }
.ca-ai-round .ca-cells { gap: 6px; }
.ca-cell-s .ca-name { font-size: var(--fs-xs); }
.ca-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-s); }
