/* Helles Beitragsstudio. Ausschließlich Bedienoberfläche, keine Canvas-/CI-Farben.
   Die Variablen bleiben am App-Element; andere Module behalten ihre Gestaltung. */
#app.studio-editor {
  --dark: #faf9f5; --panel: #fff; --panel2: #f5f6f8;
  --off: #192337; --muted: #596476; --line: #d9dee5;
  --gold: #a77722; --gold2: #805918;
  color: var(--off); background: var(--dark); color-scheme: light;
  font-family: Montserrat, sans-serif;
}
#app.studio-editor :is(button, input, select, textarea, summary) { font-family: inherit; }
#app.studio-editor :is(button, a, summary, input, select, textarea):focus-visible {
  outline: 2px solid #926514; outline-offset: 3px;
}
#app.studio-editor :is(.ghost-btn, .ki-btn, .dl) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; border-radius: 8px; font-size: 12px; line-height: 1.4;
  font-weight: 600; padding: 8px 11px; text-decoration: none;
  color: var(--off); border: 1px solid var(--line); background: #fff;
}
#app.studio-editor :is(.ghost-btn, .ki-btn, .dl):hover:not(:disabled) { background: #f7f4eb; border-color: #b39a65; }
#app.studio-editor button:disabled { cursor: not-allowed; opacity: .45; }
#app.studio-editor .studio-icon {
  width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
#app.studio-editor .topbar { background: #fff; padding: 12px 20px; gap: 13px; }
#app.studio-editor .topbar-logo { width: 125px; max-height: 40px; height: auto; object-fit: contain; }
#app.studio-editor .topbar-logo.editor-logo-mark { width: 40px; height: 40px; }
#app.studio-editor .topbar-logo.editor-logo-dark { background: #20232c; border-radius: 7px; padding: 5px; }
#app.studio-editor .topbar-title { display: grid; gap: 3px; letter-spacing: -.02em; flex: 0 0 auto; }
#app.studio-editor .topbar-title strong { font-size: 16px; font-weight: 700; }
#app.studio-editor #topbarBrandName { font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
#app.studio-editor .topbar-hint { display: none; }
#app.studio-editor .topbar-aktionen { gap: 7px; align-items: center; }
#app.studio-editor .editor-history { display: inline-flex; gap: 3px; }
#app.studio-editor .editor-history button { width: 36px; padding: 8px; }
#app.studio-editor :is(.app-main-menu, .app-online-tour) {
  color: var(--off) !important; background: #fff !important; border-color: var(--line) !important;
}
#app.studio-editor :is(.app-main-menu, .app-online-tour):hover { background: #f7f4eb !important; border-color: #b39a65 !important; filter: none; }
#app.studio-editor .editor-more { position: relative; }
#app.studio-editor .editor-more summary { list-style: none; cursor: pointer; }
#app.studio-editor .editor-more summary::-webkit-details-marker { display: none; }
#app.studio-editor .editor-more[open] summary { background: #f7f4eb; border-color: #b39a65; }
#app.studio-editor .editor-more-actions {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 238px;
  display: grid; gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px #19233724;
}
#app.studio-editor .editor-more-actions button { justify-content: flex-start; border-color: transparent; text-align: left; }
#app.studio-editor .library { background: #fff; }
#app.studio-editor .editor-library-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 16px 3px; }
#app.studio-editor :is(.editor-library-heading, .editor-controls-heading) h2 { font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
#app.studio-editor .editor-library-heading .ghost-btn { font-size: 11px; padding: 6px 8px; }
#app.studio-editor .lib-suche { padding: 12px 16px 0; }
#app.studio-editor .lib-filter { grid-template-columns: minmax(0, 1fr) 38px; padding: 9px 16px; gap: 9px; }
#app.studio-editor #projectSel { grid-column: 1 / -1; }
#app.studio-editor #sortSeg { justify-self: start; }
#app.studio-editor .lib-werkzeuge { background: #fff; gap: 8px; flex-wrap: wrap; padding: 9px 16px; }
#app.studio-editor .lib-werkzeuge .ghost-btn { font-size: 10px; min-height: 30px; padding: 5px 7px; }
#app.studio-editor .grid-groesse { gap: 5px; }
#app.studio-editor .grid-groesse input { width: 70px; }
#app.studio-editor .grid { padding: 14px 16px; gap: 10px; }
#app.studio-editor .grid .tile { border-radius: 10px; }
#app.studio-editor .grid .tile.sel { border-color: var(--gold); box-shadow: 0 0 0 2px #a7772224; }
#app.studio-editor .tile-info { color: #fff; background: #192337dc; border-color: #fff; }
#app.studio-editor .panel-resizer::before { width: 6px; left: 6px; height: 46px; box-shadow: none; background: #c5cbd3; border-color: #c5cbd3; }
#app.studio-editor .slot-zeile { background: #f8f8f7; }
#app.studio-editor .slot-tabs { padding: 10px 15px 0; gap: 4px; }
#app.studio-editor .slot-tabs button { padding: 10px 18px; letter-spacing: 0; }
#app.studio-editor .slot-tabs button.on { color: var(--off); background: #fff; }
#app.studio-editor .editor-toolbar { background: #fff; gap: 6px; padding: 8px 12px; }
#app.studio-editor .editor-tool { width: 32px; height: 32px; background: #fff; }
#app.studio-editor .editor-tool-strong { color: #805918; background: #fbf7ec; }
#app.studio-editor .editor-tool-group { gap: 4px; }
#app.studio-editor .editor-tool:has(.editor-tool-label) { width: auto; display: inline-flex; gap: 5px; padding: 0 8px; }
#app.studio-editor .editor-tool-label { font-size: 11px; font-weight: 600; }
#app.studio-editor .buehne, #app.studio-editor .canvas-wrap { background: #dedfe1; }
#app.studio-editor .canvas-wrap { padding: 24px 28px 38px; }
#app.studio-editor #cv { border-radius: 2px; box-shadow: 0 7px 26px #19233724; }
#app.studio-editor .canvas-hint { font-size: 11px; color: #4e5868; bottom: 12px; padding: 0 12px; }
#app.studio-editor .canvas-wrap.drop-ready::after { background: #fff9e8e6; color: #805918; text-shadow: none; }
#app.studio-editor .controls { padding: 16px; gap: 7px; background: #fff; }
#app.studio-editor .editor-controls-heading { flex: 0 0 auto; padding: 0 1px 10px; }
#app.studio-editor .editor-controls-heading p { font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 5px; }
#app.studio-editor .controls > .sec { padding: 10px 11px; border-radius: 10px; gap: 10px; background: #fff; }
#app.studio-editor .sec-head { font-size: 13px; text-transform: none; letter-spacing: 0; gap: 9px; min-height: 24px; }
#app.studio-editor .sec-head::after { content: ''; width: 7px; height: 7px; margin-right: 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
#app.studio-editor .sec.zu .sec-head::after { transform: rotate(-45deg); }
#app.studio-editor .sec-num { width: 23px; height: 23px; background: #f4e9c9; color: #705016; }
#app.studio-editor .controls > .sec-final { background: #fffcf5; border-color: #c3a567; }
#app.studio-editor .sec-final .sec-num { background: #e9d497; color: #513b13; }
#app.studio-editor .controls > .sec > .sec-body { padding: 1px 3px 2px 1px; scrollbar-color: #bcc3cd transparent; scrollbar-width: thin; }
#app.studio-editor .seg button { padding: 8px 10px; min-height: 34px; }
#app.studio-editor .seg button.on { color: #705016; background: #fcf4df; }
/* Vorlagen sind Bildkarten. Die kompakten Segmentknöpfe dürfen sie weder
   auf 34 px drücken noch ihre Canvas-Miniaturen mit Innenabstand abschneiden. */
#app.studio-editor #tplSeg {
  grid-template-columns: repeat(auto-fill, minmax(min(128px, 100%), 1fr));
  grid-auto-rows: max-content; align-content: start; gap: 9px;
  max-height: 400px; scrollbar-gutter: stable;
}
#app.studio-editor #tplSeg .template-card {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: 140px auto;
  min-height: 0; padding: 0; align-content: start;
}
#app.studio-editor #tplSeg .template-preview {
  min-height: 0; padding: 6px; background: #edf0f3;
}
#app.studio-editor #tplSeg .template-preview-canvas { min-width: 0; min-height: 0; object-fit: contain; }
#app.studio-editor #tplSeg .template-card-info { padding: 8px; gap: 3px; }
#app.studio-editor #tplSeg .template-card-info :is(strong, small) {
  white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; line-height: 1.4;
}
#app.studio-editor .sec small { color: var(--muted); font-size: 11px; line-height: 1.5; }
#app.studio-editor .sub-label { font-size: 11px; text-transform: none; letter-spacing: .01em; }
#app.studio-editor .publication-plan-post { border: 0; padding: 0; gap: 12px; }
#app.studio-editor .publication-plan-post legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#app.studio-editor .publication-plan-post label { font-size: 12px; line-height: 1.4; font-weight: 600; }
#app.studio-editor .publication-date-channel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 9px; }
#app.studio-editor .publication-date-channel label { min-width: 0; }
#app.studio-editor .publication-caption-label { display: grid; gap: 8px; }
#app.studio-editor .publication-caption-choice { gap: 5px; font-size: 11px; }
#app.studio-editor .publication-caption-choice .ki-btn { padding: 6px 8px; font-size: 11px; white-space: nowrap; }
#app.studio-editor .publication-plan-post :is(input, select, textarea) { background: #fff; color: var(--off); font-size: 12px; font-weight: 400; color-scheme: light; }
#app.studio-editor .publication-plan-post :is(input, select) { min-height: 38px; padding: 8px 9px; }
#app.studio-editor .publication-plan-post .caption-out { min-height: 150px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.6; resize: vertical; }
#app.studio-editor :is(input, textarea)::placeholder { color: #677185; opacity: 1; }
#app.studio-editor .ki-btn { color: #805918; background: #fffaf0; border-color: #c8b686; }
#app.studio-editor .publication-transfer { color: #fff; background: #926719; border-color: #926719; min-height: 49px; font-size: 12px; padding: 11px 13px; }
#app.studio-editor .publication-transfer:hover:not(:disabled) { color: #fff; background: #795514; border-color: #795514; }
#app.studio-editor .final-export-actions { padding-top: 10px; border-top: 1px solid #e4dbc7; gap: 6px; }
#app.studio-editor .final-export-actions .dl { margin-top: 0; }
#app.studio-editor .final-export-actions button { width: 100%; font-size: 11px; }
#app.studio-editor .sticker-btn { background-color: #f0f1f3; }
@media (max-width: 1350px) {
  #app.studio-editor .topbar { padding: 10px 14px; }
  #app.studio-editor .topbar-logo:not(.editor-logo-mark) { width: 90px; }
  #app.studio-editor .topbar-title strong { font-size: 14px; }
  #app.studio-editor .controls { padding: 12px; }
  #app.studio-editor .editor-tool-divider { margin: 0; }
}
@media (max-width: 1100px) {
  #app.studio-editor .topbar { flex-wrap: wrap; position: relative; }
  #app.studio-editor .topbar-aktionen { flex-wrap: wrap; }
  #app.studio-editor .library { max-height: 480px; }
  #app.studio-editor .editor-library-heading { padding-top: 12px; }
  #app.studio-editor .editor { grid-template-columns: 1fr; }
  #app.studio-editor .canvas-wrap { min-height: 360px; }
  #app.studio-editor .controls { padding: 20px; }
  #app.studio-editor .controls > .sec > .sec-body { max-height: 68vh; }
  #app.studio-editor .grid { min-height: 140px; }
}
@media (max-width: 600px) {
  #app.studio-editor .topbar { gap: 10px; padding: 12px; }
  #app.studio-editor .topbar-aktionen { margin-left: 0; justify-content: flex-start; width: 100%; gap: 6px; }
  #app.studio-editor .topbar-aktionen > .ghost-btn, #app.studio-editor summary { min-height: 40px; }
  #app.studio-editor .editor-history button { width: 40px; min-height: 40px; }
  #app.studio-editor .editor-more { position: static; }
  #app.studio-editor .editor-more-actions { right: 12px; left: 12px; width: auto; }
  #app.studio-editor .library { max-height: 460px; }
  #app.studio-editor .lib-werkzeuge { flex-direction: row; align-items: center; }
  #app.studio-editor .grid-groesse input { flex: initial; width: 66px; }
  #app.studio-editor .canvas-wrap { padding: 20px 18px 42px; }
  #app.studio-editor .canvas-hint { font-size: 10px; }
  #app.studio-editor .slot-tabs { padding: 8px 8px 0; }
  #app.studio-editor .slot-tabs button { padding: 9px 10px; }
  #app.studio-editor .controls { padding: 16px 12px; }
  #app.studio-editor .sec-head { min-height: 28px; }
}

