/* Contextual editing and image workbench. The existing editor remains the core. */
.topbar { grid-template-columns: 205px minmax(140px,1fr) auto; gap: 12px; }
.create-design-button { border-color: #8966e5; background: #33254e; white-space: nowrap; }
.image-stage { display: flex; flex-direction: column; min-width: 0; }
.stage-toolbar { flex-shrink: 0; }
.image-editor-shell { flex: 1; min-height: 0; }
.context-toolbar { display: flex; flex-shrink: 0; align-items: center; gap: 3px; padding: 9px 12px; min-height: 53px; overflow-x: auto; scrollbar-width: thin; background: #1e2129; border-block: 1px solid #34313f; }
.context-toolbar button { flex-shrink: 0; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 12px; white-space: nowrap; }
.context-toolbar button:hover, .context-toolbar button.active { background: #3b2c55; color: #e3ccff; }
.context-toolbar button:disabled { opacity: .3; }
.editing-target { flex-shrink: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-inline: 1px solid #46414f; padding: 0 10px; margin-right: 4px; color: #b5a5c9; font-size: 12px; }
.statusbar { flex-shrink: 0; }
.empty-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.drop-empty { max-width: 560px; }
.empty-art { font-size: 60px; color: #c9a0ff; margin-bottom: 15px; width: 105px; height: 105px; display: grid; place-items: center; border-radius: 27px; border: 1px solid #6a468d; background: radial-gradient(circle at 20% 15%, #71489b, #201829 70%); box-shadow: 15px 15px 0 -3px #171b26,15px 15px 0 -2px #494153; transform: rotate(-7deg); }
.ai-tool-card { padding: 15px; border: 1px solid #725294; border-radius: 12px; background: linear-gradient(135deg,#32253e,#191c24); }
.ai-tool-card p, .ai-tool-card small { font-size: 12px; line-height: 1.5; color: var(--soft); }
.ai-tool-card small { display: block; margin-top: 10px; color: var(--muted); }
.image-workbench { color: var(--text); background: #171a22; border: 1px solid #4c405d; border-radius: 18px; padding: 0; width: min(1120px,96vw); max-height: 94dvh; }
.image-workbench::backdrop { background: #080713c9; backdrop-filter: blur(5px); }
.iw-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.iw-header small { font-size: 10px; letter-spacing: 2px; color: #bf97ee; }
.iw-header h2 { margin: 5px 0 0; font-size: 22px; }
.iw-header button { border-radius: 50%; background: #292330; width: 36px; height: 36px; font-size: 24px; }
.iw-body { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 420px; height: min(65dvh,660px); }
.iw-body aside { padding: 22px; overflow-y: auto; border-right: 1px solid var(--line); }
.iw-body label { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; font-size: 13px; }
.iw-body select { padding: 8px; border-radius: 8px; background: #24202d; min-width: 0; }
.iw-body button { background: #2a2533; padding: 10px; border-radius: 8px; margin-bottom: 10px; width: 100%; }
.iw-body p { line-height: 1.6; font-size: 12px; color: var(--muted); }
.iw-view { display: grid; place-items: center; padding: 26px; overflow: hidden; background: #0e1016; }
.iw-canvases { position: relative; max-height: 100%; max-width: 100%; display: flex; align-items: center; justify-content: center; }
#iwImage { max-width: 100%; max-height: min(58dvh,595px); width: auto; height: auto; background-color:#d8d9e0; background-image:conic-gradient(#fff 25%,transparent 0 50%,#fff 0 75%,transparent 0); background-size:18px 18px; }
#iwOverlay { position: absolute; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.image-workbench footer { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--line); }
.image-workbench footer span { margin-right:auto; font-size:12px; color:var(--muted); }
.image-workbench footer button { min-height:40px; padding:10px 16px; border-radius:8px; background:#282330; }
.image-workbench footer .primary-button { background:#bd92fa; color:#181122; }
@media (max-width:1100px) and (min-width:901px) { .topbar { grid-template-columns: 160px minmax(100px,1fr) auto; } .brand small,.project-title label { display:none; } .project-title { display:block; } #moreActionsBtn { display:inline-flex; } .quick-actions-extra { display:none; } .quick-actions-extra.open { display:flex;position:absolute;top:62px;right:16px;padding:14px;background:var(--panel);border:1px solid var(--line);border-radius:12px; } }
@media (max-width:900px) { .topbar { grid-template-columns: minmax(0,1fr) auto;gap:6px; } .create-design-button { min-height:34px;padding:0 10px;font-size:11px; } .context-toolbar { padding:6px; min-height:46px; } .context-toolbar button { min-height:34px; } .stage-toolbar p { display:none; } .stage-toolbar h1 { font-size:15px; } .image-workbench { width:98vw; } .iw-body { grid-template-columns:1fr;grid-template-rows:auto minmax(170px,1fr);height:72dvh;min-height:0; } .iw-body aside { display:flex;flex-wrap:wrap;gap:9px;padding:12px;max-height:190px;border-right:0; } .iw-body aside label { flex:1 1 130px;margin-bottom:0;min-width:0; } .iw-body aside p { flex:1 1 100%;margin:0; } .iw-body aside button { width:auto;font-size:11px; } .iw-view { padding:12px; } #iwImage { max-height:43dvh; } .iw-header { padding:14px; } .iw-header h2 { font-size:18px; } .image-workbench footer { padding:12px;gap:6px; } .image-workbench footer button { font-size:11px;padding:8px; } .empty-art { width:76px;height:76px;font-size:43px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }
