/* Štúdio / editor – nadväzuje na tokeny a komponenty zo style.css */

.ed-body .topbar { max-width: 1480px; }
.ed { max-width: 1480px; margin: 0 auto; padding: 8px 24px 64px; }
.ed-h1 { font: 800 clamp(28px, 3vw, 40px)/1.05 var(--display); letter-spacing: -.035em; margin: 0 0 20px; }
.ed-h2 { font: 700 20px var(--display); letter-spacing: -.02em; margin: 0 0 16px; }
.ed-wide { width: 100%; margin-top: 20px; }
.ed-wide:disabled { opacity: .6; cursor: progress; }

/* Overenie e-mailu / prihlásenie */
.ed-gate { max-width: 480px; margin: 48px auto; padding: 32px; }
.ed-gate .ed-h1 { margin-top: 14px; }
.ed-gate p { color: var(--ink-soft); }
.ed-paywall { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--bg); border: 1.5px dashed #1b183040; }
.ed-paywall p { margin: 0; }
.ed-paywall small { color: var(--ink-soft); }

.ed-user, #userInfo { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; }
.ed-user .chip { cursor: pointer; }
.ed-credits { white-space: nowrap; }
@media (max-width: 760px) {
  /* Mobil: hlavička sa zmestí do šírky – e-mail sa skráti, kredity a Odhlásiť ostanú celé. */
  .ed-body .topbar { gap: 10px; }
  .ed-body .brand-logo { height: 26px; }
  .ed-user, #userInfo { gap: 8px; min-width: 0; }
  .ed-email { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ed-user .chip { padding: 5px 10px; }
}
.ed-credits { display: inline-flex; align-items: center; gap: 6px; background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; }

/* Účet */
.acc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.acc .card { padding: 26px; }
.acc-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.acc-balance { font: 800 64px/1 var(--display); letter-spacing: -.04em; margin: 6px 0 4px; }
.acc-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
.acc-plan { border: 2px solid var(--ink); border-radius: 20px; padding: 16px; display: grid; gap: 6px; background: var(--white); }
.acc-plan.featured { background: var(--lime); box-shadow: 4px 4px 0 var(--ink); }
.acc-plan strong { font: 700 18px var(--display); }
.acc-plan .acc-price { font: 800 28px var(--display); letter-spacing: -.03em; }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acc-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg); font-size: 14px; }
.acc-list small { color: var(--ink-soft); }
.acc-invite { display: flex; gap: 8px; margin-top: 12px; }
.acc-invite input { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid #1b183026; border-radius: 12px; font: inherit; }
.acc-brand { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 20px; }
.acc-preview { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; border: 4px solid var(--ink);
  background: linear-gradient(160deg, #b9b1d8, #6f6a8f); }
.acc-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acc-logo img { max-height: 56px; max-width: 160px; object-fit: contain; background: var(--bg); border-radius: 10px; padding: 6px; }
.acc .full { grid-column: 1 / -1; }
.ed-save-notice { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; background: #b3261e; color: #fff; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 24px #0003; }
.tile-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #ffffff99; }
.tile-progress span { display: block; height: 100%; background: var(--violet); transition: width 1s linear; }
#genBar { transition: width 1s linear; }
.ed-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--line); position: sticky; top: 76px; z-index: 5; }
.ed-tabs button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.ed-tabs button.is-on { background: var(--ink); color: var(--lime); }
.ed-save-state { display: block; min-height: 18px; margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.ed-warn { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: #ffc8a355; border: 1.5px solid #e0874f; font-size: 14px; color: var(--ink); }
.linklike { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: inherit; }
.tile-warn { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #e0874f; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.tile-end { position: relative; }
.tile-add { display: grid; place-items: center; align-content: center; gap: 2px; cursor: pointer; border: 2px dashed #1b183040; background: var(--white); color: var(--ink-soft); }
.tile-add span { font-size: 28px; line-height: 1; font-weight: 300; }
.tile-add small { font-size: 12px; font-weight: 600; }
.tile-add:hover { border-color: var(--ink); color: var(--ink); }
.ed-regen-box { margin: 4px 0 8px; border-top: 1.5px solid var(--line); padding-top: 12px; }
.ed-regen-box > summary { cursor: pointer; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.ed-regen-box .btn { margin-top: 8px; }
.ed-stage.square { height: max(240px, min(46vh, 560px, calc(100vh - 420px))); }
.ed-history { display: flex; gap: 8px; justify-self: start; }
.ed-history .chip:disabled { opacity: .35; cursor: default; }
.ed-steps-bar { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ed-step { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 5px 14px 5px 5px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.ed-step-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #1b18300f; font-size: 12px; font-weight: 800; }
.ed-step.is-done { color: var(--ink); }
.ed-step.is-done .ed-step-mark { background: var(--lime); }
.ed-step.is-next { border-color: var(--ink); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ed-step.is-next .ed-step-mark { background: var(--ink); color: var(--lime); }
.ed-more-formats { margin-top: 6px; }
.ed-more-formats > summary { cursor: pointer; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
/* Vrstvy: lišta pod náhľadom, lišta pri vrstve, ponuky */
.ed-stage-wrap { position: relative; }
.ed-pin { position: relative; display: grid; justify-items: center; gap: 14px; width: 100%; min-width: 0; }
.ly-bar { display: grid; gap: 8px; justify-items: center; width: 100%; }
.ly-bar[hidden] { display: none; }
.ly-add { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ly-add .chip { font-size: 14px; padding: 7px 14px; }
.ly-list { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ly-chip { border: 1.5px solid #1b183040; background: var(--white); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-family: inherit, 'Noto Color Emoji'; }
.ly-chip.is-on { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.ly-bar .hint { margin: 0; font-size: 12px; text-align: center; }
.ly-toolbar { position: absolute; z-index: 20; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--ink); box-shadow: 0 6px 20px #0004; flex-wrap: wrap; max-width: calc(100% - 8px); }
.ly-toolbar[hidden] { display: none; }
.ly-btn { border: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 9px; border-radius: 10px; cursor: pointer; min-width: 34px; }
.ly-btn:hover:not(:disabled), .ly-btn:focus-visible { background: #ffffff22; }
.ly-btn:disabled { opacity: .35; cursor: default; }
.ly-danger:hover { background: #b3261e !important; }
.ly-popover { position: absolute; z-index: 30; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 8px; box-shadow: 4px 4px 0 var(--ink); max-width: 260px; }
.ly-menu { display: grid; gap: 2px; min-width: 190px; }
.ly-menu button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ly-menu button:hover, .ly-menu button.is-on { background: var(--lime); }
.ly-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ly-auto { border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ed-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); text-align: left; }
.ed-consent input { margin-top: 3px; flex: none; accent-color: var(--violet); }
.ed-consent a, .ed-legal a { text-decoration: underline; text-underline-offset: 2px; }
.ed-legal { display: block; margin-top: 10px; }
.acc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); margin: 4px 0 12px; }
.acc-consent input { margin-top: 3px; flex: none; accent-color: var(--violet); }
.acc-consent a, .acc .hint a { text-decoration: underline; text-underline-offset: 2px; }
.acc-billing { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.acc-billing .full { grid-column: 1 / -1; }
.acc-billing input, .acc-billing select { width: 100%; padding: 10px 12px; border: 2px solid #1b183026; border-radius: 12px; font: inherit; background: var(--white); }
.acc-inv-links { display: flex; gap: 6px; flex: none; }
.acc-list li .ed-status { margin-left: 8px; }
.acc-danger { margin-top: 18px; border-top: 1.5px solid var(--line); padding-top: 14px; }
.acc-danger summary { cursor: pointer; font-weight: 700; color: #b3261e; }
.btn-danger { background: #b3261e; color: #fff; border-color: #b3261e; }
@media (max-width: 1100px) { .acc, .acc-brand { grid-template-columns: 1fr; } .acc-preview { max-width: 220px; } }

/* Prehľad */
.ed-home { display: grid; gap: 16px; }
/* Nové video: formulár + náhľad začiatku videa (na mobile pod formulárom) */
.ed-newgrid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.ed-new { padding: 30px; }
.ed-new .ed-h1 { margin-bottom: 10px; }
.ed-lead { margin: 0 0 18px; color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.ed-stages { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ed-stages li { border: 1.5px solid var(--ink); border-radius: 18px; padding: 12px 14px; display: grid; gap: 4px; font-size: 13px; line-height: 1.4; }
.ed-stages strong { font: 700 16px var(--display); }
.ed-sec { border-top: 1.5px solid var(--line); padding-top: 20px; margin-top: 22px; }
.ed-stages + .ed-sec, .ed-select + .ed-sec { border-top: 0; padding-top: 0; margin-top: 0; }
.ed-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-sec-head .ed-h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.ed-sec-head small { font-size: 13px; color: var(--ink-soft); }
.ed-sec-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; }
.ed-sec-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); }
.ed-sec-foot:not(:has(:not([hidden]))) { display: none; }
.ed-new .dropzone { min-height: 150px; }
.ed-new .dropzone.is-compact { min-height: 0; }
.ed-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ed-label em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--violet); background: #efe9ff; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ed-look { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px 18px; align-items: center; }
.ed-look-label { font-size: 14px; font-weight: 700; }
.ed-look .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-music-pick { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; background: var(--white); }
.ed-music-pick select { margin-left: auto; max-width: 55%; }
.ed-music-pick .linklike { margin-left: auto; }
.ed-play { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; cursor: pointer; }
.ed-music-name { display: grid; }
.ed-music-name small { font-size: 12px; color: var(--ink-soft); }
.ed-submit { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.ed-submit .btn { flex: none; font-size: 17px; padding: 16px 28px; }
.ed-submit .hint { margin: 0; }
.ed-np { position: sticky; top: 16px; }
.ed-np .ed-h2 { margin-bottom: 4px; }
.ed-np > .hint { margin: 0 0 16px; font-size: 13px; }
.ed-np-phone { width: min(100%, 230px); aspect-ratio: 9 / 16; margin: 0 auto 16px; border: 6px solid var(--ink); border-radius: 26px; overflow: hidden; position: relative; background: #d9d4e8; }
.ed-np-stage { position: absolute; inset: 0; }
.ed-np-plan { display: grid; grid-template-columns: max-content 1fr; margin: 0; font-size: 14px; }
.ed-np-plan dt, .ed-np-plan dd { margin: 0; padding: 9px 0; border-top: 1.5px solid var(--line); }
.ed-np-plan dt { font-weight: 700; padding-right: 16px; }
.ed-np-length { margin-top: 16px; border: 1.5px solid var(--ink); border-radius: 18px; padding: 12px 14px; display: grid; gap: 4px; font-size: 13px; }
.ed-np-length strong { font: 800 18px var(--display); }
@media (max-width: 1100px) {
  .ed-newgrid { grid-template-columns: 1fr; }
  .ed-np { position: static; }
  .ed-np-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
  .ed-np-phone { margin: 0; }
}
@media (max-width: 760px) {
  .ed-new { padding: 22px 18px; }
  .ed-stages { grid-template-columns: 1fr; }
  .ed-look { grid-template-columns: 1fr; gap: 8px; }
  .ed-look-label:not(:first-child) { margin-top: 8px; }
  .ed-submit { flex-direction: column; align-items: stretch; }
  .ed-submit .btn { justify-content: center; }
  .ed-np-plan { font-size: 13px; grid-template-columns: max-content 1fr; }
}
.ed-trash { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; font-size: 17px; cursor: pointer; opacity: .35; }
.ed-trash:hover { opacity: 1; background: #b3261e14; }
.ed-danger .hint { margin: 0 0 12px; }
.ed-delete { color: #b3261e; border-color: #b3261e66; }
.ed-delete:hover { background: #b3261e; color: #fff; border-color: #b3261e; }
.ed-heic { display: grid; place-items: center; font-size: 10px; padding: 4px; overflow: hidden; background: var(--white); }
.ed-projects { display: grid; gap: 8px; }
.ed-project { display: flex; gap: 14px; align-items: center; padding: 8px; border-radius: 18px; border: 1.5px solid transparent; }
.ed-project:hover { border-color: var(--ink); background: var(--bg); }
.ed-project img, .ed-project-empty { width: 84px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--lilac); flex: none; }
.ed-project strong { display: block; font: 700 17px var(--display); }
.ed-project-text { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.ed-list-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.ed-list-tools input[type=search] { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; padding: 10px 14px; border-radius: 12px; border: 2px solid #1b183026; background: var(--white); color: var(--ink); }
.ed-star { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; line-height: 1; color: #1b183040; cursor: pointer; }
.ed-star:hover { color: var(--ink); background: #1b18300d; }
.ed-star.is-on { color: #e0a800; }
.ed-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.ed-pager:empty { display: none; }
.ed-project small { color: var(--ink-soft); font-size: 13px; }

/* Hlavička projektu */
.ed-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; }
.ed-back { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.ed-head .ed-h1 { margin: 6px 0 0; }
.ed-gen { padding: 16px 22px; margin-bottom: 16px; display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; grid-template-areas: "title bar eta" "note note note"; align-items: center; gap: 6px 18px; }
.ed-gen > strong { grid-area: title; }
.ed-gen > .ed-bar { grid-area: bar; }
.ed-gen > #genEta { grid-area: eta; text-align: right; }
.ed-gen > small:last-child { grid-area: note; }
@media (max-width: 760px) { .ed-gen { grid-template-columns: 1fr; grid-template-areas: "title" "bar" "eta" "note"; } .ed-gen > #genEta { text-align: left; } }
.ed-gen strong { font: 700 17px var(--display); }
.ed-gen small { color: var(--ink-soft); font-size: 13px; }
.ed-gen-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-gen-row select { flex: 1; min-width: 160px; }
.ed-gen .message { margin: 0; }
.ed-bar { height: 10px; border-radius: 10px; background: #1b18301a; overflow: hidden; }
.ed-bar span { display: block; height: 100%; background: var(--lime); border-right: 2px solid var(--ink); transition: width .4s; }
select {
  font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 12px; border: 2px solid #1b183026; background: var(--white); color: var(--ink);
}

/* Náhľad + panel */
.ed-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.ed-stage-wrap { padding: 20px; display: grid; justify-items: center; gap: 14px; min-width: 0; }
/* Náhľad ostáva na mieste, kým sa posúva dlhý panel úprav (len vedľa seba a keď sa zmestí na výšku). */
/* Náhľad sa zmenší podľa výšky okna, aby sa celý zmestil a mohol ostať pripnutý aj na notebooku. */
@media (min-width: 1101px) and (min-height: 600px) {
  .ed-stage-wrap { position: sticky; top: 84px; }
  .ed-stage { height: max(260px, min(54vh, 640px, calc(100vh - 380px))); }
}
.ed-formats { display: flex; gap: 8px; justify-self: start; }
.chip { border: 2px solid var(--ink); background: var(--white); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.chip.is-on { background: var(--ink); color: var(--lime); }
.ed-stage {
  position: relative; overflow: hidden; isolation: isolate;
  height: min(54vh, 640px); aspect-ratio: 9 / 16; max-width: calc(100% - 16px);
  box-sizing: content-box; /* pomer strán platí pre vnútro (bez rámu) – vrstvy presne sedia na video */
  border: 8px solid var(--ink); border-radius: 30px; background: #000; box-shadow: 8px 8px 0 var(--ink);
}
.ed-stage.wide { height: auto; width: calc(100% - 16px); max-height: 54vh; border-radius: 22px; }
.ed-stage video, .ed-stage #still {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s;
}
.ed-stage video.contain, .ed-stage #still.contain { object-fit: contain; }
/* „Celý záber“ na výšku: rozmazaná a stmavená kópia záberu za ním (ako v exporte). */
#blurBg { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; display: none; }
.ed-stage.blurfit #blurBg { display: block; }
.ed-stage video, .ed-stage #still, .ed-strip .tile img, #transition .fx-thumb, #vertical .fx-thumb { filter: var(--grade, none); }
.ed-stage .on { opacity: 1; }
#still.kb { animation: edkb 4s ease-out both; }
@keyframes edkb { from { transform: scale(1.14); } to { transform: scale(1); } }
.ed-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ed-controls { display: flex; align-items: center; gap: 12px; justify-self: start; font-weight: 600; font-size: 14px; }
.ed-controls .play { position: static; }
.ed-controls { flex-wrap: wrap; }
.ed-play-more { display: flex; gap: 8px; flex-wrap: wrap; }

.ed-side { display: grid; gap: 16px; }
.ed-side .card { padding: 22px; }
.ed-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ed-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #1b183014; white-space: nowrap; }
.ed-status.st-ready { background: var(--lime); }
.ed-status.st-error { background: var(--peach); }
.ed-status.st-generating, .ed-status.st-queued { background: var(--sky); }
.ed-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ed-field input {
  width: 100%; padding: 11px 14px; border: 2px solid #1b183026; border-radius: 12px; background: var(--white); font-size: 15px; outline: none;
}
.ed-field input:focus { border-color: var(--ink); box-shadow: 3px 3px 0 var(--lilac); }
.seg { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--white); }
.seg button { flex: 1; border: 0; background: none; padding: 8px 6px; font-size: 13px; font-weight: 600; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.is-on { background: var(--ink); color: var(--lime); }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ed-textbox { border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; margin: 4px 0 16px; display: grid; gap: 2px; }
.ed-textbox > .btn { justify-self: start; }
.ed-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ed-h3 { font: 700 17px var(--display); margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #1b183026; border: 2px solid var(--ink); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input:before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--ink); transition: transform .15s; }
.switch input:checked { background: var(--lime); }
.switch input:checked:before { transform: translateX(18px); }
.fontgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fontchip { border: 2px solid #1b183026; background: var(--white); border-radius: 12px; padding: 8px 4px; font-size: 16px; color: var(--ink); }
.fontchip.is-on { border-color: var(--ink); background: var(--lime); }
.swatches { flex-wrap: wrap; align-items: center; }
.swatch-sm { width: 30px; height: 30px; }
.ed-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ed-logo img { max-width: 120px; max-height: 56px; object-fit: contain; padding: 6px; border-radius: 10px; background: repeating-conic-gradient(#0000000d 0 25%, transparent 0 50%) 0 0 / 14px 14px; }
.swatch-custom { position: relative; display: grid; place-items: center; cursor: pointer; background: conic-gradient(#e5534b, #ffc8a3, #d9f36d, #bde3ff, #6b4cf6, #ffb9d8, #e5534b); }
.swatch-custom::after { content: '+'; font: 800 18px/1 sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.swatch-custom.has-color::after { content: ''; }
.swatch-custom input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.swatch-custom:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
.ed-field .hint { font-weight: 500; margin: 2px 0 0; }
.ed-actions .btn:disabled { opacity: .35; pointer-events: none; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); }
.swatch.is-on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--violet); }
.ed-range, .ed-select { display: grid; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ed-range { grid-template-columns: 1fr auto; }
.ed-range input { grid-column: 1 / -1; }
.ed-range input { accent-color: var(--violet); }

.ed-export-row { display: grid; gap: 8px; padding: 12px 0; border-top: 1.5px solid var(--line); }
.ed-export-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-export-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ed-export-actions .btn:disabled { opacity: .5; }
.ed-export-row small { color: var(--ink-soft); font-size: 13px; }
.ed-export-row .message { margin: 0; }

/* Pás záberov */
.ed-strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px; width: 100%; justify-self: stretch; }
.tile {
  position: relative; flex: none; width: 128px; aspect-ratio: 4 / 3; padding: 0; overflow: hidden;
  border: 2px solid var(--line); border-radius: 16px; background: var(--white); cursor: grab;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.is-sel { border-color: var(--ink); box-shadow: 4px 4px 0 var(--violet); }
.tile.is-hidden img { opacity: .3; filter: grayscale(1); }
.tile.dragging { opacity: .4; }
.tile.drop { outline: 3px dashed var(--violet); outline-offset: 2px; }
.tile-num {
  position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; border-radius: 999px; padding: 0 6px;
  background: var(--ink); color: var(--white); font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.tile-status { position: absolute; right: 7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); background: #9a95b8; }
.tile-status.st-ready { background: #3fb950; }
.tile-status.st-generating, .tile-status.st-queued { background: var(--violet); animation: blink 1s infinite; }
.tile-status.st-error { background: #e5534b; }
.tile-cap {
  position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; font-weight: 700; text-align: left;
  background: var(--lime); border-radius: 6px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-end { display: grid; place-items: center; cursor: pointer; }
.tile-end-label { font: 700 14px var(--display); padding: 6px; }

@media (max-width: 1100px) {
  .ed-main { grid-template-columns: 1fr; }
  .ed-head { flex-direction: column; align-items: stretch; }
}
@media (max-width: 760px) {
  .ed { padding: 4px 16px 48px; }
  .tile { width: 104px; }
  /* Mobil: menší náhľad s vrstvami pripnutý pod hornou lištou, prehrávanie, zábery a záložky pod ním. Lilavý blok
     sa „rozpustí“ (display: contents), aby sa pripnutie týkalo celej stránky, nie len bloku náhľadu. */
  .ed-stage-wrap { display: contents; }
  .ed-main { gap: 12px; }
  .ed-pin { position: sticky; top: 60px; z-index: 6; padding: 10px 10px 8px; gap: 8px; border-radius: 22px; background: var(--lilac); box-shadow: 0 8px 18px -12px #1b183066; }
  .ed-stage, .ed-stage.square { height: min(32vh, 300px); border-width: 5px; border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); }
  .ed-stage.wide { width: calc(100% - 10px); height: auto; max-height: 32vh; border-radius: 16px; }
  .ed-stage { max-width: calc(100% - 10px); }
  .ly-bar { gap: 6px; }
  .ly-bar .hint { display: none; }
  .ly-add { flex-wrap: nowrap; gap: 6px; }
  .ly-add .chip { font-size: 13px; padding: 5px 10px; }
  .ly-list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .ly-chip { flex: none; }
  .ed-formats, .ed-controls { justify-self: stretch; }
  .ed-strip { padding-top: 0; }
}
.ed-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.ed-plain:disabled { opacity: .7; }
.acc-name { border: 0; background: transparent; padding: 0; width: 100%; margin: 12px 0 0; color: var(--ink); outline: none; border-bottom: 2px dashed transparent; }
.acc-name:hover, .acc-name:focus { border-bottom-color: #1b183040; }
.mu-moods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mu-moods .chip { padding: 4px 12px; border-width: 1.5px; }
.mu-list { display: grid; gap: 4px; max-height: 330px; overflow-y: auto; margin-bottom: 14px; padding: 4px; border-radius: 16px; background: #1b183008; }
.mu-row { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; }
.mu-viz { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.mu-row > :not(.mu-viz) { position: relative; }
.mu-row:hover { background: var(--white); border-color: #1b183026; }
.mu-row:focus-visible { outline: 3px solid var(--violet); outline-offset: 1px; }
.mu-row.is-on { background: var(--lime); border-color: var(--ink); }
.mu-play { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font-size: 12px; display: grid; place-items: center; cursor: pointer; }
.mu-play.is-playing { background: var(--ink); color: var(--lime); }
.mu-play.mu-none { border-style: dashed; border-color: #1b183040; color: #1b183060; cursor: default; }
.mu-name { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-mood { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #1b18300f; color: var(--ink-soft); }
.mu-row.is-on .mu-mood { background: #1b18301a; color: var(--ink); }
.mu-check { font-weight: 800; }
.ed-music-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ed-music-up input[type=file] { display: none; }
/* Prechody a farby: tlačidlá s ukážkou */
.ed-regen { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ed-regen .hint { grid-column: 1 / -1; margin: -6px 0 12px; }
.ed-motion-hint { display: block; margin: -8px 0 14px; }
.fx-thumb.cam { perspective: 300px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fx { display: grid; gap: 6px; padding: 5px 5px 7px; border: 2px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); font-family: inherit; font-weight: 700; font-size: 12px; line-height: 1.2; cursor: pointer; text-align: center; }
.fx:hover, .fx:focus-visible { border-color: var(--ink); }
.fx.is-on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--lime); }
.fx-thumb { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; background: #000; isolation: isolate; }
.fx-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#transition .fx-thumb img + img { opacity: 0; }
.fx-thumb.tall { aspect-ratio: 9 / 16; width: 62%; justify-self: center; }
.fx-thumb .fx-bg { filter: blur(5px) brightness(.9); transform: scale(1.15); }
.fx-thumb .fx-fg { object-fit: contain; }
#grade.fx-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.ed-list-tools .seg { flex: none; }
.ed-list-tools .seg button { padding: 8px 14px; white-space: nowrap; }
.ed-list-tools .seg { align-self: stretch; }
.acc .card > small.hint { display: block; margin-top: 8px; }
.ed-gen[hidden] { display: none; }

/* Posledná karta: fotka v pozadí (výber záberu) a šablóny textov */
.end-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px}
.end-photo{padding:0;border:2px solid transparent;border-radius:10px;overflow:hidden;background:none;cursor:pointer;aspect-ratio:1}
.end-photo img{width:100%;height:100%;object-fit:cover;display:block}
.end-photo.is-on{border-color:var(--ink);box-shadow:0 0 0 2px var(--lime) inset}
.end-templates{display:flex;gap:6px;flex-wrap:wrap}
.ly-bgpick { display: grid; gap: 8px; }
.ly-sub { display: grid; gap: 6px; font-size: 12px; font-weight: 700; padding-top: 6px; border-top: 1.5px solid var(--line); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ed-regen-box .hint { display: block; margin: 0 0 10px; }

.ed-np-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.ed-np-empty[hidden] { display: none; }
.ed-np-plan dd.is-hint { color: #8d889e; }
.ed-new .drop-text small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.ed-new .dropzone.is-compact .drop-text > span { display: none; }
.ed-email { color: inherit; text-decoration: none; }
.ed-email:hover { text-decoration: underline; }
/* Účet: medzera medzi úvodným textom karty a prvým poľom */
.acc .card > p.hint { margin-bottom: 18px; }