/* Gleiche Strichsymbole auch bei dynamischem Buttontext (Speicherstatus/KI). */
#app.studio-editor #entwurfSpeichernBtn::before { content: ""; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%203h13l3%203v15H4V3Z%22%2F%3E%3Cpath%20d%3D%22M8%203v6h8V3M8%2021v-8h8v8%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
#app.studio-editor #captionBtn::before { content: ""; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10%203%202.5%206.5L19%2012l-6.5%202.5L10%2021l-2.5-6.5L1%2012l6.5-2.5L10%203ZM20%202v5M17.5%204.5h5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
#app.studio-editor #postCalendarTransfer::before { content: ""; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M7%202v6M17%202v6M3%2011h18m-11%205%203%203%204-5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
#app.studio-editor #download::before, #app.studio-editor #downloadBeide::before { content: ""; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v12m-5-5%205%205%205-5M4%2016v5h16v-5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }

#app.studio-editor .editor-toolbar > .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#app.studio-editor .diktat-button { font-size: 0; color: #596476; }
#app.studio-editor .diktat-button[data-diktat-status="recording"] { color: #ad3224; }
#app.studio-editor .diktat-status[data-diktat-status="error"] { color: #a22d20; }
#app.studio-editor .diktat-status[data-diktat-status="success"] { color: #286540; }
#app.studio-editor .diktat-button::before { content: ""; width: 18px; height: 18px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%229%22%20y%3D%222%22%20width%3D%226%22%20height%3D%2213%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M5%2010v2a7%207%200%200%200%2014%200v-2M12%2019v3M8%2022h8%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
#app.studio-editor .diktat-button[data-diktat-status="recording"]::before { mask: none; width: 10px; height: 10px; border-radius: 2px; }

/* iOS fokussiert Textfelder ohne ungewolltes Hineinzoomen. */
@media (max-width: 600px) {
  #app.studio-editor :is(input[type="text"], input[type="search"], input[type="date"], select, textarea),
  #app.studio-editor .publication-plan-post :is(input, select, textarea) { font-size: 16px; min-width: 0; }
}
