/* JP Studio – Feinschliff: weiche Übergänge und Rückmeldungen (Editor und Startseite). Bei „Bewegung reduzieren“ aus. */
@keyframes psFadeIn{from{opacity:0}to{opacity:1}}
@keyframes psPopIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes psDrop{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}
@keyframes psRise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes psToast{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes psPage{from{opacity:.35;transform:scale(.985)}to{opacity:1;transform:none}}
@keyframes psShimmer{from{background-position:-200% 0}to{background-position:200% 0}}
@keyframes psPulse{0%,100%{opacity:1}50%{opacity:.55}}

/* Dialoge, Menüs, Popover */
.ed-modal:not([hidden]){animation:psFadeIn .16s ease-out}
.ed-modal:not([hidden]) .ed-dialog{animation:psPopIn .24s cubic-bezier(.2,.8,.2,1)}
.ed-pop:not([hidden]),#cmenu:not([hidden]){animation:psDrop .14s cubic-bezier(.2,.8,.2,1);transform-origin:top left}
.ps-fw{animation:psRise .2s cubic-bezier(.2,.8,.2,1)}
.ed-toast:not([hidden]){animation:psToast .22s cubic-bezier(.2,.8,.2,1)}

/* Wechsel des Bereichs links: Inhalt gleitet leicht herein */
#panelBody.ps-swap>*{animation:psRise .22s cubic-bezier(.2,.8,.2,1) both}
#panelBody.ps-swap>*:nth-child(2){animation-delay:.02s}#panelBody.ps-swap>*:nth-child(3){animation-delay:.04s}
#panelBody.ps-swap>*:nth-child(4){animation-delay:.06s}#panelBody.ps-swap>*:nth-child(5){animation-delay:.08s}
#panelBody.ps-swap>*:nth-child(n+6){animation-delay:.1s}
/* Seitenwechsel */
#pageWrap.ps-pagein{animation:psPage .2s ease-out}

/* Knöpfe: kurze Rückmeldung beim Drücken */
.ed-tb,.ed-tile,.ed-folder,.ed-bigbtn,.ed-railbtn,.ed-primary,.ed-ghost,.ps-bsec,.ed-pthumb,.hm-btn,.hm-format,.hm-chip{transition:background-color .15s,border-color .15s,color .15s,box-shadow .18s,transform .12s}
.ed-tb:active,.ed-tile:active,.ed-folder:active,.ed-bigbtn:active,.ed-railbtn:active,.ed-primary:active,.ed-ghost:active,.hm-btn:active,.hm-format:active,.hm-chip:active{transform:scale(.96)}
.ed-tile:hover{transform:translateY(-1px)}
.ed-pthumb:hover .pimg{box-shadow:0 4px 12px #11192d24}
.ed-pthumb .pimg{transition:box-shadow .18s,width .25s cubic-bezier(.2,.8,.2,1)}

/* Startseite: Karten heben sich, neue Karten blenden ein, Vorschau lädt mit Schimmer */
.hm-card{transition:box-shadow .2s,border-color .2s,transform .2s cubic-bezier(.2,.8,.2,1)}
.hm-card:hover{transform:translateY(-3px)}
/* Einflug nur beim ersten Aufbau einer Ansicht (html.ps-enter, studio-ruhig.js) – Neuzeichnungen derselben Ansicht bleiben ruhig */
html.ps-enter .hm-cards>.hm-card,html.ps-enter .hm-cards>.hm-mitem,html.ps-enter .hm-list>.hm-row{animation:psRise .3s cubic-bezier(.2,.8,.2,1) both}
.hm-cards>:nth-child(2){animation-delay:.03s}.hm-cards>:nth-child(3){animation-delay:.06s}.hm-cards>:nth-child(4){animation-delay:.09s}
.hm-cards>:nth-child(5){animation-delay:.12s}.hm-cards>:nth-child(6){animation-delay:.15s}.hm-cards>:nth-child(7){animation-delay:.18s}.hm-cards>:nth-child(n+8){animation-delay:.21s}
.hm-thumb .ph,.ps-skel{background:linear-gradient(90deg,#eef1f6 25%,#f8f9fc 50%,#eef1f6 75%);background-size:200% 100%;animation:psShimmer 1.4s linear infinite}
html.ps-enter .hm-thumb img{animation:psFadeIn .3s ease-out}

/* Verbindung: kleiner Hinweis unten */
.ps-net{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:95;display:flex;align-items:center;gap:8px;padding:9px 14px;border-radius:999px;font:600 .82rem 'Instrument Sans',system-ui,sans-serif;box-shadow:0 10px 30px #11192d33;animation:psToast .22s cubic-bezier(.2,.8,.2,1)}
.ps-net.off{background:#3a1d1d;color:#ffe3e3}
.ps-net.off::before{content:'';width:8px;height:8px;border-radius:50%;background:#ff6b6b;animation:psPulse 1.4s ease-in-out infinite}
.ps-net.on{background:#173a2a;color:#dcfbe9}
.ps-net.on::before{content:'';width:8px;height:8px;border-radius:50%;background:#3ddc84}
.ps-net.err{background:#16264d;color:#fff}
.ps-net button{color:inherit;text-decoration:underline;font:inherit;padding:0 0 0 4px}

/* Kunden: Sperren und Entsperren kann nur JP-Design – die Knöpfe dafür entfallen (studio-polish.js) */
html.ps-nolock #float [data-f="lock"],html.ps-nolock #float [data-f="unlock"],html.ps-nolock #cmenu [data-cm="lock"],html.ps-nolock #cmenu hr:has(+[data-cm="lock"]+hr),html.ps-nolock #ctx [data-act="unlock"],html.ps-nolock [data-llock]{display:none}

@media (prefers-reduced-motion:reduce){
  .ed-modal,.ed-dialog,.ed-pop,#cmenu,.ps-fw,.ed-toast,#panelBody.ps-swap>*,#pageWrap,.hm-cards>*,.hm-list>*,.hm-thumb img,.ps-net{animation:none!important}
  .hm-card:hover,.ed-tile:hover{transform:none}
  .hm-thumb .ph,.ps-skel{animation:none}
}

/* Neue Seite gleitet in die Seitenleiste */
@keyframes psThumbIn{from{opacity:0;transform:translateY(10px) scale(.9)}to{opacity:1;transform:none}}
.ed-pthumb.ps-new{animation:psThumbIn .28s cubic-bezier(.2,.8,.2,1)}
/* Speichern: Wolke „atmet“ während des Hochladens */
@keyframes psBreathe{0%,100%{opacity:1;transform:translateY(0)}50%{opacity:.55;transform:translateY(-1px)}}
.ed-save[data-st="uploading"] svg.i,.ed-save[data-st="saving"] svg.i{animation:psBreathe 1.1s ease-in-out infinite}
.ed-save[data-st="online"] svg.i{animation:psPopIn .3s cubic-bezier(.2,.8,.2,1)}
/* Ablegen: Fläche zeigt, dass hier abgelegt werden kann */
.ed-work.ps-dropzone #pageWrap{outline:3px dashed #b07f3c;outline-offset:6px;transition:outline-offset .15s}
@media (prefers-reduced-motion:reduce){.ed-pthumb.ps-new,.ed-save svg.i{animation:none!important}}
/* Aufzählung: Auswahl der Zeichen */
.ps-listopts{display:grid;grid-template-columns:1fr 1fr;gap:2px;width:270px}
.ps-listopts .opt{display:flex;align-items:center;gap:8px;white-space:nowrap;width:auto}
.ps-listsign{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:6px;background:var(--bg,#f3f5f9);font-weight:600;flex:none}

/* Flackern der Seite beim Drüberfahren über die Glas-Leisten (Chrome, Mac) vermeiden:
   1. Die Zeichenfläche bekommt eine eigene Ebene – sie wird beim Neuberechnen des Glas-Effekts nicht mitgezeichnet.
   2. In den Glas-Leisten beim Drüberfahren keine Bewegung/Schatten-Animation, nur Farbwechsel (ein einziges Neuzeichnen). */
.ed-scroll .canvas-container{will-change:transform}
.ed-panel .ed-tile:hover,.ed-rail .ed-tile:hover{transform:none}
.ed-panel :is(.ed-tile,.ed-folder,.ed-bigbtn,.ps-bsec,.ed-textpreset,.ps-cat),.ed-rail .ed-railbtn{transition:background-color .15s,border-color .15s,color .15s}
.ed-panel .ps-cat:hover .ps-cat-card,.ed-panel .ps-cat:focus-visible .ps-cat-card{box-shadow:none}

/* Versionsanzeige (studio-polish.js): „Version 312 · Stand 12.10.2026“ – gut lesbar, aber zurückhaltend */
.ps-ver{font-size:.76rem;font-weight:500;color:#5b6479;white-space:nowrap;margin-left:10px;letter-spacing:.01em;font-variant-numeric:tabular-nums;user-select:text;cursor:default}
.ed-foot .ps-ver{order:99}
.ps-ver-test::after,.ps-ver-main+.ps-ver-extra::before{content:' · '}
.ed-foot .ps-ver.ps-ver-short :is(.ps-ver-test,.ps-ver-extra){display:none}
.ed-foot .ps-ver.ps-ver-off{display:none}
.hm-sidebottom .ps-ver{display:block;margin:8px 0 0;font-size:.74rem;text-align:center}
.hm-sidebottom .ps-ver-test,.ed-dialog .ps-ver-sheet .ps-ver-test{display:block}
.hm-sidebottom .ps-ver-test::after,.ed-dialog .ps-ver-sheet .ps-ver-test::after{content:none}
.ed-dialog .ps-ver-sheet{display:block;margin:14px 0 0;text-align:center;white-space:normal}
@media (max-width:900px){.ed-foot .ps-ver{display:none}}

/* Seitenpanel: fester Platz für den Scrollbalken – Ein-/Ausblenden verschiebt nichts */
.ed-panel-inner{scrollbar-gutter:stable}

/* Herunterladen am Handy (studio-handy-export.js): mehrere PNG/JPG als einzelne Bilder statt ZIP */
.jp-hx{position:fixed;inset:0;z-index:10050;background:rgba(17,26,46,.45);display:flex;align-items:flex-end;justify-content:center;padding:16px}
.jp-hx-card{background:#fff;border-radius:16px;padding:18px 16px 14px;width:100%;max-width:420px;max-height:85vh;overflow:auto;box-shadow:0 12px 40px rgba(17,26,46,.25);font-family:'Instrument Sans',system-ui,sans-serif;color:#111a2e}
.jp-hx-card b{display:block;font-size:1.05rem;margin-bottom:6px}
.jp-hx-card p{margin:0 0 12px;color:#5f6b80;font-size:.92rem;line-height:1.4}
.jp-hx-main{display:block;width:100%;background:#b07f3c;color:#fff;font-weight:600;border:0;border-radius:10px;padding:13px;font-size:1rem;margin-bottom:12px}
.jp-hx-list{display:grid;gap:8px;margin-bottom:12px}
.jp-hx-one{display:block;text-align:center;border:1px solid #e3e7ef;border-radius:10px;padding:11px;color:#1b2d5b;text-decoration:none;font-weight:500}
.jp-hx-close{display:block;width:100%;background:none;border:0;color:#5f6b80;padding:8px;font-size:.95rem}

.jp-hx-alt{display:block;width:100%;background:#fff;border:1px solid #e3e7ef;border-radius:10px;padding:11px;color:#1b2d5b;font-weight:500;font-size:.95rem;margin-bottom:10px}
.jp-hx-warn{margin:0 0 10px;padding:9px 11px;border-radius:10px;background:#fff6e5;border:1px solid #f3d9a4;color:#6b4a00;font-size:.88rem;line-height:1.4}
.jp-hx-more{margin:4px 0 8px}
.jp-hx-more summary{cursor:pointer;color:#5f6b80;font-size:.9rem;padding:6px 0}
.jp-hx-more .jp-hx-list{margin-top:8px}

/* Download-Blatt in der App wie bei Canva (einzeln-speichern.js): „Wird heruntergeladen …“ → „Download abgeschlossen“ */
.jp-dl{position:fixed;inset:0;z-index:10060;background:rgba(17,26,46,.38);display:flex;align-items:flex-end;justify-content:center;animation:jpDlFade .2s ease}
.jp-dl[hidden]{display:none}
body:has(.jp-dl:not([hidden])) .jpa{visibility:hidden}   /* Hilfe-Knopf nicht über dem Blatt */
.jp-dl-card{background:var(--jp-dl-bg,#fff);color:var(--jp-dl-ink,#111a2e);width:100%;max-width:520px;max-height:92vh;overflow:auto;border-radius:22px 22px 0 0;padding:10px 0 calc(16px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(17,26,46,.22);font-family:'Instrument Sans',system-ui,sans-serif;animation:jpDlUp .28s cubic-bezier(.2,.8,.2,1)}
.jp-dl-grip{display:block;width:38px;height:4px;border-radius:4px;background:var(--jp-dl-line,#d5d9e2);margin:0 auto 8px}
.jp-dl-top{display:flex;align-items:center;gap:12px;padding:6px 18px 14px;border-bottom:1px solid var(--jp-dl-line,#e6e9ef)}
.jp-dl-top b{flex:1;font-size:1.12rem;font-weight:600}
.jp-dl-ic{width:24px;height:24px;flex:none}
.jp-dl-ic svg,.jp-dl-x svg{width:100%;height:100%;display:block}
.jp-dl.ok .jp-dl-ic{color:#1f9d55}
.jp-dl.err .jp-dl-ic{color:#c0392b}
.jp-dl-x{width:40px;height:40px;padding:8px;margin:-8px -8px -8px 0;border:0;background:none;color:inherit;flex:none}
.jp-dl-body{padding:14px 18px 0}
.jp-dl-prev{background:var(--jp-dl-soft,#f1f3f7);border-radius:16px;padding:16px;display:flex;justify-content:center;margin-bottom:14px}
.jp-dl-prev[hidden]{display:none}
.jp-dl-prev img{display:block;max-width:100%;max-height:34vh;border-radius:10px;box-shadow:0 6px 18px rgba(17,26,46,.18)}
.jp-dl-title{display:block;font-size:1.05rem;font-weight:600;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jp-dl-text{margin:0 0 16px;color:var(--jp-dl-muted,#5f6b80);font-size:.95rem;line-height:1.4}
.jp-dl-bar{height:6px;border-radius:6px;background:var(--jp-dl-soft,#e6e9ef);overflow:hidden;margin-bottom:18px}
.jp-dl-bar i{display:block;height:100%;width:2%;border-radius:6px;background:linear-gradient(90deg,#1b2d5b,#b07f3c);transition:width .25s ease}
.jp-dl.end .jp-dl-bar{display:none}
.jp-dl-acts{display:grid;gap:10px}
.jp-dl-list{display:grid;gap:8px}
.jp-dl-btn{display:block;width:100%;box-sizing:border-box;text-align:center;text-decoration:none;border-radius:12px;padding:13px;font-family:inherit;font-weight:600;font-size:1rem;line-height:1.2;border:1px solid var(--jp-dl-line,#d5d9e2);background:var(--jp-dl-bg,#fff);color:inherit}
.jp-dl-btn.main{background:#b07f3c;border-color:#b07f3c;color:#fff}
.jp-dl-btn:disabled{opacity:.55}
@keyframes jpDlUp{from{transform:translateY(100%)}to{transform:none}}
@keyframes jpDlFade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.jp-dl,.jp-dl-card{animation:none}.jp-dl-bar i{transition:none}}

/* Gradzahl beim Drehen (studio-polish.js) */
.ps-angle{position:fixed;z-index:9999;pointer-events:none;background:#17253d;color:#fff;font:600 13px/1 var(--font,system-ui),sans-serif;padding:7px 9px;border-radius:8px;box-shadow:0 4px 14px #17253d40;font-variant-numeric:tabular-nums}
.ps-angle[hidden]{display:none}
/* 18.10.2026: Die Kopfleiste darf die Seite nie breiter machen. Vorher wuchs die einzige Spalte des Editor-Rasters mit dem
   Inhalt der Kopfleiste (z. B. „Bilder werden hochgeladen (7 von 10) …“ neben „Online gesichert“) über die Fensterbreite hinaus –
   Arbeitsfläche und Seitenleiste rutschten nach rechts, „Herunterladen“ war abgeschnitten. Jetzt schrumpfen Titel und Hinweis. */
.ed{grid-template-columns:minmax(0,1fr)}
.ed-top{min-width:0;overflow:hidden}
/* Linke Hälfte (Hinweis, „Online gesichert“) schrumpft zuerst; die Knöpfe rechts (Senden, Herunterladen) bleiben sichtbar */
.ed-top-left{flex:1 1 0;min-width:0;overflow:hidden}
.ed-top-right{flex:0 1 auto;min-width:0}
.ed-top .ed-save{flex:0 1 auto;min-width:0;overflow:hidden}
.ed-top .ps-topbusy{flex:0 1 auto;min-width:0;max-width:min(360px,22vw)}
.ed-top .ed-title{min-width:90px;flex:0 1 240px;width:auto;max-width:240px}
@media (max-width:1400px){.ed-top .ps-topbusy span{max-width:150px}}

/* „Design aus Ordner erstellen“ (studio-aus-ordner.js) */
.ps-ao-l{display:block;margin:14px 0 0;font-size:.82rem;font-weight:600;color:var(--ink-2,#2c2c30)}
.ps-ao-l select,.ps-ao-l input{display:block;width:100%;margin-top:6px;padding:10px 12px;border-radius:12px;border:1px solid rgba(0,0,0,.12);font:inherit;font-weight:400;background:#fff}
/* „Im JP Studio verwenden“ (15.11.2026): Wahl „Leeres Design“ / „Vorlage verwenden“ als zwei Karten */
.ps-ao-l[hidden]{display:none}
.ps-ao-wahl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 0}
.ps-ao-wahl label{display:flex;gap:10px;align-items:flex-start;min-height:44px;padding:12px 14px;border:1px solid rgba(0,0,0,.14);border-radius:14px;background:#fff;cursor:pointer}
.ps-ao-wahl label:has(input:checked){border-color:var(--ink,#080808);box-shadow:0 0 0 1px var(--ink,#080808)}
.ps-ao-wahl label.off{opacity:.55;cursor:not-allowed}
.ps-ao-wahl input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:var(--ink,#080808)}
.ps-ao-wahl b{display:block;font-size:.9rem;font-weight:600;color:var(--ink,#080808)}
.ps-ao-wahl small{display:block;margin-top:3px;font-size:.8rem;line-height:1.35;font-weight:400;color:var(--muted,#6b6b74)}
@media (max-width:560px){.ps-ao-wahl{grid-template-columns:1fr}}
/* „Wochenbericht erstellen“ (25.10.2026): Ordnerauswahl und der Plan der JP-KI vor dem Bauen */
.ps-wb-folders{display:grid;gap:6px;margin-top:6px;max-height:200px;overflow:auto;padding:4px 0}
.ps-wb-folder{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid rgba(0,0,0,.1);border-radius:12px;font-weight:400;cursor:pointer;background:#fff}
.ps-wb-folder input{width:auto;margin:0}
.ps-wb-folder span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-wb-folder small{color:var(--muted,#6b6b74)}
.ps-wb-dialog{width:min(980px,100%)}
.ps-wb-topics{display:grid;gap:14px;margin-top:4px}
.ps-wb-topic{border:1px solid rgba(0,0,0,.1);border-radius:16px;padding:14px 16px;background:#fafafb}
.ps-wb-head{display:flex;align-items:center;gap:10px}
.ps-wb-head b{flex:0 0 28px;height:28px;border-radius:50%;background:var(--ink,#1a1a1d);color:#fff;display:grid;place-items:center;font-size:.85rem}
.ps-wb-head input{flex:1;padding:8px 12px;border-radius:10px;border:1px solid rgba(0,0,0,.12);font:inherit;font-weight:600;background:#fff}
.ps-wb-photos{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 4px}
.ps-wb-photo{margin:0;width:104px;display:grid;gap:4px}
.ps-wb-photo img{width:104px;height:104px;object-fit:cover;border-radius:10px;background:#eee;display:block}
.ps-wb-photo figcaption{font-size:.72rem;color:var(--muted,#6b6b74);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ps-wb-photo select{width:100%;padding:4px 6px;border-radius:8px;border:1px solid rgba(0,0,0,.12);font:inherit;font-size:.75rem;background:#fff}
.ps-wb-l{display:block;margin:10px 0 0;font-size:.78rem;font-weight:600;color:var(--ink-2,#2c2c30)}
.ps-wb-l input,.ps-wb-l textarea{display:block;width:100%;margin-top:4px;padding:8px 12px;border-radius:10px;border:1px solid rgba(0,0,0,.12);font:inherit;font-weight:400;background:#fff;resize:vertical}
.ps-wb-note{margin:10px 0 0;padding:8px 12px;border-radius:10px;background:#eef3f8;color:#1d3557;font-size:.82rem;line-height:1.5}
.ps-wb-warn{margin:0 0 12px;padding:8px 12px;border-radius:10px;background:#fff4e5;color:#7a4a00;font-size:.82rem;line-height:1.5}
.ps-wb-chat{display:flex;gap:8px;margin-top:18px}
.ps-wb-chat input{flex:1;padding:10px 12px;border-radius:12px;border:1px solid rgba(0,0,0,.12);font:inherit;background:#fff}
.ps-wb-chat .ed-ghost{white-space:nowrap}
@media (max-width:640px){.ps-wb-photo{width:84px}.ps-wb-photo img{width:84px;height:84px}.ps-wb-chat{flex-direction:column}}

/* Handy (schmal und Touch, 18.10.2026): Neue Designs entstehen am Computer – auf der Studio-Startseite fallen „Neues Design“,
   „Design hochladen“ und die Kachel „Was möchten Sie erstellen?“ weg; stattdessen ein kurzer Hinweis. Bestehende Designs öffnen
   in der schlanken Handy-Ansicht (studio-handy.js). */
@media (max-width:760px) and (pointer:coarse){
  #newBtn,#jpUploadDesign,.hm-boxcard:has(.hm-formats),.ps-quick{display:none!important}
  html.ps-startkopf .hm-head::after{content:"Neue Designs gestalten Sie am besten am Computer. Hier können Sie Designs ansehen, Bilder speichern und Texte oder Fotos tauschen.";
    display:block;margin:14px auto 0;max-width:34em;padding:10px 14px;border-radius:14px;background:rgba(255,255,255,.75);color:#3a3a3c;font-size:.86rem;line-height:1.45;text-shadow:none}
}
