/* Kalendárna Designer – vzhled návrháře. Barvy: lesní #1E3A34, len #F8F4EC, kraft #E8DCC6, cihla #B5532F, grafit #2B2B2B */
.kd-app{--kd-forest:#1E3A34;--kd-linen:#F8F4EC;--kd-kraft:#E8DCC6;--kd-brick:#B5532F;--kd-ink:#2B2B2B;--kd-bg:#FFFDF9;--kd-line:#E7DFD0;--kd-sage:#DCEBDF;--kd-sky:#DCE9F5;--kd-sun:#FCE7A6;--kd-apricot:#FBE3D2;
  font-family:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--kd-ink,#2B2B2B);background:var(--kd-bg,#FFFDF9);
  display:grid;grid-template-rows:auto 1fr auto;height:100%;min-height:520px;box-sizing:border-box;position:relative;font-size:15px;line-height:1.4;-webkit-font-smoothing:antialiased}
.kd-app{overflow:hidden;width:100%}
.kd-body>*,.kd-top>*{min-width:0}
.kd-app *,.kd-app *::before,.kd-app *::after{box-sizing:border-box}
.kd-app.kd-fixed{position:fixed;inset:0;z-index:100000;height:100vh;height:100dvh}
.kd-app button{font:inherit;color:inherit;cursor:pointer}
.kd-app button:disabled{cursor:not-allowed;opacity:.5}
.kd-app input,.kd-app select{font:inherit;color:inherit}
.kd-app h3,.kd-app h4{font-family:Fraunces,Georgia,serif;font-weight:600;color:var(--kd-forest,#1E3A34);margin:0}
.kd-app h4{font-size:17px;margin:20px 0 4px}
.kd-ico{display:inline-flex;width:20px;height:20px;flex:none}
.kd-ico svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kd-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--kd-bg,#FFFDF9);color:var(--kd-forest,#1E3A34);font-family:Fraunces,serif;font-size:20px;z-index:5}
.kd-ready .kd-loading{display:none}

/* horní lišta */
.kd-top{display:flex;align-items:center;gap:16px;padding:10px 16px;border-bottom:1px solid var(--kd-line,#E7DFD0);background:#fff}
.kd-brand{display:flex;flex-direction:column;align-items:flex-start;gap:0;line-height:1;color:var(--kd-forest,#1E3A34)}
.kd-brand svg{width:96px;height:10px}
.kd-brand b{font-family:Fraunces,serif;font-weight:600;font-size:20px;letter-spacing:-.01em;margin-top:2px}
.kd-prod{display:flex;flex-direction:column;min-width:0;flex:1;padding-left:16px;border-left:1px solid var(--kd-line,#E7DFD0)}
.kd-prod strong{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-status{font-size:13px;color:#6E6A62}
.kd-status.kd-saving{color:#8A7A3A}.kd-status.kd-unsaved{color:var(--kd-brick,#B5532F);font-weight:600}
.kd-actions{display:flex;align-items:center;gap:8px}
.kd-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;padding:9px 18px;border:1.5px solid transparent;font-weight:600;line-height:1.2;text-decoration:none;white-space:nowrap}
.kd-primary{background:var(--kd-brick,#B5532F);color:#fff!important;border-color:var(--kd-brick,#B5532F)}
.kd-primary:hover:not(:disabled){background:#9E4526}
.kd-ghost{background:#fff;border-color:var(--kd-line,#E7DFD0);color:var(--kd-forest,#1E3A34)}
.kd-ghost:hover:not(:disabled){border-color:var(--kd-forest,#1E3A34)}
.kd-wide{width:100%}
.kd-ibtn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;border:0;background:transparent;color:var(--kd-forest,#1E3A34)}
.kd-ibtn:hover:not(:disabled){background:var(--kd-linen,#F8F4EC)}
.kd-switch{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--kd-forest,#1E3A34);cursor:pointer;padding:0 6px;white-space:nowrap}
.kd-switch input{accent-color:var(--kd-forest,#1E3A34)}
.kd-app :focus-visible{outline:2px solid var(--kd-brick,#B5532F);outline-offset:2px}

/* tělo */
.kd-body{display:grid;grid-template-columns:350px 1fr;min-height:0}
.kd-side{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--kd-line,#E7DFD0);background:#fff}
.kd-tabs{display:flex;padding:6px;gap:2px;border-bottom:1px solid var(--kd-line,#E7DFD0);background:var(--kd-linen,#F8F4EC)}
.kd-tabs button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;border:0;border-radius:10px;background:transparent;font-size:12px;font-weight:600;color:#5E5A52}
.kd-tabs button.kd-on{background:#fff;color:var(--kd-forest,#1E3A34);box-shadow:0 1px 3px rgba(30,58,52,.12)}
.kd-panel{flex:1;overflow:auto;padding:16px 18px 28px}
.kd-panel > * + *{margin-top:12px}
.kd-muted{color:#6E6A62;font-size:13.5px;margin:0}
.kd-row{display:flex;gap:8px;align-items:center}
.kd-row > .kd-field{flex:1}
.kd-field{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;color:var(--kd-forest,#1E3A34)}
.kd-field input[type=text],.kd-field input[type=email],.kd-field input[type=date],.kd-field select,.kd-field textarea,.kd-names input,.kd-copy input{width:100%;padding:9px 12px;border:1.5px solid var(--kd-line,#E7DFD0);border-radius:10px;background:#fff;font-weight:400;color:var(--kd-ink,#2B2B2B);min-height:42px}
.kd-field input:focus,.kd-field select:focus,.kd-field textarea:focus,.kd-names input:focus{border-color:var(--kd-forest,#1E3A34);outline:none}
.kd-field textarea{font:inherit;font-weight:400;line-height:1.45;resize:vertical;min-height:120px}
.kd-field input[type=range]{accent-color:var(--kd-brick,#B5532F)}
.kd-field input[type=color]{width:56px;height:36px;border:1.5px solid var(--kd-line,#E7DFD0);border-radius:8px;padding:2px;background:#fff}
.kd-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;cursor:pointer}
.kd-check input{width:18px;height:18px;margin-top:1px;accent-color:var(--kd-forest,#1E3A34);flex:none}
.kd-drop{border:2px dashed #CDBE9F;border-radius:16px;padding:34px 20px;text-align:center;background:var(--kd-linen,#F8F4EC);color:#5E5A52;cursor:pointer}
.kd-drop.kd-over{background:var(--kd-sage,#DCEBDF);border-color:var(--kd-forest,#1E3A34)}
.kd-progress{position:relative;background:var(--kd-linen,#F8F4EC);border-radius:10px;overflow:hidden;font-size:13px;padding:8px 12px}
.kd-progress i{position:absolute;left:0;top:0;bottom:0;background:var(--kd-sage,#DCEBDF);z-index:0;transition:width .2s}
.kd-progress span{position:relative;z-index:1}
.kd-lib{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.kd-lib-big{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));margin-top:14px;max-height:60vh;overflow:auto}
.kd-ph{position:relative;aspect-ratio:1;border:0;padding:0;border-radius:10px;overflow:hidden;background:var(--kd-kraft,#E8DCC6)}
.kd-ph img{width:100%;height:100%;object-fit:cover;display:block}
.kd-ph-load{display:block;width:100%;height:100%;background:linear-gradient(90deg,#EFE7D7,#F8F4EC,#EFE7D7);background-size:200% 100%;animation:kdsh 1.2s infinite linear}
@keyframes kdsh{to{background-position:-200% 0}}
.kd-ph .kd-badge{position:absolute;left:4px;bottom:4px;font-size:10.5px;font-weight:600;background:rgba(255,255,255,.92);color:var(--kd-forest,#1E3A34);padding:1px 6px;border-radius:999px}
.kd-ph.kd-used{outline:2px solid var(--kd-sage,#DCEBDF)}
.kd-ph:not(.kd-used) .kd-badge{background:var(--kd-sun,#FCE7A6);color:#5A4A10}
.kd-ph .kd-q{position:absolute;right:4px;top:4px}
.kd-q{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 7px;border-radius:999px;font-size:11.5px;font-weight:700}
.kd-q-ok{background:var(--kd-sage,#DCEBDF);color:var(--kd-forest,#1E3A34)}.kd-q-warn{background:#F2C94C;color:#3A3000}.kd-q-low{background:var(--kd-brick,#B5532F);color:#fff}
.kd-cards{display:flex;flex-direction:column;gap:8px}
.kd-card{display:flex;gap:12px;align-items:center;text-align:left;border:1.5px solid var(--kd-line,#E7DFD0);background:#fff;border-radius:14px;padding:10px}
.kd-card:hover:not(:disabled){border-color:#BFB197}
.kd-card.kd-on{border-color:var(--kd-forest,#1E3A34);background:var(--kd-sage,#DCEBDF)}
.kd-card b{display:block;font-size:14.5px;color:var(--kd-forest,#1E3A34)}
.kd-card small{display:block;color:#6E6A62;font-size:12.5px;margin-top:2px}
.kd-schema{flex:none;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);background:#fff}
.kd-swatch{flex:none;position:relative;width:64px;height:64px;border-radius:12px;border:1px solid rgba(0,0,0,.08);display:flex;align-items:flex-end;gap:3px;padding:6px}
.kd-swatch i{width:12px;height:12px;border-radius:50%;border:1px solid rgba(0,0,0,.08)}
.kd-swatch em{position:absolute;top:6px;left:8px;font-style:normal;font-size:22px;line-height:1}
.kd-events{list-style:none;margin:0;padding:0}
.kd-events li{display:flex;align-items:center;gap:8px;padding:4px 0;border-bottom:1px solid var(--kd-linen,#F8F4EC);font-size:14px}
.kd-events li span{flex:1}
.kd-evdot{width:10px;height:10px;border-radius:50%;flex:none}
.kd-evform{background:var(--kd-linen,#F8F4EC);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:10px}
.kd-names{display:flex;flex-direction:column;gap:6px}
.kd-logoprev{background:repeating-conic-gradient(#EEE 0 25%,#FFF 0 50%) 0 0/16px 16px;border-radius:12px;padding:12px;display:flex;justify-content:center}
.kd-logoprev img{max-width:100%;max-height:90px}
.kd-ro .kd-panel{opacity:.95}

/* plátno */
.kd-stage{display:grid;grid-template-rows:auto 1fr auto;min-height:0;min-width:0;background:linear-gradient(180deg,#F3EEE4,#ECE5D8)}
.kd-stagebar{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px}
.kd-pagelabel{min-width:220px;text-align:center;font-family:Fraunces,serif;font-weight:600;font-size:17px;color:var(--kd-forest,#1E3A34)}
.kd-stagewrap{position:relative;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:12px}
.kd-canvas:focus{outline:none}
.kd-canvas{display:block;background:#fff;box-shadow:0 10px 30px rgba(30,58,52,.18),0 2px 6px rgba(30,58,52,.12);touch-action:none;cursor:pointer}
.kd-tool{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;margin:0 auto 10px;padding:6px 10px;background:#fff;border-radius:999px;box-shadow:0 4px 14px rgba(30,58,52,.14);max-width:calc(100% - 20px)}
.kd-tool[hidden]{display:flex;visibility:hidden;pointer-events:none}
.kd-zoom{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--kd-forest,#1E3A34)}
.kd-zoom input{width:140px;accent-color:var(--kd-brick,#B5532F)}
.kd-tool-hint{font-size:12.5px;color:#6E6A62;max-width:320px}

/* pás listů */
.kd-strip{display:flex;gap:10px;overflow-x:auto;padding:10px 14px;border-top:1px solid var(--kd-line,#E7DFD0);background:#fff;scrollbar-width:thin}
.kd-page{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;border:0;background:transparent;padding:4px;border-radius:10px}
.kd-page canvas{display:block;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.18);background:#fff}
.kd-page.kd-cur{background:var(--kd-sage,#DCEBDF)}
.kd-page.kd-cur canvas{outline:2px solid var(--kd-forest,#1E3A34)}
.kd-plabel{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:#5E5A52}
.kd-dot{width:8px;height:8px;border-radius:50%}
.kd-dot-ok{background:#7FB394}.kd-dot-empty{background:#D6CCB8}.kd-dot-warn{background:#F2C94C}.kd-dot-low{background:var(--kd-brick,#B5532F)}

/* toast a modály */
.kd-toast{position:absolute;left:50%;top:118px;transform:translate(-50%,-10px);background:var(--kd-forest,#1E3A34);color:#fff;padding:10px 18px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:.25s;z-index:30;max-width:90%}
.kd-toast.kd-show{opacity:1;transform:translate(-50%,0)}
.kd-toast.kd-error{background:var(--kd-brick,#B5532F)}
.kd-overlay{position:absolute;inset:0;background:rgba(30,42,40,.45);display:flex;align-items:center;justify-content:center;z-index:40;padding:16px}
.kd-modal{background:#fff;border-radius:20px;width:min(520px,100%);max-height:calc(100% - 20px);display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.kd-wide-modal{width:min(980px,100%)}
.kd-mhead{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 6px 22px}
.kd-mhead h3{font-size:22px}
.kd-mbody{padding:8px 22px 16px;overflow:auto}
.kd-mbody > div > * + *{margin-top:12px}
.kd-mfoot{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid var(--kd-line,#E7DFD0);flex-wrap:wrap}
.kd-checks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.kd-checks li{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:12px;font-size:14px}
.kd-c-ok{background:var(--kd-sage,#DCEBDF);color:var(--kd-forest,#1E3A34)}.kd-c-warn{background:#FFF4D1}.kd-c-low{background:var(--kd-apricot,#FBE3D2)}.kd-c-info{background:var(--kd-sky,#DCE9F5)}
.kd-confirm{background:var(--kd-linen,#F8F4EC);padding:12px;border-radius:12px;font-weight:600}
.kd-pgrid,.kd-finish-pages{display:flex;flex-wrap:wrap;gap:14px}
.kd-finish-pages .kd-pgrid{gap:10px}
.kd-pgrid figure{margin:0;cursor:pointer;text-align:center}
.kd-pgrid canvas{display:block;box-shadow:0 2px 8px rgba(0,0,0,.18);background:#fff}
.kd-pgrid figcaption{font-size:12px;color:#5E5A52;margin-top:4px}
.kd-copy{display:flex;flex-direction:column;gap:6px}
.kd-ok-msg{color:var(--kd-forest,#1E3A34);font-weight:600;background:var(--kd-sage,#DCEBDF);padding:8px 12px;border-radius:10px}
.kd-err-msg{color:#fff;background:var(--kd-brick,#B5532F);padding:8px 12px;border-radius:10px}

/* mobil */
@media (max-width:860px){
  .kd-app{grid-template-rows:auto 1fr auto auto;font-size:14.5px}
  .kd-top{gap:8px;padding:8px 10px}
  .kd-brand{display:none}
  .kd-prod{padding-left:2px;border-left:0}
  .kd-actions{gap:2px;flex:none}
  .kd-actions .kd-primary{padding:8px 14px}
  .kd-hide-s,.kd-switch{display:none}
  .kd-body{grid-template-columns:minmax(0,1fr);grid-template-rows:1fr auto;grid-row:2}
  .kd-stage{grid-row:1}
  .kd-side{grid-row:2;border-right:0;border-top:1px solid var(--kd-line,#E7DFD0);max-height:42vh}
  .kd-tabs{order:2;border-bottom:0;border-top:1px solid var(--kd-line,#E7DFD0)}
  .kd-panel{order:1;padding:12px 14px}
  .kd-strip{grid-row:3;padding:6px 10px}
  .kd-lib{grid-template-columns:repeat(4,1fr)}
  .kd-pagelabel{min-width:0;font-size:15px}
  .kd-zoom input{width:100px}
  .kd-tool-hint{display:none}
  .kd-toast{top:64px}
}
@media (max-width:420px){.kd-hide-xs{display:none}}
/* Integrace na stránce produktu */
.kd-launch{display:flex;flex-direction:column;gap:8px;margin:0 0 16px;padding:14px;border-radius:16px;background:#F8F4EC;border:1px solid #E7DFD0}
.kd-launch .kd-launch-row{display:flex;gap:12px;align-items:center}
.kd-launch img{width:64px;height:auto;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.kd-launch .kd-launch-status{font-size:14px;color:#1E3A34}
.kd-launch .kd-launch-status b{display:block}
.kd-launch .button.kd-launch-btn{background:#B5532F;color:#fff;border-radius:999px;padding:12px 22px;font-weight:600;border:0}
body.kd-noscroll{overflow:hidden}
.kd-app[hidden]{display:none!important}
.kd-launch .kd-launch-new{background:none;border:0;box-shadow:none;text-decoration:underline;color:#1E3A34;padding:4px;cursor:pointer;font-size:14px;align-self:center}
/* 1.4.5 – výraznější varování o kvalitě a listy u fotek */
.kd-ph .kd-badge{max-width:calc(100% - 8px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.kd-ph.kd-ph-low{outline:3px solid var(--kd-brick,#B5532F);outline-offset:-3px}
.kd-ph.kd-ph-warn{outline:3px solid #E0B020;outline-offset:-3px}
.kd-ph .kd-q{min-width:22px;height:22px;font-size:13px;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.kd-tool.kd-tool--warn{border-radius:18px;max-width:min(640px,calc(100% - 20px))}
.kd-qwarn{display:flex;align-items:flex-start;gap:8px;flex:1 1 100%;order:-1;padding:9px 12px;border-radius:12px;font-size:13.5px;line-height:1.4;text-align:left}
.kd-qwarn svg{flex:0 0 18px;width:18px;height:18px;margin-top:1px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kd-qwarn b{font-weight:700}
.kd-qwarn-low{background:var(--kd-brick,#B5532F);color:#fff}
.kd-qwarn-warn{background:#FFF1C2;color:#4A3B00;border:1px solid #E0B020}
.kd-qwarn-panel{margin:0 0 12px}
.kd-qwarn-btn{font-weight:600}
@media (max-width:760px){.kd-qwarn{font-size:12.5px;padding:7px 10px}.kd-tool.kd-tool--warn{gap:6px}}
.kd-bulk{margin-top:10px;background:var(--kd-linen,#F8F4EC);border-radius:14px;padding:10px 12px}.kd-bulk summary{cursor:pointer;font-weight:600;color:var(--kd-forest,#1E3A34)}.kd-bulk[open]{display:flex;flex-direction:column;gap:10px}.kd-bulk textarea{width:100%;box-sizing:border-box;font:inherit;font-size:14px;border:1px solid var(--kd-line,#E7DFD0);border-radius:10px;padding:8px}
