/* Our original Atelier shell, shared by the extended creation and editing tools. */
:root{--bg:var(--paper);--karte:#fff;--text:var(--ink);--grau:var(--muted);--linie:var(--line);--akzent:var(--accent);--akzent-dunkel:var(--accent-dark);--akzent-hell:var(--lavender);--seite:#fffdf9;--schatten:0 3px 16px #352a3010}
body{background:var(--paper);color:var(--ink);font:14px/1.5 Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.topbar{flex-shrink:0}.brand{line-height:1.2}.topbar a:hover{text-decoration:none}.home h1{font-weight:400}
.atelier-home .home{padding-top:clamp(16px,2vw,24px)}
.atelier-home .hero{align-items:start}
.atelier-home .optionen-schalter{font-size:12px;padding:0}.atelier-home .optionen{border:0;margin-top:12px;padding-top:0}.atelier-home .optionen h3{font-size:11px;font-weight:600;letter-spacing:1px;margin-top:24px}.atelier-home .feld label{font-size:12px;font-weight:500;color:var(--muted)}.atelier-home .feld input,.atelier-home .feld select{font-size:13px;background:var(--paper);border-radius:8px}.atelier-home .haken{font-size:12px}.atelier-home .hinweis{font-size:11px;line-height:1.7}.atelier-home .schaetzung{font-size:13px;line-height:1.5;margin:10px 0 0;color:var(--ink)}.schaetzung:empty{display:none}.atelier-home .karte{padding:26px 28px;margin-bottom:28px;border-radius:20px}.atelier-home .karte h2{font:400 26px/1.3 var(--serif);color:var(--ink)}.atelier-home .balken{height:5px;margin:20px 0}.atelier-home .primaer{font-size:13px;font-weight:550;line-height:1.5;background:var(--accent);border-radius:10px;padding:13px 21px}.atelier-home .knopf{font-size:12px;border-radius:9px;padding:9px 13px}.book-entry{position:relative;min-width:0}.book-entry .book-card{width:100%;height:100%;padding-right:31px}.book-entry .book-card>div:last-child{min-width:0}.book-entry h3{overflow-wrap:anywhere}.book-delete{position:absolute;right:8px;top:9px;background:transparent;color:#a196a5;font-size:17px;line-height:1;padding:4px 6px;border-radius:5px}.book-delete:hover{background:#fff2ed;color:#97573f}#shelfError:empty{display:none}
body.atelier-editor{height:100dvh}.atelier-editor .editorbar{flex-shrink:0}.atelier-editor .book-heading{flex:1;min-width:0}.atelier-editor #titel{font:400 19px/1.3 var(--serif);border:1px solid transparent;background:transparent;padding:2px 4px;margin-left:-5px;width:100%;border-radius:5px}.atelier-editor #titel:focus{border-color:var(--line);background:white}.atelier-editor .editor-meta{flex-wrap:wrap}.atelier-editor .editor-actions{flex-shrink:0}.atelier-editor .editor-actions .soft-btn{min-height:35px}.atelier-workspace{display:grid;grid-template-columns:218px minmax(0,1fr) 285px;flex:1;min-height:0}.atelier-workspace .outline,.atelier-workspace .inspector{position:static;max-height:none;height:100%;min-height:0;overflow:auto}.atelier-tools{margin:25px 9px 0;padding-top:18px;border-top:1px solid var(--line)}.atelier-tools .section-label{margin:0 0 9px}.atelier-tools .text-btn{display:block;padding:8px 0;text-align:left;font-size:11px}.atelier-preview{background:#eeeae5;min-width:0;min-height:0;display:flex;flex-direction:column}.atelier-preview .reader-controls{width:100%;max-width:760px;padding:16px 24px 0;margin:0 auto 10px;flex-shrink:0}.atelier-preview .reader-controls select{width:150px;max-width:190px}.atelier-preview .seitenband{display:flex;flex-direction:column;align-items:center;gap:28px;padding:8px 24px 40px;overflow:auto;scroll-snap-type:none;min-height:0;width:100%;flex:1}.atelier-preview .seite-huelle{max-width:none;flex-shrink:0}.atelier-preview .seitenlabel{font-size:10px;color:#938992;margin-bottom:8px}.atelier-preview .buchseite{border-radius:2px;background:#fffdf9;box-shadow:0 3px 16px #352a3010}.atelier-preview .block-text:hover{background:#7653920c}.atelier-preview .block-text.markiert{background:#76539212}.atelier-editor .seitenleiste{display:block;flex:none;width:auto;border-left:1px solid var(--line);background:#fbf9f6;padding:24px 21px}.atelier-editor .seitenleiste h3{font-size:14px;font-weight:500;margin:0 0 12px}.atelier-editor .seitenleiste .hinweis{font-size:11px;line-height:1.7;margin-bottom:15px}.atelier-editor .seitenleiste .feld{margin-top:14px}.atelier-editor .seitenleiste .feld label{font-size:11px;font-weight:400;color:#897c8d}.atelier-editor .seitenleiste input,.atelier-editor .seitenleiste textarea,.atelier-editor .seitenleiste select{background:white;border-radius:8px;font-size:12px;line-height:1.65}.atelier-editor .seitenleiste .haken{font-size:11px;align-items:flex-start}.atelier-editor .seitenleiste .knopf,.atelier-editor .seitenleiste .primaer{font-size:11px;padding:8px 10px;border-radius:8px}.atelier-editor .seitenleiste .vorschau{max-height:220px;object-fit:contain;margin:8px 0 14px}.atelier-editor .seitenleiste .versionen img{height:60px;width:50px;margin:0}.atelier-editor .seitenleiste .schliessen{float:right;border:0;color:var(--muted);padding:2px 6px}.atelier-editor .seitenleiste .inspector-text{min-height:210px;resize:vertical}.atelier-editor .statuszeile{background:var(--paper);color:var(--muted);border-top:1px solid var(--line);padding:7px 20px;font-size:10px;gap:15px;flex-shrink:0}.atelier-editor #status-meldung{flex:1}.atelier-editor .menue-inhalt{max-height:75dvh;overflow:auto;min-width:290px;box-shadow:0 8px 26px #32223620}.atelier-editor .menue-inhalt a{font-size:12px}.atelier-editor .menue-inhalt .hinweis{font-size:11px}.atelier-editor .dialog{max-width:520px;border:1px solid var(--line);border-radius:17px;background:var(--paper);font-size:13px}.atelier-editor .dialog h3{font:400 23px var(--serif)}.atelier-editor .dialog input,.atelier-editor .dialog select{font-size:12px;background:white}.atelier-editor .dialog .knopf,.atelier-editor .dialog .primaer{font-size:12px}.atelier-editor .dialog-hintergrund{background:#30223755;backdrop-filter:blur(3px)}.atelier-editor .block-werkzeug{font-family:Inter,ui-sans-serif,sans-serif}.atelier-editor .block-werkzeug button{color:var(--accent)}.atelier-editor .outline-item.ziel-oben{border-top:3px solid var(--accent)}.atelier-editor .outline-item:disabled{opacity:.7}.atelier-editor.readmode .atelier-workspace{grid-template-columns:1fr}.atelier-editor.readmode .outline,.atelier-editor.readmode .inspector,.atelier-editor.readmode .block-werkzeug,.atelier-editor.readmode .plus{display:none}.atelier-editor.readmode .seitenband{padding-top:20px}.atelier-editor.readmode .bild,.atelier-editor.readmode .block-text{cursor:default;pointer-events:none;background:none!important;outline:0!important}
@media(min-width:1500px){.atelier-workspace{grid-template-columns:250px minmax(0,1fr) 315px}}
@media(max-width:1100px){.atelier-workspace{grid-template-columns:170px minmax(0,1fr) 245px}.atelier-editor .seitenleiste{padding:22px 15px}.atelier-preview .seitenband{padding-left:16px;padding-right:16px}}
@media(max-width:850px){.atelier-workspace{grid-template-columns:150px minmax(0,1fr) 225px}.atelier-workspace .outline{display:block;padding-left:8px;padding-right:8px}.atelier-preview .reader-controls{padding-left:15px;padding-right:15px}.atelier-editor .editor-meta{font-size:9px}.atelier-editor #titel{font-size:17px}}
@media(max-width:640px){.atelier-editor .editorbar{gap:10px;flex-wrap:wrap}.atelier-editor .book-heading{flex-basis:100%}.atelier-editor .editor-actions{margin-left:auto}.atelier-editor #titel{font-size:17px}.atelier-editor .mobile-tabs{display:flex;flex-shrink:0}.atelier-workspace{display:block;overflow:hidden}.atelier-workspace .outline,.atelier-workspace .inspector{display:none;min-height:0}.atelier-workspace .atelier-preview{height:100%}.atelier-workspace[data-tab="outline"] .outline{display:block}.atelier-workspace[data-tab="outline"] .atelier-preview,.atelier-workspace[data-tab="edit"] .atelier-preview{display:none}.atelier-workspace[data-tab="edit"] .inspector{display:block}.atelier-editor .seitenleiste{padding:22px;border:0}.atelier-preview .seitenband{padding:8px 12px 30px}.atelier-editor .statuszeile{padding:6px 12px}.atelier-editor #status-fonts{display:none}.atelier-editor.readmode .atelier-preview{display:flex!important}.atelier-editor.readmode .outline,.atelier-editor.readmode .inspector{display:none!important}.atelier-home .karte{padding:21px 19px}.atelier-editor .menue-inhalt{right:0;min-width:280px;max-width:calc(100vw - 36px)}}
.atelier-editor.readmode .mobile-tabs{display:none}

/* Narration keeps the same calm, cream-and-purple editor shell. */
.atelier-editor .audiobook-open{color:var(--accent-dark);background:var(--lavender);border-color:#e1d5e8}
#audiobook-dialog{width:min(650px,calc(100vw - 32px));max-width:650px;max-height:calc(100dvh - 32px);overflow:auto;background:var(--paper);padding:26px;border:1px solid var(--line);border-radius:17px;color:var(--ink);font:13px/1.65 Inter,ui-sans-serif,sans-serif}
#audiobook-dialog::backdrop{background:#30223755;backdrop-filter:blur(3px)}
#audiobook-dialog [hidden]{display:none!important}
.audiobook-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
#audiobook-dialog h2{font:400 27px/1.25 var(--serif);margin:0}
.audiobook-heading .soft-btn{padding:6px 10px;flex-shrink:0}
.audiobook-intro{color:var(--muted);margin:10px 0 22px}
.audiobook-field{display:block;font-weight:500;margin-bottom:18px}
.audiobook-field select{display:block;width:100%;margin-top:7px;background:#fff;font-size:13px;padding:10px}
.audiobook-text-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px;font-weight:500}
.audiobook-text-heading .text-btn{font-size:11px;padding:4px 0;color:var(--accent)}
#audiobook-text{display:block;width:100%;min-height:180px;max-height:45dvh;resize:vertical;padding:12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:13px;line-height:1.7}
.audiobook-text-info{display:flex;flex-wrap:wrap;gap:3px 18px;margin-top:7px;font-size:10px;color:var(--muted)}
#audiobook-status{margin:17px 0 12px;font-size:12px;color:var(--accent-dark)}
#audiobook-status:empty{display:none}
.audiobook-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}
.audiobook-cost-note{font-size:10px;color:var(--muted);margin:10px 0 0;line-height:1.7}
.audiobook-ready{border:1px solid #e1d5e8;border-radius:12px;padding:16px;background:var(--lavender);margin-bottom:22px}
.audiobook-ready strong{font-weight:550;color:var(--accent-dark)}
.audiobook-ready p{font-size:11px;color:var(--muted);margin:3px 0 10px}
.audiobook-ready audio{display:block;width:100%;margin:12px 0}
.audiobook-ready #audiobook-stale{margin:12px 0 0;color:var(--accent-dark)}
@media(max-width:900px){.atelier-editor .editorbar{flex-wrap:wrap}.atelier-editor .editor-actions{margin-left:auto;flex-wrap:wrap;max-width:100%}}
@media(max-width:640px){.atelier-editor .editor-actions{gap:6px}.atelier-editor .editor-actions .soft-btn{padding:8px 9px;font-size:11px}.atelier-editor .audiobook-open{white-space:nowrap}#audiobook-dialog{padding:19px}#audiobook-dialog h2{font-size:24px}.audiobook-text-heading{align-items:baseline}}

/* Keep the dictation control beside the create button when the image toggle wraps. */
.atelier-home #prompt{display:block}
.atelier-home .composer-bottom{flex-wrap:wrap}
.atelier-home .composer-actions{display:inline-flex;align-items:center;gap:7px;max-width:100%;margin-inline-start:auto}
.atelier-home .composer-actions .primary{white-space:nowrap}
.atelier-home .start-hilfe{display:inline-block;min-height:32px;padding:4px 0;color:var(--accent-dark);font-size:13px;text-decoration:underline;text-underline-offset:3px}
.atelier-home .start-hilfe[hidden]{display:none}
@media(max-width:400px){.atelier-home .composer-actions .primary svg{display:none}}
.atelier-home .idea-mic{flex:none;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:50%;background:var(--lavender);color:var(--accent);touch-action:manipulation;transition:background .15s,color .15s}
.atelier-home .idea-mic:hover:not(:disabled){background:#e7dbee;color:var(--accent-dark)}
.atelier-home .idea-mic svg{width:21px;height:21px;pointer-events:none}
.atelier-home .idea-mic .stop-icon{display:none}
.atelier-home .idea-mic[aria-pressed="true"],.atelier-home .idea-mic.is-recording{background:#a43f60;color:white;border-color:#a43f60}
.atelier-home .idea-mic[aria-pressed="true"]:hover,.atelier-home .idea-mic.is-recording:hover{background:#8c3050;color:white}
.atelier-home .idea-mic[aria-pressed="true"] .mic-icon,.atelier-home .idea-mic.is-recording .mic-icon{display:none}
.atelier-home .idea-mic[aria-pressed="true"] .stop-icon,.atelier-home .idea-mic.is-recording .stop-icon{display:block}
.atelier-home .idea-mic-status{min-height:18px;margin:7px 0 0;font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.atelier-home .idea-mic-status:empty,.atelier-home .idea-mic[hidden],.atelier-home .idea-mic-status[hidden]{display:none}
.atelier-home .idea-mic:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.atelier-home .idea-mic-recovery{margin-top:8px;display:flex;gap:16px;flex-wrap:wrap}
.atelier-home .idea-mic-recovery[hidden],.atelier-home .idea-mic-recovery [hidden]{display:none}
.atelier-home .idea-mic-recovery .text-btn{font-size:12px;color:var(--accent)}
.atelier-home .idea-mic-recovery textarea{flex-basis:100%;min-height:110px;padding:10px;background:var(--paper);font-size:13px}

.face-review-bar:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  flex-shrink: 0;
  padding: 7px 12px;
  color: var(--ink);
  background: var(--lavender);
}
.face-review-bar select { width: auto; max-width: 100%; }
.face-review-references { display: flex; flex-wrap: wrap; gap: 8px; }
.face-review-references figure { margin: 0; }
.face-review-references img { width: 70px; height: 70px; object-fit: contain; background: white; }
.face-review-references figcaption { font-size: 12px; }
