/* Content Studio follows the warm paper and ink palette of the existing desk. */
.cs-studio { --cs-panel: #fdfcfa; }
.cs-eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cs-provider { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; min-height: 26px; margin: -6px 0 20px; }
.cs-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.cs-provider-missing { padding: 12px 16px; background: var(--amber-soft); border: 1px solid #e9d7ad; border-radius: 12px; color: #755418; }
.cs-brief-card { border: 1px solid var(--line-2); border-radius: 20px; padding: 24px; background: var(--surface); box-shadow: var(--shadow-sm); }
.cs-brief-intro, .cs-section-head > div:first-child { display: flex; align-items: flex-start; gap: 13px; }
.cs-step { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--accent); font: 11px var(--mono); }
.cs-brief-intro h2, .cs-section-head h2 { font-size: 19px; letter-spacing: -.025em; }
.cs-brief-intro p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.cs-brief-grid { display: grid; grid-template-columns: 1.2fr 1fr 110px; gap: 16px; margin: 22px 0 18px; }
.cs-brief-grid label, .cs-prompt-label, .cs-mapping label, .cs-dialog label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.cs-brief-card textarea[name=cs-prompt] { min-height: 105px; resize: vertical; }
.cs-brief-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; }
.cs-brief-actions > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-form-message { margin-top: 8px; font-size: 12px; color: var(--red); }
.cs-mapping { padding: 18px; margin-top: 22px; border-radius: 13px; background: var(--bg); border: 1px solid var(--line); }
.cs-mapping > div:first-child { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; }
.cs-mapping span { color: var(--muted); font-size: 12px; }
.cs-mapping-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.cs-records-head { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; font-size: 13px; }
.cs-table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; max-height: 420px; }
.cs-record-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cs-record-table th { padding: 9px; background: var(--bg); text-align: left; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.cs-record-table td { border-top: 1px solid var(--line); padding: 5px; vertical-align: top; }
.cs-record-table td:first-child { padding: 14px 10px; color: var(--faint); font-family: var(--mono); }
.cs-record-table textarea { display: block; min-width: 190px; width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; resize: vertical; padding: 8px; font-size: 12px; line-height: 1.5; }
.cs-record-table textarea:focus { background: white; border-color: var(--accent); outline: none; }
.cs-jobs { margin-top: 22px; display: grid; gap: 10px; }
.cs-job { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cs-job summary { list-style: none; display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 15px 18px; cursor: pointer; font-size: 13px; }
.cs-job summary::-webkit-details-marker { display: none; }
.cs-job summary > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cs-job summary > span { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }
.cs-job progress { width: calc(100% - 36px); height: 4px; display: block; margin: 0 18px 14px; accent-color: var(--accent); border: 0; }
.cs-job-items { padding: 0 18px 12px; display: grid; gap: 6px; }
.cs-job-items > div { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; background: var(--bg); }
.cs-job-items > div > span:nth-child(2) { flex: 1; font-size: 12px; }
.cs-job-items small { display: block; font-size: 11px; color: var(--muted); }
.cs-item-number { color: var(--faint); font: 10px var(--mono); }
.cs-job > .btn { margin: 0 18px 12px; }
.cs-gallery-wrap { margin-top: 34px; }
.cs-section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 19px; }
.cs-section-head > div:first-child { align-items: center; }
.cs-batch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.cs-selection-count { font-size: 12px; color: var(--muted); }
.cs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.cs-design-card { min-width: 0; padding: 9px; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.cs-design-card:hover, .cs-design-card.is-selected { border-color: #cfb7a8; box-shadow: var(--shadow-sm); }
.cs-design-art { aspect-ratio: 1; position: relative; background: #f0ece6; border-radius: 10px; overflow: hidden; }
.cs-open-art { width: 100%; height: 100%; display: grid; place-items: center; background: none; padding: 0; border: 0; }
.cs-open-art img { width: 100%; height: 100%; object-fit: contain; }
.cs-design-select { position: absolute; left: 9px; top: 9px; width: 25px; height: 25px; display: grid; place-items: center; background: #ffffffef; border: 1px solid #dfd8cf; border-radius: 6px; }
.cs-design-select input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.cs-design-art > .cs-badge { position: absolute; bottom: 9px; left: 9px; box-shadow: 0 1px 6px #00000010; }
.cs-badge { background: #f4eee6; color: #685d50; font-size: 10px; font-weight: 600; display: inline-flex; padding: 4px 8px; line-height: 1.3; border-radius: 6px; text-transform: capitalize; }
.cs-badge.cs-approved { background: var(--green-soft); color: var(--green); }
.cs-design-info { padding: 12px 5px 6px; }
.cs-design-info button { border: none; background: none; display: block; text-align: left; padding: 0; font-size: 13px; font-weight: 600; line-height: 1.4; width: 100%; }
.cs-design-info > span { color: var(--faint); font-size: 11px; display: block; margin-top: 4px; }
.cs-no-preview { padding: 25px; color: var(--muted); font: var(--title-md); }
.cs-empty { grid-column: 1 / -1; text-align: center; border: 1px dashed var(--line-2); border-radius: 18px; padding: 46px 24px; color: var(--muted); font-size: 13px; }
.cs-empty h3 { color: var(--ink); font: var(--title-md); letter-spacing: -.02em; margin: 18px 0 8px; }
.cs-empty-art { display: flex; justify-content: center; height: 64px; padding-left: 18px; }
.cs-empty-art i { width: 51px; height: 62px; background: #f5e0d5; border: 3px solid white; border-radius: 6px; transform: rotate(-12deg); box-shadow: 0 1px 8px #4b332413; margin-left: -14px; }
.cs-empty-art i:nth-child(2) { background: #e8e4d7; transform: rotate(4deg); }
.cs-empty-art i:nth-child(3) { background: #dbebdf; transform: rotate(16deg); }
.cs-error { color: var(--red); font-size: 12px; padding: 15px; display: grid; gap: 10px; }
.cs-editing { overflow: hidden; }
.cs-editor { --cs-panel: #fdfcfa; position: fixed; inset: 0; z-index: 38; display: flex; flex-direction: column; background: var(--bg); font-family: var(--sans); }
.cs-resources-toggle { display: none; }
.cs-layout-list { display: grid; gap: 10px; padding: 20px 0; }
.cs-editor-head { min-height: 70px; padding: 12px 18px; display: flex; align-items: center; gap: 17px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.cs-title-wrap { flex: 1; min-width: 100px; display: grid; gap: 2px; }
.cs-title { font-size: 14px; font-weight: 600; background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 2px 5px; width: 100%; min-width: 100px; outline: none; }
.cs-title:focus { border-color: var(--line-2); }
.cs-save { padding-left: 6px; color: var(--faint); font-size: 10px; }
.cs-editor-top-actions { display: flex; align-items: center; gap: 7px; }
.cs-editor-top-actions .icon-btn { width: 30px; height: 30px; flex-basis: 30px; font-size: 21px; }
.cs-editor-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(250px, 1fr) 300px; }
.cs-left, .cs-right { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--cs-panel); }
.cs-left { border-right: 1px solid var(--line-2); }
.cs-right { border-left: 1px solid var(--line-2); }
.cs-panel-tabs { min-height: 49px; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); padding: 0 8px; gap: 2px; flex-shrink: 0; overflow: auto; }
.cs-panel-tabs button { border: 0; background: none; font-size: 11px; color: var(--muted); padding: 0 9px; white-space: nowrap; border-bottom: 2px solid transparent; }
.cs-panel-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.cs-left-content, .cs-right-content { flex: 1; min-height: 0; overflow: auto; padding: 16px; scrollbar-width: thin; }
.cs-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 16px; font-size: 12px; }
.cs-panel-heading > span { color: var(--faint); font-size: 10px; }
.cs-panel-note { color: var(--faint); font-size: 11px; line-height: 1.7; margin: 15px 0; }
.cs-layer-list { display: flex; flex-direction: column; gap: 4px; margin: 0 -9px; }
.cs-layer { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 9px 7px; text-align: left; font-size: 11px; }
.cs-layer.active { background: #f8e8e0; border-color: #eccfc0; }
.cs-layer > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; }
.cs-layer small { display: block; color: var(--faint); font-size: 9px; }
.cs-layer-type { flex: 0 0 25px; width: 25px; height: 25px; border: 1px solid var(--line-2); background: white; border-radius: 5px; display: grid; place-items: center; font-size: 14px; }
.cs-canvas-main { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #ebe7df; }
.cs-canvas-tools { min-height: 49px; flex-shrink: 0; display: flex; gap: 3px; padding: 7px 12px; align-items: center; background: #f5f2ed; border-bottom: 1px solid var(--line-2); overflow-x: auto; }
.cs-canvas-tools > button { background: none; border: 1px solid transparent; padding: 6px 8px; border-radius: 7px; font-size: 11px; white-space: nowrap; }
.cs-canvas-tools > button:hover { background: #e9e3d9; }
.cs-canvas-tools > button.active { background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.cs-canvas-tools > span { height: 20px; width: 1px; background: var(--line-2); margin: 0 5px; flex-shrink: 0; }
.cs-viewport { min-height: 0; flex: 1; padding: 36px; display: flex; overflow: auto; background-image: radial-gradient(#d4cec4 .65px, transparent .65px); background-size: 12px 12px; }
.cs-artboard { position: relative; margin: auto; flex-shrink: 0; background: white; box-shadow: 0 4px 20px #2e261e22; }
.cs-artboard .canvas-container { position: absolute !important; left: 0; top: 0; }
.cs-raster-preview, .cs-annotations { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-raster-preview { object-fit: contain; }
.cs-annotations { pointer-events: none; overflow: visible; }
.cs-canvas-footer { display: flex; align-items: center; justify-content: space-between; min-height: 42px; flex-shrink: 0; padding: 6px 13px; background: #f5f2ed; border-top: 1px solid var(--line-2); font-size: 10px; color: var(--muted); gap: 8px; }
.cs-canvas-footer > div { display: flex; gap: 0; align-items: center; }
.cs-canvas-footer .btn { padding: 0 8px; height: 25px; font-size: 11px; }
.cs-zoom { min-width: 38px; text-align: center; font-family: var(--mono); font-size: 9px; }
.cs-view-label { color: var(--accent); }
.cs-field { display: grid; gap: 7px; margin: 0 0 16px; font-size: 11px; font-weight: 600; }
.cs-editor .input { font-size: 12px; padding: 8px 10px; border-radius: 8px; }
.cs-editor textarea.input { min-height: 85px; }
.cs-editor input[type=color] { height: 34px; padding: 4px; width: 100%; }
.cs-property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.cs-property-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.cs-inspector-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 0 14px; }
.cs-inspector-actions .btn { padding-left: 10px; padding-right: 10px; }
.cs-align-tools { display: flex; gap: 3px; padding: 8px 0 13px; }
.cs-align-tools button { flex: 1; font-size: 10px; border: 1px solid var(--line-2); border-radius: 6px; background: white; padding: 7px; }
.cs-align-label { color: var(--faint); font-size: 10px; margin-top: 12px; }
.cs-align-tools + .cs-align-tools { padding-top: 0; }
.cs-brand-palette { margin: 12px 0 18px; }
.cs-brand-palette > span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 8px; }
.cs-brand-palette > div { display: flex; flex-wrap: wrap; gap: 7px; }
.cs-brand-palette button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #00000025; box-shadow: inset 0 0 0 2px #ffffff77; }
.cs-comment-selection { margin-top: 8px; width: 100%; }
.cs-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cs-assets > button { min-width: 0; border: 1px solid var(--line-2); background: white; padding: 5px; border-radius: 9px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.cs-assets img { width: 100%; height: 86px; object-fit: contain; background: #f8f5ef; border-radius: 5px; }
.cs-assets span { display: block; font-size: 9px; line-height: 1.4; padding: 3px; overflow-wrap: anywhere; }
.cs-assets .cs-panel-note { grid-column: 1 / -1; }
.cs-slides { display: grid; gap: 15px; }
.cs-slides > div { border: 1px solid var(--line-2); padding: 6px; border-radius: 9px; }
.cs-slides > div.active { border-color: var(--accent); }
.cs-slides > div > button { width: 100%; border: 0; background: none; text-align: left; padding: 0; }
.cs-slides img, .cs-slide-placeholder { display: block; width: 100%; aspect-ratio: 1; background: white; object-fit: contain; border-radius: 4px; }
.cs-slides > div > button > span:last-child { display: block; padding: 8px 3px; font-size: 11px; }
.cs-slides > div > div { display: flex; justify-content: space-between; }
.cs-quality { margin: 20px 0; padding: 13px; background: #f1ede5; border-radius: 9px; font-size: 10px; }
.cs-quality p { color: var(--muted); margin-top: 5px; line-height: 1.7; }
.cs-quality ul { padding-left: 16px; margin-bottom: 0; color: var(--amber); }
.cs-template-actions { display: grid; margin-top: 15px; }
.cs-assistant-intro { margin: 4px 0 18px; }
.cs-assistant-intro h3 { font: var(--title-md); letter-spacing: -.02em; }
.cs-assistant-intro p { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 8px; }
.cs-ai-form textarea.input { min-height: 120px; }
.cs-check { display: flex; gap: 8px; align-items: flex-start; font-size: 10px; margin: 12px 0; color: var(--muted); }
.cs-check input { accent-color: var(--accent); margin: 1px 0 0; }
.cs-ai-jobs { display: grid; gap: 10px; margin-top: 20px; }
.cs-ai-jobs article { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px; font-size: 11px; }
.cs-ai-jobs article p { margin-top: 7px; overflow-wrap: anywhere; }
.cs-ai-jobs article small { display: block; margin-top: 7px; color: var(--muted); }
.cs-comment { border-top: 1px solid var(--line); padding: 13px 0; font-size: 11px; }
.cs-comment > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cs-comment > p { margin: 10px 0; line-height: 1.6; overflow-wrap: anywhere; }
.cs-comment small { color: var(--faint); font-size: 9px; }
.cs-comment.is-resolved { opacity: .6; }
.cs-comment .cs-orphan { display: block; color: var(--amber); margin: 10px 0; }
.cs-revision { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 5px; font-size: 11px; }
.cs-revision span, .cs-revision small { color: var(--muted); }
.cs-revision .btn { justify-self: start; margin-top: 4px; }
.cs-dialog { border: 1px solid var(--line-2); border-radius: 18px; padding: 25px; max-width: min(540px, calc(100% - 32px)); width: 100%; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-lg); z-index: 150; }
.cs-dialog::backdrop { background: #201c1666; backdrop-filter: blur(3px); }
.cs-style-options { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 2fr); align-items: start; gap: 18px; margin: 18px 0; }
.cs-style-detail { border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.cs-style-detail summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.cs-style-detail > p, .cs-image-provider { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 9px 0; }
.cs-reference-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 285px; overflow-y: auto; margin-top: 12px; }
.cs-reference { position: relative; padding: 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; }
.cs-reference.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.cs-reference input { position: absolute; left: 9px; top: 9px; accent-color: var(--accent); }
.cs-reference img { width: 100%; height: 85px; object-fit: contain; background: var(--surface); border-radius: 4px; }
.cs-reference span { display: block; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; max-height: 42px; overflow: hidden; }
.cs-font-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.cs-art-options { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); margin: 15px 0; }
.cs-art-check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cs-art-check input { accent-color: var(--accent); }
.cs-card-previews { display: grid; gap: 8px; margin-top: 12px; }
.cs-card-previews details { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 11px; }
.cs-card-previews summary { cursor: pointer; font-weight: 600; }
.cs-card-previews article { display: flex; gap: 12px; margin-top: 13px; padding: 10px; border-radius: 7px; background: var(--surface); }
.cs-card-previews article > span { color: var(--accent); font: var(--title-md); }
.cs-card-previews p { margin: 5px 0; line-height: 1.6; }
.cs-card-previews small { color: var(--muted); }
.cs-content-outline { padding-bottom: 14px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.cs-content-outline summary { font-size: 12px; font-weight: 600; cursor: pointer; margin-bottom: 8px; }
.cs-content-outline > button { display: grid; gap: 4px; width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 7px; text-align: left; background: transparent; }
.cs-content-outline > button:hover, .cs-content-outline > button.active { background: var(--accent-soft); border-color: var(--line); }
.cs-content-outline small { font-size: 9px; color: var(--muted); }
.cs-content-outline span { font-size: 11px; line-height: 1.5; max-height: 32px; overflow: hidden; }
@media (max-width: 760px) { .cs-style-options { grid-template-columns: 1fr; gap: 12px; } .cs-font-options { grid-template-columns: 1fr; } }
.cs-dialog h2 { font: var(--title-lg); letter-spacing: -.02em; margin-bottom: 18px; }
.cs-dialog label { font-weight: 400; color: var(--muted); line-height: 1.7; }
.cs-dialog textarea { margin-top: 8px; }
.cs-dialog form > div:last-child { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.cs-export-dialog p { font-size: 12px; color: var(--muted); }
.cs-export-files { display: grid; gap: 9px; padding: 18px 0; }
.cs-conflict { padding: 8px 18px; background: var(--amber-soft); color: #755418; font-size: 12px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cs-editor button:focus-visible, .cs-studio button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1200px) { .cs-editor-body { grid-template-columns: 190px minmax(240px, 1fr) 270px; } .cs-left-content, .cs-right-content { padding: 13px; } .cs-editor-head { gap: 10px; padding: 10px; } .cs-editor-top-actions .btn { padding: 0 11px; font-size: 11px; } .cs-canvas-footer > .cs-view-label { display: none; } }
@media (max-width: 950px) { .cs-editor-body { grid-template-columns: 150px minmax(200px, 1fr) 235px; } .cs-panel-tabs { padding: 0 3px; gap: 0; } .cs-panel-tabs button { padding: 0 7px; font-size: 10px; } .cs-editor-top-actions { gap: 3px; } .cs-title-wrap { max-width: 170px; } .cs-viewport { padding: 24px; } .cs-editor-top-actions [data-ce=export] { display: none; } .cs-assets { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cs-brief-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .cs-quantity { max-width: 100px; } .cs-brief-card { padding: 18px; } .cs-brief-actions { align-items: flex-start; flex-direction: column; } .cs-brief-actions > .btn { align-self: flex-end; } .cs-section-head { align-items: flex-start; } .cs-editor-head { flex-wrap: wrap; min-height: 94px; gap: 5px; } .cs-title-wrap { max-width: none; flex: 1; } .cs-editor-top-actions { width: 100%; justify-content: flex-end; gap: 6px; } .cs-editor-top-actions .btn { height: 29px; } .cs-editor-body { grid-template-columns: minmax(0, 1fr) 210px; } .cs-left { display: none; } .cs-canvas-tools { padding: 6px; gap: 0; } .cs-canvas-tools > button { padding: 6px; font-size: 10px; } .cs-canvas-tools > span { margin: 0 2px; } .cs-viewport { padding: 20px; } .cs-canvas-footer { padding: 5px; flex-direction: column; gap: 0; } .cs-canvas-detail { font-size: 8px; } .cs-conflict { flex-wrap: wrap; gap: 5px; padding: 8px; font-size: 10px; } }
@media (max-width: 760px) { .cs-canvas-tools > .cs-resources-toggle { display: block; } .cs-left.is-open { display: flex; position: absolute; z-index: 10; left: 0; top: 94px; bottom: 0; width: 235px; box-shadow: var(--shadow-lg); } }
@media (max-width: 510px) { .cs-editor-body { display: flex; flex-direction: column; } .cs-canvas-main { flex: 1; min-height: 230px; } .cs-right { flex: 0 0 36%; max-height: 280px; border-left: 0; border-top: 1px solid var(--line-2); } .cs-panel-tabs { min-height: 36px; } .cs-panel-tabs button { padding: 0 14px; font-size: 11px; } .cs-right-content { padding: 12px 15px; } .cs-property-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } .cs-field { margin-bottom: 10px; } .cs-right-content .cs-panel-heading { margin-bottom: 10px; } .cs-canvas-footer { flex-direction: row; } .cs-editor-head > .btn { font-size: 11px; padding: 0 7px; } .cs-editor-top-actions [data-ce=preview] { margin-right: auto; } .cs-editor-top-actions .btn { padding: 0 9px; } .cs-gallery { grid-template-columns: 1fr 1fr; gap: 10px; } .cs-design-card { padding: 6px; border-radius: 12px; } .cs-design-info button { font-size: 11px; } .cs-design-info > span { font-size: 9px; } .cs-design-select { width: 22px; height: 22px; left: 6px; top: 6px; } .cs-badge { font-size: 8px; } .cs-empty { grid-column: 1 / -1; } .cs-section-head { flex-direction: column; } .cs-job summary { padding: 12px; } .cs-job summary strong { font-size: 11px; } }
@media (max-width: 510px) { .cs-editor-top-actions { overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; scrollbar-width: none; } .cs-editor-top-actions > * { flex-shrink: 0; } .cs-editor-top-actions [data-ce=duplicate-design] { display: none; } .cs-editor-top-actions [data-ce=preview] { font-size: 0; margin-right: auto; } .cs-editor-top-actions [data-ce=preview]::after { content: "Preview"; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .cs-studio *, .cs-editor * { scroll-behavior: auto !important; transition: none !important; } }

/* Image creation is the front door; precise layer editing stays a second step. */
.cs-image-create { max-width: 1050px; padding: 25px 28px 20px; }
.cs-image-create .cs-brief-grid { margin-top: 0; grid-template-columns: 1.3fr 1fr 95px; }
.cs-image-create .cs-prompt-label { font-size: 13px; }
.cs-image-create textarea[name=cs-prompt] { min-height: 132px; padding: 17px; font-size: 16px; line-height: 1.6; background: var(--bg); border-color: var(--line); }
.cs-brand-context { display: flex; align-items: center; gap: 12px; min-height: 45px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.cs-brand-context strong { display: inline; font-weight: 500; color: var(--ink); margin-left: 4px; }
.cs-brand-miniatures { display: flex; padding-left: 3px; }
.cs-brand-miniatures img { width: 33px; height: 35px; object-fit: contain; padding: 3px; border-radius: 6px; background: white; border: 1px solid var(--line); margin-left: -3px; }
.cs-advanced { margin: 15px 0 0; border-top: 1px solid var(--line); }
.cs-advanced > summary { display: flex; gap: 13px; align-items: baseline; cursor: pointer; padding: 15px 0; color: var(--ink); font-size: 12px; list-style: none; }
.cs-advanced > summary::before { content: "+"; font-size: 16px; font-weight: 400; color: var(--muted); }
.cs-advanced[open] > summary::before { content: "−"; }
.cs-advanced > summary span { font-size: 11px; color: var(--muted); font-weight: 400; }
.cs-advanced-body { padding: 5px 0 17px; }
.cs-advanced-body > label { display: grid; gap: 7px; font-size: 12px; max-width: 330px; }
.cs-model-details { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 13px; }
.cs-create-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid var(--line); padding-top: 17px; }
.cs-create-footer .cs-provider { margin: 0; font-size: 11px; }
.cs-create-footer .cs-provider-missing { border: 0; padding: 0; background: none; }
.cs-create-footer > .btn { min-width: 155px; }
.cs-review { position: fixed; inset: 0; z-index: 38; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--sans); }
.cs-review[hidden] { display: none; }
.cs-review-head { display: flex; align-items: center; gap: 25px; min-height: 79px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cs-review-title { flex: 1; min-width: 0; }
.cs-review-title h2 { font-size: 14px; line-height: 1.5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-review-save { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.cs-review-actions { display: flex; align-items: center; gap: 8px; }
.cs-review-body { display: grid; grid-template-columns: minmax(0, 1fr) 370px; flex: 1; min-height: 0; }
.cs-review-art { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #eae5dd; padding: 28px 36px 12px; }
.cs-review-image-stage { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.cs-review-image-stage img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 13px #3b30251c); }
.cs-review-image-stage img:not([src]) { visibility: hidden; }
.cs-review-image-footer { min-height: 45px; display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 14px; font-size: 10px; color: var(--muted); }
.cs-review-slide-nav { display: flex; gap: 4px; }
.cs-review-slide-nav button { width: 25px; height: 25px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; font-size: 10px; }
.cs-review-slide-nav button.active { background: var(--surface); color: var(--ink); }
.cs-review-error { margin: 0; font-size: 12px; color: var(--red); line-height: 1.6; }
.cs-review-error:not(:empty) { padding: 8px 0 4px; }
.cs-review-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--surface); }
.cs-review-tabs { display: flex; gap: 22px; padding: 0 23px; border-bottom: 1px solid var(--line); min-height: 51px; flex-shrink: 0; }
.cs-review-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 2px; font-size: 12px; color: var(--muted); }
.cs-review-tabs button.active { color: var(--accent); border-color: var(--accent); }
.cs-review-conversation { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cs-review-conversation[hidden], .cs-review-history[hidden] { display: none; }
.cs-review-thread { flex: 1; min-height: 0; overflow: auto; padding: 26px 24px; scrollbar-width: thin; }
.cs-review-welcome { margin: 0 0 30px; }
.cs-review-welcome h3, .cs-review-history-intro h3 { font: var(--title-lg); letter-spacing: -.02em; }
.cs-review-welcome p, .cs-review-history-intro p { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 11px; }
.cs-conversation-turn { margin-top: 25px; font-size: 12px; }
.cs-message-user { padding: 13px 15px; background: #f1e9df; border-radius: 12px 12px 3px 12px; }
.cs-message-user > span, .cs-message-result > span { display: block; font-size: 10px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cs-message-user p, .cs-message-result p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.cs-message-result { padding: 14px 3px 0; }
.cs-message-result > button { display: inline; background: none; border: 0; padding: 7px 0 0; margin-right: 15px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; color: var(--accent); }
.cs-review-form { padding: 17px 20px 19px; border-top: 1px solid var(--line); flex-shrink: 0; }
.cs-review-form > label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.cs-review-form textarea.input { min-height: 95px; max-height: 210px; resize: vertical; padding: 11px 12px; font-size: 12px; line-height: 1.6; border-radius: 10px; background: var(--bg); }
.cs-review-form > div { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 11px; }
.cs-review-form small { max-width: 135px; font-size: 10px; line-height: 1.5; color: var(--muted); }
.cs-review-form .btn { flex-shrink: 0; }
.cs-review-history { min-height: 0; overflow: auto; padding: 23px; }
.cs-review-history-intro { margin-bottom: 20px; }
.cs-image-version { width: 100%; padding: 9px; display: flex; gap: 14px; align-items: center; background: transparent; text-align: left; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
.cs-image-version.active { border-color: var(--accent); background: var(--accent-soft); }
.cs-image-version img { width: 72px; height: 96px; object-fit: contain; background: white; border-radius: 4px; }
.cs-image-version strong { display: block; font-size: 12px; font-weight: 600; }
.cs-image-version small { display: block; font-size: 10px; color: var(--muted); margin-top: 8px; }
.cs-review button:focus-visible, .cs-review textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1000px) { .cs-review-body { grid-template-columns: minmax(0, 1fr) 330px; } .cs-review-head { gap: 14px; padding: 13px 16px; } .cs-review-art { padding: 22px 24px 10px; } .cs-review-title h2 { max-width: 300px; } }
@media (max-width: 760px) { .cs-image-create { padding: 20px; } .cs-image-create .cs-brief-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .cs-image-create .cs-quantity { max-width: 95px; } .cs-advanced > summary span { display: none; } .cs-review-head { gap: 9px; flex-wrap: wrap; min-height: 112px; } .cs-review-title { min-width: 140px; } .cs-review-actions { width: 100%; justify-content: flex-end; } .cs-review-actions [data-rv=layers] { margin-right: auto; } .cs-review-body { display: flex; flex-direction: column; } .cs-review-art { flex: 1; min-height: 180px; padding: 15px 20px 0; } .cs-review-side { flex: 0 0 43%; max-height: 410px; border-left: 0; border-top: 1px solid var(--line); } .cs-review-image-footer { min-height: 35px; margin-top: 5px; } .cs-review-tabs { min-height: 40px; } .cs-review-thread { padding: 16px 20px; } .cs-review-welcome { margin-bottom: 18px; }  .cs-review-welcome p { margin-top: 7px; } .cs-review-form { padding: 10px 16px 12px; } .cs-review-form textarea.input { min-height: 68px; max-height: 120px; } .cs-review-form > div { margin-top: 7px; } .cs-conversation-turn { margin-top: 16px; } .cs-review-history { padding: 15px 20px; } }
@media (prefers-reduced-motion: reduce) { .cs-review * { scroll-behavior: auto !important; transition: none !important; } }
