/* Same studio surfaces and accents, with an image-first editing workspace. */
.workspace-nav { display: grid; gap: 5px; margin: 18px 0 8px; }
.workspace-nav a { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 14px; color: #838792; font-size: 12px; text-decoration: none; }
.workspace-nav .icon { width: 17px; height: 17px; }
.workspace-nav a[aria-current="page"] { color: #30343e; background: #ffffffb8; }
.workspace-nav a:hover { background: #ffffff82; }
.workspace-nav a > span { margin-left: auto; color: var(--accent); font-size: 8px; letter-spacing: .08em; }
.custom-mode .chat-scroll, .custom-mode .composer-wrap, .custom-mode .header-tier { display: none; }
.custom-header-note { margin: 8px 0 0; color: #9498a2; font-size: 10px; }
.custom-workspace { flex: 1; min-height: 0; padding: 12px 24px 30px; overflow: auto; }
.custom-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 9px 0 25px; }
.custom-intro .eyebrow { font-size: 8px; letter-spacing: .13em; color: #9ca0aa; }
.custom-intro h1 { margin: 10px 0 8px; font-size: clamp(25px, 2.7vw, 35px); font-weight: 600; letter-spacing: -.04em; }
.custom-intro p:last-child { margin: 0; color: #9296a0; font-size: 11px; line-height: 1.8; }
.custom-mode-badge { flex-shrink: 0; padding: 8px 12px; border-radius: var(--radius-pill); color: var(--accent); background: #fff1f4; font-size: 10px; }
.custom-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 340px); align-items: start; gap: 20px; }
.custom-canvas-panel { position: sticky; top: 0; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 24px; background: #fafbfc; }
.custom-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.custom-panel-heading > div { display: flex; align-items: center; gap: 9px; }
.custom-panel-heading h2 { margin: 0; font-size: 13px; font-weight: 550; }
.custom-step { color: #b4b7c0; font-size: 10px; }
.custom-panel-heading .secondary-button { padding: 8px 12px; font-size: 10px; }
.custom-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 19px 0 12px; }
.custom-tools { display: flex; padding: 3px; border-radius: 12px; background: #eff0f4; }
.custom-tools button { display: flex; align-items: center; gap: 5px; padding: 7px 9px; border: 0; border-radius: 10px; color: #969aa4; background: transparent; font-size: 10px; }
.custom-tools button[aria-pressed="true"] { color: #525762; background: #fff; box-shadow: 0 2px 5px #24263506; }
.custom-tools .icon { width: 13px; height: 13px; }
.custom-circle-icon { width: 12px; height: 12px; border: 1.3px solid currentColor; border-radius: 50%; }
.custom-colors { display: flex; gap: 3px; }
.red { --mark-color: #fa284e; --mark-tint: #fff3f5; }
.green { --mark-color: #28a875; --mark-tint: #f0faf5; }
.blue { --mark-color: #4285eb; --mark-tint: #f2f6fe; }
.custom-color { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; }
.custom-color > span { width: 16px; height: 16px; border-radius: 50%; background: var(--mark-color); }
.custom-color[aria-pressed="true"] { border-color: #cdd1da; background: #fff; }
.custom-history-tools { display: flex; gap: 9px; margin-left: auto; }
.custom-history-tools button { padding: 5px 0; border: 0; color: #858995; background: transparent; font-size: 10px; }
.custom-history-tools button:disabled { color: #c4c7ce; cursor: default; }
.custom-stage { display: flex; align-items: center; justify-content: center; min-height: 390px; padding: 14px; overflow: hidden; border: 1px solid #eceef2; border-radius: 17px; background: #f0f2f5; background-image: radial-gradient(#d9dde5 0.7px, transparent 0.7px); background-size: 13px 13px; }
.custom-stage canvas { display: block; max-width: 100%; max-height: clamp(280px, calc(100dvh - 335px), 530px); width: auto; height: auto; border-radius: 5px; box-shadow: 0 5px 24px #292d4010; touch-action: none; cursor: crosshair; }
.custom-stage-empty { display: flex; flex-direction: column; align-items: center; padding: 25px 6px; text-align: center; }
.custom-upload-symbol { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 17px; border: 1px solid #fff; border-radius: 20px; color: #9ca2af; background: #ffffff91; }
.custom-upload-symbol .icon { width: 26px; height: 26px; stroke-width: 1.3; }
.custom-stage-empty h3 { margin: 0; color: #616773; font-size: 15px; font-weight: 500; }
.custom-stage-empty p { margin: 12px 0 22px; color: #989eab; font-size: 11px; line-height: 1.9; }
.custom-stage-empty .confirm-button { display: flex; align-items: center; gap: 15px; padding: 11px 20px; font-size: 11px; }
.custom-stage-empty small { margin-top: 16px; color: #a7acb7; font-size: 9px; }
#customTestImage { margin-top: 8px; font-size: 10px; }
.custom-canvas-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; color: #a2a7b1; font-size: 9px; }
#customImageInfo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#customMarkCount { flex-shrink: 0; }
.custom-canvas-help { margin: 15px 0 0; color: #9399a5; font-size: 9px; line-height: 1.8; }
.custom-help-dot { display: inline-block; width: 4px; height: 4px; margin-right: 5px; border-radius: 50%; background: #a8aebb; }
.custom-instructions-panel { min-width: 0; }
#customEditForm { padding: 19px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 9px 26px #32394b04; }
.custom-small-label { color: #aaaeb7; font-size: 9px; }
.custom-instruction-empty { padding: 28px 8px; border-radius: 15px; margin: 18px 0 16px; background: #f7f8fa; text-align: center; }
.custom-color-legend { display: flex; justify-content: center; gap: 7px; }
.custom-color-legend i, .custom-color-field-heading i { width: 8px; height: 8px; border-radius: 50%; background: var(--mark-color); }
.custom-instruction-empty p { margin: 12px 0 0; color: #999eaa; font-size: 10px; line-height: 1.9; }
.custom-color-fields { display: grid; gap: 12px; margin-top: 19px; }
.custom-color-field { display: block; padding: 12px; border: 1px solid color-mix(in srgb, var(--mark-color) 12%, white); border-radius: 14px; background: var(--mark-tint); }
.custom-color-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 8px; color: #636975; font-size: 11px; }
.custom-color-field-heading label { display: flex; align-items: center; gap: 7px; }
.custom-color-field-heading button { padding: 3px 7px; border: 0; border-radius: 8px; color: #878d99; background: #ffffff80; font-size: 10px; }
.custom-color-field-heading button:hover { color: var(--mark-color); background: #fff; }
.custom-stage canvas:focus-visible { outline: 2px solid #cbd1df; outline-offset: 3px; }
.custom-color-field textarea, .custom-overall-field textarea { display: block; width: 100%; padding: 0; resize: vertical; min-height: 46px; max-height: 180px; border: 0; color: #525965; background: transparent; font-size: 11px; line-height: 1.8; }
.custom-color-field textarea::placeholder, .custom-overall-field textarea::placeholder { color: #a8aeba; }
.custom-color-field:focus-within { border-color: #c9ced8; }
.custom-overall-field { display: block; margin: 18px 0; color: #7a808c; font-size: 10px; }
.custom-overall-field > span { margin-left: 6px; color: #b0b5be; font-size: 9px; }
.custom-overall-field textarea { margin-top: 8px; padding: 10px 12px; border-radius: 13px; background: #f6f7f9; }
.custom-output-settings { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid #eef0f4; }
.custom-output-settings > .output-control { width: 100%; }
.custom-output-row { display: flex; flex-wrap: wrap; gap: 7px; }
.custom-output-settings .output-control { min-width: 0; padding: 8px 10px; font-size: 9px; }
.custom-output-settings .model-control .studio-select { flex: 1; min-width: 0; }
.custom-output-settings .studio-select-trigger { width: 100%; font-size: 10px; }
.custom-output-settings .studio-select-value { overflow: hidden; text-overflow: ellipsis; }
.custom-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 18px; padding: 13px 17px; border: 0; border-radius: 16px; color: #fff; background: var(--accent); font-size: 12px; }
.custom-submit:hover:not(:disabled) { background: var(--accent-hover); }
.custom-submit:disabled { color: #a8adb7; background: #eff1f5; cursor: default; }
.custom-submit .icon { width: 18px; height: 18px; }
.custom-submit-note { margin: 12px 0 0; color: #a9aeb8; font-size: 9px; line-height: 1.7; }
.custom-edit-error { margin: 12px 0 0; color: #df3e5c; font-size: 11px; line-height: 1.7; }
.custom-results { margin-top: 22px; }
/* A short queued task still needs enough room below it to align at the viewport top. */
.custom-results:has(.custom-task) { min-height: calc(100dvh - 130px); }
.custom-result-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.custom-result-heading h2 { margin: 0; font-size: 12px; font-weight: 500; }
.custom-result-heading > span { color: #a7acb6; font-size: 9px; }
.custom-result-empty { margin: 0; padding: 17px; border: 1px dashed var(--line); border-radius: 17px; color: #a2a8b3; font-size: 10px; text-align: center; }
.custom-task { margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: #fafbfc; }
.custom-task-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.custom-task-head strong { font-size: 11px; font-weight: 500; line-height: 1.7; }
.custom-task-head > span { flex-shrink: 0; color: #a2a7b1; font-size: 9px; line-height: 1.8; }
.custom-task p { color: #979eab; font-size: 10px; line-height: 1.7; }
.custom-task-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.custom-task-images figure { margin: 0; min-width: 0; }
.custom-task-images button { display: block; width: 100%; padding: 0; border: 0; border-radius: 13px; overflow: hidden; background: #fff; }
.custom-task-images img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.custom-task-image-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 8px; }
.custom-task-image-actions a, .custom-task-image-actions button { width: auto; color: #7e8795; background: transparent; font-size: 9px; text-decoration: none; }
.custom-task.is-pending { border-color: #e6e9f1; }
.custom-task.is-pending > p::before { display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: var(--accent); content: ''; animation: custom-pulse 1.5s ease-in-out infinite; }
@keyframes custom-pulse { 50% { opacity: .25; } }
@media (max-width: 1050px) { .custom-workspace { padding: 10px 15px 25px; } .custom-grid { gap: 12px; grid-template-columns: minmax(0, 1fr) 285px; } .custom-canvas-panel { padding: 13px; } .custom-toolbar { gap: 5px; } .custom-history-tools { width: 100%; justify-content: flex-end; } }
@media (max-width: 900px) { .custom-grid { grid-template-columns: 1fr; } .custom-canvas-panel { position: static; } .custom-stage { min-height: 320px; } .custom-stage canvas { max-height: 450px; } .custom-history-tools { width: auto; } .custom-intro { margin-bottom: 19px; } }
@media (prefers-reduced-motion: reduce) { .custom-task.is-pending > p::before { animation: none; } }
