/* Saved work shares the conversation's quiet surfaces and ghost controls. */
body.creation-open { overflow: hidden; }
.creation-gallery {
  position: fixed; inset: 0; z-index: 5600; overflow: auto; overscroll-behavior: contain;
  background: var(--work-ground); color: var(--work-ink);
  font: 16px/normal var(--ff-heading);
}
.creation-gallery.hidden, .creation-gallery [hidden] { display: none !important; }
.creation-shell { width: min(1320px, 100%); margin: 0 auto; padding: 40px clamp(20px, 4vw, 56px) 60px; }
.creation-header { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 32px; }
.creation-header > div { flex: 1; }
.creation-gallery .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.creation-eyebrow { color: var(--work-accent); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.creation-header h2 { margin: 8px 0 10px; font: 600 clamp(28px, 4vw, 40px)/1.2 var(--ff-heading); letter-spacing: -.035em; }
.creation-header p { color: var(--work-muted); font-size: 14px; line-height: 1.6; margin: 0; }
.creation-close { margin-left: auto; flex: 0 0 44px; height: 44px; padding: 0; border: 1px solid var(--work-line); border-radius: 50%; background: transparent; color: var(--work-ink); cursor: pointer; font-size: 18px; }
.creation-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 0; border-block: 1px solid var(--work-line); }
.creation-tabs { display: flex; padding: 4px; gap: 4px; background: var(--work-soft); border: 1px solid var(--work-line); border-radius: 14px; }
.creation-tabs button { min-height: 40px; padding: 8px 18px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--work-muted); font: 500 13px var(--ff-heading); cursor: pointer; }
.creation-tabs button[aria-selected="true"] { background: var(--work-card); border-color: var(--work-line); color: var(--work-accent); }
.creation-search { flex: 1 1 240px; }
.creation-search input, .creation-tools select {
  width: 100%; min-height: 44px; border: 1px solid var(--work-line); border-radius: 10px; padding: 10px 12px;
  background: var(--work-card); color: var(--work-ink); font: inherit; font-size: 13px;
}
.creation-search input::placeholder { color: var(--work-muted); opacity: 1; }
.creation-tools select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--work-muted) 50%), linear-gradient(135deg, var(--work-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
.creation-search input:focus, .creation-tools select:focus { border-color: var(--work-accent, var(--gold)); box-shadow: 0 0 0 3px rgba(197,165,114,.18); }
.creation-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 9px 12px; border: 1px solid var(--work-line); border-radius: 10px; background: transparent;
  color: var(--work-accent); font: 500 12px/1.4 var(--ff-heading); cursor: pointer; text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}
.creation-btn:hover, .creation-close:hover { background: var(--work-soft); border-color: var(--work-muted); }
.creation-primary { color: var(--work-accent); border-color: var(--work-line); }
.creation-primary:hover { background: var(--work-soft); border-color: var(--work-muted); }
.creation-sort { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px 0 14px; border: 1px solid var(--work-line); border-radius: 10px; color: var(--work-muted); }
.creation-sort svg { width: 14px; height: 14px; flex: 0 0 auto; }
.creation-sort select { width: auto; min-height: 38px; border: none; background: transparent; box-shadow: none; padding: 0 22px 0 0; font: 500 12px/1.4 var(--ff-heading); color: var(--work-ink); appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--work-muted) 50%), linear-gradient(135deg, var(--work-muted) 50%, transparent 50%); background-position: calc(100% - 4px) 55%, calc(100% + 1px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.creation-icon-btn { width: 40px; padding: 0; }
.creation-icon-btn svg { width: 16px; height: 16px; }
.creation-primary svg { width: 14px; height: 14px; }
.creation-gallery :is(button,input,select,a,[tabindex]):focus-visible { outline: 2px solid var(--work-accent); outline-offset: 3px; }
.creation-gallery button:disabled { opacity: .4; cursor: default; }
.creation-count { min-height: 22px; color: var(--work-muted); font-size: 12px; margin: 20px 0 14px; }
.creation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.creation-card { min-width: 0; border: 1px solid var(--work-line); border-radius: 18px; overflow: hidden; background: var(--s1); }
[data-theme="light"] .creation-card { background: var(--work-card); }
.creation-preview {
  appearance: none;
  display: grid; place-items: center; width: 100%; aspect-ratio: 4/3; padding: 12px; border: 0;
  background: var(--work-soft); color: var(--work-muted); cursor: pointer; font: inherit; font-size: 12px; overflow: hidden;
}
.creation-preview:focus-visible { outline-offset: -4px !important; }
.creation-preview img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; min-height: 0; border-radius: 9px; }
.creation-map-preview { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.creation-map-preview svg { width: 100%; height: 100%; min-height: 0; }
.creation-preview-note { padding: 18px; line-height: 1.6; }
.creation-card-body { padding: 18px; border-top: 1px solid var(--work-line); }
.creation-card h3 { margin: 0; font: 500 14px/1.6 var(--ff-heading); color: var(--work-ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.creation-card h3 { min-height: 3.2em; }
.creation-description { color: var(--work-muted); font-size: 12px; line-height: 1.6; margin: 8px 0 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.creation-date { color: var(--work-muted); font-size: 11px; line-height: 1.6; margin: 12px 0; }
.creation-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.creation-chat-link { flex-basis: 100%; justify-content: flex-start; padding-inline: 0; border-color: transparent; color: var(--work-muted); }
.creation-pagination { display: flex; justify-content: center; padding: 28px 0 0; }
.creation-state { grid-column: 1/-1; text-align: center; padding: 52px 16px; max-width: 520px; margin: auto; }
.creation-state athena-owl { --athena-size: 84px; display: block; margin: 0 auto 20px; width: 84px; }
.creation-state h3 { font: 500 22px/1.4 var(--ff-heading); margin: 0 0 12px; }
.creation-state p { font-size: 14px; color: var(--work-muted); line-height: 1.7; margin: 0 0 22px; }
.creation-viewer { position: fixed; inset: 0; z-index: 2; overflow: auto; background: var(--work-ground); padding: 24px clamp(16px, 4vw, 56px); }
.creation-viewer-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 0 0 20px; border-bottom: 1px solid var(--work-line); }
.creation-viewer-header h3 { margin: 0; font: 500 18px var(--ff-heading); }
.creation-viewer-nav { display: flex; gap: 8px; }
.creation-viewer-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; padding-top: 24px; }
.creation-full-image { display: grid; place-items: center; height: calc(100dvh - 145px); min-height: 240px; border-radius: 18px; background: var(--work-soft); overflow: hidden; padding: 16px; }
.creation-full-image img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.creation-full-brief { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 48dvh; overflow: auto; font-size: 14px; line-height: 1.7; margin: 14px 0; }
.creation-muse { --athena-size: 82px; }
body.creation-open aristos-support { visibility: hidden; }
/* People dialogs belong to the Perch, above its navigation and content. */
.perch-overlay .um-detail-drawer { top: 12px; right: 12px; width: 560px; max-width: calc(100vw - 24px); height: calc(100dvh - 24px); border-radius: 20px; border: 1px solid var(--perch-line); background: var(--perch-surface); color: var(--perch-ink); overflow: hidden; }
.perch-overlay .um-drawer-overlay, .perch-overlay .um-modal-overlay { background: #0c091b88; backdrop-filter: blur(6px); }
.perch-overlay .um-modal { max-height: calc(100dvh - 32px); overflow: auto; background: var(--perch-surface); color: var(--perch-ink); border: 1px solid var(--perch-line); border-radius: 20px; }
.perch-overlay .um-toolbar { flex-wrap: wrap; }
.perch-overlay .um-search-wrap { min-width: 180px; }
.perch-overlay :is(.um-empty, .um-dd-email, .um-dd-field-label, .um-dd-tab) { color: var(--perch-muted); }
.perch-overlay .um-dd-email { font-size: 12px; line-height: 1.5; }
.perch-overlay .um-dd-section-title { font-size: 11px; color: var(--perch-accent); }
.perch-overlay .um-dd-field { font-size: 13px; min-height: 30px; line-height: 1.6; }
.perch-overlay .um-dd-tab.active { color: var(--perch-accent); border-bottom-color: var(--perch-accent); }
.perch-overlay :is(.um-dd-action-btn, .um-btn-ghost, .um-btn-primary) { min-height: 40px; padding: 9px 12px; border-radius: 10px; }
.perch-overlay .um-dd-select { min-height: 40px; background: var(--perch-card); color: var(--perch-ink); border-color: var(--perch-line); }
.perch-overlay :is(.um-dd-close, .um-modal-close, .um-icon-btn) { min-width: 36px; min-height: 36px; }
.perch-overlay :is(.um-detail-drawer, .um-modal-overlay) :is(button,input,select,a):focus-visible { outline: 2px solid var(--perch-accent); outline-offset: 2px; }
@media (max-width: 1000px) { .creation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .creation-shell { padding: 24px 16px 40px; }
  .creation-header { gap: 12px; margin-bottom: 24px; }
  .creation-header h2 { font-size: 28px; }
  .creation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .creation-tabs { width: 100%; }
  .creation-tabs button { flex: 1; }
  .creation-search { flex-basis: 100%; }
  .creation-tools > label:not(.creation-search) { flex: 1; }
  .creation-tools { gap: 10px; }
  .creation-btn { min-height: 44px; }
  .creation-viewer { padding: 16px; }
  .creation-viewer-body { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .creation-full-image { height: 44dvh; min-height: 200px; }
  .creation-full-brief { max-height: 24dvh; }
  .creation-muse { display: none; }
  .perch-overlay :is(.um-dd-close, .um-modal-close, .um-icon-btn) { min-width: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .creation-gallery *, .perch-overlay .um-detail-drawer { transition: none !important; } }

/* ── Card icon toolbar: rename + actions ── */
.name-row{display:flex;align-items:center;gap:4px;min-width:0}
.name-row h3{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.name-edit{background:none;border:none;display:inline-grid;place-items:center;width:17px;height:17px;flex:0 0 auto;color:rgba(112,103,124,.42);cursor:pointer;padding:0;border-radius:4px;opacity:.8;transition:color .15s,opacity .15s}
.name-edit svg{width:11px;height:11px}
.name-edit:hover{color:#C5A572;opacity:1;background:transparent}
.card-icon-btn{background:none;border:none;display:grid;place-items:center;width:30px;height:30px;min-width:30px;color:rgba(112,103,124,.5);cursor:pointer;padding:0;border-radius:8px;transition:color .2s,background .2s}
.card-icon-btn svg{width:16px;height:16px}
.card-icon-btn:hover{color:#C5A572;background:rgba(197,165,114,.12)}
.name-edit:focus-visible,.card-icon-btn:focus-visible{outline:2px solid #9889C0;outline-offset:2px}
.creation-card-actions{display:flex;align-items:center;gap:2px}
.name-input{flex:1;min-width:0;font:inherit;font-size:.9rem;border:1px solid #C5A572;border-radius:6px;padding:3px 7px;background:rgba(255,255,255,.65);color:inherit}
.name-input:focus{outline:none;box-shadow:0 0 0 3px rgba(197,165,114,.18)}

.sort-btn[aria-pressed="true"]{color:var(--work-accent);border-color:var(--work-muted);background:var(--work-soft);}

/* Phones: two compact columns across Images, Processes, Documents and Tools */
@media (max-width: 600px) {
  .creation-shell { padding: 18px 12px 32px; }
  .creation-header h2 { font-size: 24px; }
  .creation-card { border-radius: 12px; }
  .creation-card-body { padding: 8px 10px 10px; gap: 4px; }
  .creation-card-body h3 { font-size: 13px; line-height: 1.3; }
  .creation-card-body p, .creation-date { font-size: 11px; }
  .creation-card-actions { gap: 2px; }
  .creation-card-actions button { min-width: 30px; min-height: 30px; }
}
@media (max-width: 340px) { .creation-grid { grid-template-columns: minmax(0,1fr); } }

/* ═══ Image workspace: the Documents layout for a single image ═══ */
.creation-viewer { display: flex; flex-direction: column; padding: 16px clamp(14px, 3vw, 28px) 18px; }
.iv-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex: none; }
.iv-title { flex: 1; min-width: 0; margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.015em; color: var(--work-ink, #191423); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-tools { display: flex; align-items: center; gap: 6px; }
.iv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--work-line); background: transparent; color: var(--work-muted, #4a4550); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: border-color .18s, color .18s, background .18s; }
.iv-btn:hover:not(:disabled) { border-color: var(--work-accent); color: var(--work-ink, #191423); }
.iv-btn:disabled { opacity: .4; cursor: default; }
.iv-btn:focus-visible { outline: 2px solid var(--work-accent); outline-offset: 2px; }
.iv-icon { width: 34px; padding: 0; }
.iv-dark { background: var(--work-panel); color: var(--work-ink, #191423); }
.iv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; transition: margin-right .3s ease; }
.iv-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: var(--work-panel); border: 1px solid var(--work-line); border-radius: 14px; overflow: hidden; padding: 20px; }
.iv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.18); transition: filter .5s ease, transform .5s ease; }
.iv-img.diffusing { filter: saturate(1.1) contrast(.96); }
.iv-missing { color: var(--work-muted, #6A6880); }
.iv-progress { position: absolute; left: 20px; right: 20px; bottom: 14px; height: 3px; border-radius: 3px; background: rgba(197,165,114,.2); overflow: hidden; }
.iv-progress-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #C5A572, #E3C88F); transition: width .4s ease; }
.iv-versions { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; flex: none; }
.iv-versions[hidden] { display: none; }
.iv-chip { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 4px 12px 4px 4px; border-radius: 12px; border: 1px solid var(--work-line); background: var(--work-card, #fff); color: var(--work-muted, #4a4550); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .18s, box-shadow .18s; }
.iv-chip img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.iv-chip:hover { border-color: var(--work-accent); }
.iv-chip[aria-pressed="true"] { border-color: var(--work-accent); box-shadow: 0 0 0 3px rgba(197,165,114,.18); color: var(--work-ink, #191423); }
/* The Athena pane sits beside the image when awake */
@media (min-width: 769px) { .creation-viewer.ap-scope .dv-chat.ap-pane { top: 66px; } }
@media (max-width: 768px) { .creation-viewer.ap-scope .dv-chat.ap-pane { position: fixed; top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; height: min(78vh, 660px); z-index: 30; } .creation-viewer.ap-scope .ap-fab { position: fixed; } }
@media (min-width: 900px) { .creation-viewer.ap-scope.ap-awake .iv-main { margin-right: 418px; } }
@media (max-width: 640px) {
  .iv-bar { flex-wrap: wrap; gap: 8px; }
  .iv-title { order: 3; flex-basis: 100%; font-size: 17px; }
  .iv-back span, .iv-dark span { display: none; }
  .iv-back, .iv-dark { width: 34px; padding: 0; }
  .iv-stage { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .iv-img, .iv-main, .iv-progress-fill { transition: none; } }
