/* =====================================================================
   EDYTOR SUPERKIDS — samodzielny CSS panelu edycji (inline CMS / „mini-Elementor")
   Ten plik definiuje WŁASNE zmienne (te, których motyw strony nie ma), aby panel
   wyglądał spójnie niezależnie od kolorystyki strony. Zmiennych WSPÓLNYCH z motywem
   (--ink, --line, --r, --pill, --shadow*, --ease-out) NIE nadpisujemy — dziedziczą
   z motywu SUPERKIDS, dzięki czemu panel jest „on-brand".
   ===================================================================== */
:root{
  --white:#ffffff;
  --panel:#f7f4f7;
  --panel-2:#efe9f0;
  --line-2:#e4dde6;
  --text-soft:#6f626c;
  --text-faint:#a094a0;
  --font-head:'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
/* przyciski panelu — niezależne od .btn strony (czysty, neutralny wygląd admina) */
.editor .btn, .ak-picker__box .btn{
  display:inline-flex; align-items:center; gap:8px; font-family:var(--font-body);
  font-weight:600; font-size:.86rem; line-height:1; cursor:pointer; text-decoration:none;
  padding:11px 16px; border-radius:var(--pill); border:1px solid var(--ink);
  background:var(--ink); color:#fff; box-shadow:none; transition:filter .2s, background .2s, color .2s, border-color .2s;
}
.editor .btn:hover, .ak-picker__box .btn:hover{ filter:brightness(1.1); transform:none; }
.editor .btn:active, .ak-picker__box .btn:active{ transform:none; }   /* zdejmij różowy shadow-red i „podskok" z .btn strony (style.css) — modal admina ma być neutralny */
.editor .btn--quiet, .ak-picker__box .btn--quiet{ background:var(--panel); color:var(--ink); border-color:var(--line-2); }
.editor .btn--quiet:hover, .ak-picker__box .btn--quiet:hover{ background:#fff; filter:none; border-color:var(--ink); }
.editor .btn--ghost, .ak-picker__box .btn--ghost{ background:transparent; color:var(--ink); border-color:var(--line-2); }
.editor .btn--ghost:hover, .ak-picker__box .btn--ghost:hover{ background:var(--panel); filter:none; }

/* =====================================================================
   TRYB EDYCJI — przycisk „Panel" + wysuwany edytor na hasło
   ===================================================================== */
.editor__scrim{ position:fixed; inset:0; z-index:139; background:rgba(20,26,32,.42); opacity:0; visibility:hidden; transition:opacity .35s, visibility .35s; backdrop-filter:blur(2px); }
.editor__scrim.open{ opacity:1; visibility:visible; }
.editor{ position:fixed; top:0; right:0; height:100%; width:min(430px,93vw); z-index:140; background:var(--white); border-left:1px solid var(--line); box-shadow:var(--shadow-lg); transform:translateX(103%); transition:transform .45s var(--ease-out); display:flex; flex-direction:column; }
.editor.open{ transform:none; }
.editor__head{ display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--line); }
.editor__head b{ font-family:var(--font-head); font-weight:500; font-size:1.12rem; color:var(--ink); letter-spacing:-.01em; }
.editor__x{ width:34px; height:34px; font-size:1.5rem; line-height:1; color:var(--text-soft); border-radius:var(--pill); }
.editor__x:hover{ background:var(--panel); color:var(--ink); }
.editor__body{ flex:1; overflow-y:auto; padding:22px 24px; }
.editor__hint{ font-size:.8rem; color:var(--text-soft); background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:12px 14px; margin-bottom:20px; line-height:1.65; }
.editor__hint code{ background:#fff; border:1px solid var(--line-2); border-radius:4px; padding:1px 5px; font-size:.92em; }
.editor__field{ margin-bottom:16px; }
.editor__field label{ display:block; font-size:.7rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--text-soft); margin-bottom:7px; }
.editor__field input, .editor__field textarea{ width:100%; font-family:inherit; font-size:.94rem; color:var(--ink); background:var(--panel); border:1px solid var(--line-2); border-radius:var(--r); padding:11px 13px; }
.editor__field textarea{ min-height:58px; resize:vertical; line-height:1.5; }
.editor__field input:focus, .editor__field textarea:focus{ outline:none; border-color:var(--ink); background:#fff; box-shadow:0 0 0 3px rgba(27,31,35,.08); }
.editor__msg{ color:#b3261e; font-size:.85rem; margin-top:10px; }
.editor__foot{ display:flex; flex-wrap:wrap; gap:10px; padding:18px 24px; border-top:1px solid var(--line); }
.editor__foot .btn{ flex:1 1 auto; justify-content:center; padding:12px 14px; font-size:.84rem; }
.editor__toast{ position:fixed; left:24px; bottom:84px; z-index:150; max-width:330px; background:var(--ink); color:#fff; padding:12px 18px; border-radius:var(--r); font-size:.84rem; line-height:1.45; box-shadow:var(--shadow); opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity .3s, transform .3s; }
.editor__toast.show{ opacity:1; transform:none; }
@media (max-width:560px){
  .editor__toast{ left:50%; transform:translateX(-50%) translateY(8px); bottom:74px; }
  .editor__toast.show{ transform:translateX(-50%); }
}
/* zakładki (Elementor-like) + media + historia */
.editor__tabs{ display:flex; gap:2px; padding:0 14px; border-bottom:1px solid var(--line); background:var(--panel); }
.ed-tab{ flex:1; padding:13px 6px; font-family:var(--font-body); font-weight:600; font-size:.8rem; color:var(--text-soft); border-bottom:2px solid transparent; transition:color .25s, border-color .25s, background .25s; }
.ed-tab:hover{ color:var(--ink); }
.ed-tab.on{ color:var(--ink); border-bottom-color:var(--ink); background:var(--white); }
.editor__toast.bad{ background:#b3261e; }
.editor__field input[type=text]{ width:100%; font-family:inherit; font-size:.94rem; color:var(--ink); background:var(--panel); border:1px solid var(--line-2); border-radius:var(--r); padding:11px 13px; }
.editor__field input[type=text]:focus{ outline:none; border-color:var(--ink); background:#fff; box-shadow:0 0 0 3px rgba(27,31,35,.08); }
.ed-sep{ border:0; border-top:1px solid var(--line); margin:22px 0 18px; }
.ed-media{ display:flex; gap:14px; align-items:center; padding:13px 0; border-bottom:1px solid var(--line); }
.ed-media__thumb{ width:84px; height:62px; flex:0 0 auto; border-radius:var(--r); border:1px solid var(--line-2); background-color:var(--panel-2); background-position:center; background-size:cover; background-repeat:no-repeat; }
.ed-media__r{ flex:1; min-width:0; }
.ed-media__lab{ font-size:.72rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--text-soft); margin-bottom:9px; }
.ed-up, .ed-ogup{ font-size:.8rem; padding:9px 14px; cursor:pointer; }
.ed-hist{ display:grid; gap:8px; }
.ed-hist__row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 13px; background:var(--panel); border:1px solid var(--line); border-radius:var(--r); font-size:.85rem; color:var(--text-soft); }
.ed-hist__row b{ color:var(--ink); }
.ed-hist__row .btn, .editor__foot .ed-logout{ flex:0 0 auto; }
.ed-hist__row .btn{ padding:8px 14px; font-size:.78rem; }
/* dyskretna kłódka panelu w stopce */
.ak-lock{ display:inline-flex; align-items:center; gap:7px; font-family:var(--font-body); font-size:.78rem; font-weight:500; letter-spacing:.04em; color:var(--text-faint); cursor:pointer; background:none; border:none; padding:0; transition:color .25s, opacity .25s; opacity:.7; }
.ak-lock svg{ width:14px; height:14px; }
.ak-lock:hover{ color:var(--ink); opacity:1; }
.ak-lock--float{ position:fixed; left:18px; bottom:14px; z-index:130; color:var(--text-soft); opacity:.85; }
/* przełącznik języka (publiczny, w nagłówku) */
.langswitch{ display:flex; gap:2px; margin-left:14px; border:1px solid var(--line); border-radius:var(--pill); padding:2px; background:rgba(255,255,255,.55); }
.langswitch button{ font-family:var(--font-body); font-weight:600; font-size:.72rem; letter-spacing:.05em; color:var(--text-soft); padding:5px 9px; border-radius:var(--pill); transition:color .25s, background .25s; }
.langswitch button:hover{ color:var(--ink); }
.langswitch button.on{ color:#fff; background:var(--ink); }
/* język edycji w panelu */
.editor__lang{ display:flex; align-items:center; gap:6px; padding:11px 24px; border-bottom:1px solid var(--line); font-size:.72rem; letter-spacing:.04em; text-transform:uppercase; color:var(--text-soft); background:var(--panel); }
.ed-lang{ font-weight:600; font-size:.75rem; padding:5px 11px; border:1px solid var(--line-2); border-radius:var(--pill); color:var(--text-soft); }
.ed-lang.on{ background:var(--ink); color:#fff; border-color:var(--ink); }
/* klik na grafikę w trybie edycji — sygnał daje nakładka .ak-imghint */
body.editing [data-edit-img]{ cursor:pointer; outline:none; }
/* sekcje: duplikuj / usuń */
.ed-sec{ position:relative; outline:1.5px dashed rgba(27,31,35,.32); outline-offset:6px; }
.ed-secctrl{ position:absolute; top:8px; right:8px; z-index:40; display:flex; gap:4px; }
.ed-secctrl button{ width:32px; height:32px; display:flex; align-items:center; justify-content:center; font-size:1rem; background:var(--ink); color:#fff; border:1px solid #fff; border-radius:8px; box-shadow:var(--shadow-sm); cursor:pointer; }
.ed-secctrl button:hover{ background:#2c333a; }
body.editing [data-edit-struct] [contenteditable]:focus{ outline:2px solid var(--ink); outline-offset:2px; border-radius:2px; }
@media (max-width:560px){ .langswitch{ margin-left:8px; } .editor__lang{ padding:11px 16px; } }
/* panel: wrapper + uchwyt szerokości */
.editor__wrap{ position:absolute; inset:0; display:flex; flex-direction:column; }
.editor__resizer{ position:absolute; top:0; left:-4px; width:10px; height:100%; cursor:ew-resize; z-index:6; }
.editor__resizer::after{ content:""; position:absolute; top:50%; left:4px; width:3px; height:44px; margin-top:-22px; background:var(--line-2); border-radius:3px; opacity:0; transition:opacity .2s; }
.editor__resizer:hover::after{ opacity:1; }
/* pływający pasek formatowania (inline) */
.editor__fab{ position:fixed; z-index:160; display:flex; align-items:center; gap:2px; background:var(--ink); color:#fff; padding:4px; border-radius:var(--pill); box-shadow:var(--shadow); }
.editor__fab button{ min-width:32px; height:30px; padding:0 9px; color:#fff; font-size:.82rem; font-weight:700; border-radius:var(--pill); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.editor__fab button:hover{ background:rgba(255,255,255,.18); }
.editor__fab .fabsep{ width:1px; height:18px; background:rgba(255,255,255,.24); margin:0 3px; }
/* edycja inline — klikalne teksty: subtelnie, tylko na hover/focus (minimalizm) */
body.editing [data-edit], body.editing [data-aedit], body.editing [data-hero-title], body.editing [data-count-edit]{ cursor:text; border-radius:3px; transition:background .18s, box-shadow .18s; }
body.editing [data-edit]:hover, body.editing [data-aedit]:hover, body.editing [data-hero-title]:hover, body.editing [data-count-edit]:hover{ background:rgba(27,31,35,.045); box-shadow:0 0 0 1px rgba(27,31,35,.16); }
body.editing [data-edit]:focus, body.editing [data-aedit]:focus, body.editing [data-hero-title]:focus, body.editing [data-count-edit]:focus{ outline:none; background:rgba(255,255,255,.65); box-shadow:0 0 0 2px var(--ink); }
.ed-secctrl button{ width:30px; }

/* ===== dolny pasek trybu edycji (wyraźne WŁ / WYŁ) ===== */
.ak-bar{ position:fixed; left:0; right:0; bottom:0; height:54px; z-index:135; display:flex; align-items:center; gap:14px; padding:0 16px; background:var(--ink); color:#fff; box-shadow:0 -10px 34px rgba(0,0,0,.22); }
.ak-bar__status{ display:flex; align-items:center; gap:9px; font-size:.82rem; font-weight:600; white-space:nowrap; }
.ak-bar__dot{ width:9px; height:9px; border-radius:50%; background:#37d98a; box-shadow:0 0 0 0 rgba(55,217,138,.6); animation:akpulse 2.2s infinite; }
.ak-bar__dot.off{ background:#8b929a; animation:none; box-shadow:none; }
@keyframes akpulse{ 0%{ box-shadow:0 0 0 0 rgba(55,217,138,.5);} 70%{ box-shadow:0 0 0 8px rgba(55,217,138,0);} 100%{ box-shadow:0 0 0 0 rgba(55,217,138,0);} }
.ak-bar__langs{ display:flex; gap:2px; margin-left:auto; border:1px solid rgba(255,255,255,.2); border-radius:var(--pill); padding:2px; }
.ak-bar__langs button{ color:rgba(255,255,255,.72); font-family:var(--font-body); font-weight:600; font-size:.73rem; letter-spacing:.05em; padding:5px 10px; border-radius:var(--pill); transition:background .2s, color .2s; }
.ak-bar__langs button:hover{ color:#fff; }
.ak-bar__langs button.on{ background:#fff; color:var(--ink); }
.ak-bar__act{ display:flex; align-items:center; gap:8px; }
.ak-bar__act button{ font-family:var(--font-body); font-weight:600; font-size:.82rem; color:#fff; padding:9px 15px; border-radius:var(--pill); border:1px solid rgba(255,255,255,.22); transition:background .2s, color .2s, border-color .2s; }
.ak-bar__act button:hover{ background:rgba(255,255,255,.12); }
.ak-bar__act .ak-save{ background:#fff; color:var(--ink); border-color:#fff; }
.ak-bar__act .ak-save:hover{ background:#e7e9eb; }
.ak-tgl{ display:inline-flex; align-items:center; gap:8px; }
.ak-tgl__sw{ position:relative; width:30px; height:17px; border-radius:9px; background:#37d98a; transition:background .2s; flex:0 0 auto; }
.ak-tgl__sw::after{ content:""; position:absolute; top:2px; left:15px; width:13px; height:13px; border-radius:50%; background:#fff; transition:left .2s; }
.ak-tgl[aria-pressed="false"] .ak-tgl__sw{ background:rgba(255,255,255,.28); }
.ak-tgl[aria-pressed="false"] .ak-tgl__sw::after{ left:2px; }
body.ak-auth{ padding-bottom:54px; }
body.ak-auth .totop{ display:none; }
body.ak-auth .ak-lock{ display:none; }
/* nakładka „Zmień zdjęcie" na grafice (pointer-events:none, by klik dotarł do obrazu) */
.ak-imghint{ position:fixed; z-index:125; display:flex; align-items:center; justify-content:center; pointer-events:none; border-radius:10px; background:rgba(18,22,26,.32); box-shadow:inset 0 0 0 2px rgba(255,255,255,.92), 0 0 0 1px rgba(27,31,35,.22); }
.ak-imghint__in{ display:inline-flex; align-items:center; gap:8px; background:rgba(18,22,26,.85); color:#fff; font-family:var(--font-body); font-size:.82rem; font-weight:600; letter-spacing:.02em; padding:8px 14px; border-radius:var(--pill); box-shadow:var(--shadow-sm); }
.ak-imghint__in svg{ width:18px; height:18px; }
/* responsywność paska */
@media (max-width:680px){
  .ak-bar{ flex-wrap:wrap; height:auto; min-height:54px; padding:8px 10px; gap:8px; }
  .ak-bar__lab{ display:none; }
  .ak-bar__langs{ order:2; }
  .ak-bar__act{ order:3; margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
  .ak-bar__act button{ padding:8px 11px; font-size:.78rem; }
  body.ak-auth{ padding-bottom:108px; }
}

/* ===== sterowanie tłem sekcji ===== */
.ed-bgctrl{ position:absolute; top:10px; right:10px; z-index:30; display:none; gap:5px; }
body.editing section:hover > .ed-bgctrl, body.editing footer:hover > .ed-bgctrl, .ed-bgctrl:hover{ display:flex; }
.ed-bgctrl button{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-body); font-size:.74rem; font-weight:600; color:#fff; background:rgba(20,24,28,.82); border:1px solid rgba(255,255,255,.25); border-radius:var(--pill); padding:6px 11px; cursor:pointer; }
.ed-bgctrl button[data-a="clear"]{ padding:6px 9px; font-size:1rem; line-height:1; }
.ed-bgctrl button:hover{ background:var(--ink); }
.ed-bgctrl svg{ width:14px; height:14px; }

/* ===== biblioteka mediów + uploader (picker i zakładka Media) ===== */
.ak-picker{ position:fixed; inset:0; z-index:170; display:flex; align-items:center; justify-content:center; background:rgba(16,19,23,.55); padding:20px; }
.ak-picker__box{ width:min(760px,96vw); max-height:88vh; display:flex; flex-direction:column; background:var(--white); border-radius:16px; box-shadow:var(--shadow); overflow:hidden; }
.ak-picker__head{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--line); font-family:var(--font-head); font-weight:600; }
.ak-picker__x{ font-size:1.5rem; line-height:1; color:var(--text-soft); cursor:pointer; background:none; border:none; }
.ak-picker__x:hover{ color:var(--ink); }
.ak-picker__body{ padding:18px 20px; overflow:auto; }
/* modal wstawiania linku */
.ak-linkbox{ width:min(460px,96vw); }
.ak-lm-lab{ display:block; font-size:.72rem; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--text-soft); margin-bottom:8px; }
.ak-lm-row{ display:flex; gap:8px; }
.ak-lm-url{ flex:1; min-width:0; font-family:inherit; font-size:.95rem; color:var(--ink); background:var(--panel); border:1px solid var(--line-2); border-radius:var(--r); padding:11px 13px; }
.ak-lm-url:focus{ outline:none; border-color:var(--ink); background:#fff; box-shadow:0 0 0 3px rgba(27,31,35,.08); }
.ak-lm-go{ flex:0 0 auto; padding:11px 18px; }
.ak-lm-or{ display:flex; align-items:center; gap:12px; margin:16px 0; color:var(--text-faint); font-size:.76rem; letter-spacing:.05em; text-transform:uppercase; }
.ak-lm-or::before, .ak-lm-or::after{ content:""; flex:1; height:1px; background:var(--line); }
.ak-lm-file{ width:100%; justify-content:center; gap:8px; }
.ak-lm-unlink{ display:block; width:100%; margin-top:16px; background:none; border:none; color:var(--text-soft); font-size:.82rem; text-decoration:underline; cursor:pointer; }
.ak-lm-unlink:hover{ color:#b3261e; }
.ak-up{ display:flex; align-items:center; gap:14px; padding:18px; border:2px dashed var(--line-2); border-radius:var(--r); background:var(--panel); cursor:pointer; transition:border-color .2s, background .2s; }
.ak-up:hover, .ak-up:focus{ border-color:var(--ink); outline:none; }
.ak-up.drag{ border-color:var(--ink); background:#fff; }
.ak-up svg{ width:30px; height:30px; flex:0 0 auto; color:var(--ink); }
.ak-up b{ color:var(--ink); }
.ak-up__hint{ font-size:.76rem; color:var(--text-soft); }
.ak-uprog{ display:grid; gap:7px; margin:12px 0 0; }
.ak-uprow{ display:grid; grid-template-columns:1fr 120px 44px; align-items:center; gap:10px; font-size:.78rem; color:var(--text-soft); }
.ak-uprow__n{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ak-uprow__bar{ height:7px; background:var(--line); border-radius:6px; overflow:hidden; }
.ak-uprow__bar i{ display:block; height:100%; width:0; background:var(--ink); transition:width .2s; }
.ak-uprow.ok .ak-uprow__bar i{ background:#37a06a; }
.ak-uprow.bad .ak-uprow__bar i{ background:#b3261e; }
.ak-uprow__p{ text-align:right; font-variant-numeric:tabular-nums; }
.ak-medhead{ margin:20px 0 12px; font-family:var(--font-head); font-size:.95rem; color:var(--ink); font-weight:600; }
.ak-medcount{ color:var(--text-faint); font-weight:400; }
.ak-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:12px; }
.ak-tile{ position:relative; margin:0; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:var(--panel-2); cursor:pointer; transition:border-color .2s, transform .12s; }
.ak-tile:hover{ border-color:var(--ink); transform:translateY(-2px); }
.ak-tile img{ width:100%; height:90px; object-fit:cover; display:block; }
.ak-tile figcaption{ font-size:.66rem; color:var(--text-soft); padding:6px 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ak-tile__x{ position:absolute; top:5px; right:5px; width:22px; height:22px; border-radius:50%; background:rgba(20,24,28,.78); color:#fff; font-size:1rem; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; border:none; opacity:0; transition:opacity .15s; }
.ak-tile:hover .ak-tile__x{ opacity:1; }
.ak-tile__x:hover{ background:#b3261e; }
.ak-tile__file{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; height:90px; background:var(--panel); color:var(--text-soft); }
.ak-tile__file svg{ width:30px; height:30px; }
.ak-tile__file b{ font-size:.58rem; text-transform:uppercase; letter-spacing:.1em; color:var(--ink); }
.ak-tile--file:hover .ak-tile__file{ background:#fff; }
/* w trybie edycji linki wyglądają na edytowalne, nie klikalne */
body.editing a[data-aedit]{ cursor:text; }
@media (max-width:560px){ .ak-grid{ grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); } .ak-uprow{ grid-template-columns:1fr 80px 40px; } }
/* pager biblioteki mediów */
.ak-pager{ display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px; font-size:.8rem; color:var(--text-soft); }
.ak-pager:empty{ display:none; }
.ak-pg{ font-family:var(--font-body); font-weight:600; font-size:.78rem; color:var(--ink); background:var(--panel); border:1px solid var(--line-2); border-radius:var(--pill); padding:7px 14px; cursor:pointer; transition:background .2s, border-color .2s; }
.ak-pg:hover:not([disabled]){ border-color:var(--ink); background:var(--white); }
.ak-pg[disabled]{ opacity:.4; cursor:default; }
/* zakładka Poczta */
.grid-2-ed{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.editor__field select{ width:100%; font-family:inherit; font-size:.94rem; color:var(--ink); background:var(--panel); border:1px solid var(--line-2); border-radius:var(--r); padding:11px 13px; cursor:pointer; }
.editor__field select:focus{ outline:none; border-color:var(--ink); background:#fff; box-shadow:0 0 0 3px rgba(27,31,35,.08); }
.ed-mailbtns{ display:flex; gap:10px; margin-top:4px; }
.ed-mailbtns .btn{ flex:1; justify-content:center; padding:11px 14px; font-size:.84rem; }
@media (max-width:560px){ .grid-2-ed{ grid-template-columns:1fr; } }

/* ===== galeria ikon ===== */
.ak-iconpick .ak-picker__box{ width:min(620px,96vw); }
.ak-icongrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(58px,1fr)); gap:8px; }
.ak-iconbtn{ display:flex; align-items:center; justify-content:center; aspect-ratio:1; border:1px solid var(--line); border-radius:var(--r); background:var(--panel); color:var(--ink); cursor:pointer; transition:border-color .15s, transform .1s, background .15s; }
.ak-iconbtn:hover{ border-color:var(--ink); background:#fff; transform:translateY(-2px); }
.ak-iconbtn svg{ width:24px; height:24px; }
/* ===== edytor haseł hero ===== */
.ed-herobox{ background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:14px; margin-bottom:4px; }
.ed-herohead{ font-family:var(--font-head); font-weight:600; font-size:.92rem; color:var(--ink); margin-bottom:4px; }
/* ===== usuwanie sekcji ===== */
.ed-bgctrl .ed-del{ background:rgba(120,30,28,.85); }
.ed-bgctrl .ed-del:hover{ background:#b3261e; }
body.editing .ak-hiddensec{ opacity:.42; outline:2px dashed rgba(179,38,30,.55); outline-offset:-4px; }
body.editing .ak-hiddensec::after{ content:"SEKCJA UKRYTA"; position:absolute; top:10px; left:50%; transform:translateX(-50%); z-index:31; background:#b3261e; color:#fff; font:600 .68rem/1 var(--font-body); letter-spacing:.08em; padding:6px 11px; border-radius:var(--pill); pointer-events:none; }
/* ===== pasek przewijany — pauza i edycja w trybie edycji ===== */
body.editing .marquee__track{ animation-play-state:paused; }
body.editing .tape__item{ cursor:text; }

/* ===== zakładka SEO: piksele i analityka ===== */
.ed-trk__h{ font-family:var(--font-head); font-weight:700; font-size:1rem; color:var(--ink); margin:2px 0 2px; }
.ed-trk__sub{ font-weight:400; font-size:.78rem; color:var(--text-soft); }
.ed-trk__grp{ background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:13px 14px; margin:12px 0; }
.ed-trk__grp > b{ display:block; font-size:.82rem; color:var(--ink); margin-bottom:10px; letter-spacing:.01em; }
.ed-trk__ev{ font-size:.8rem; color:var(--text-soft); margin:10px 0; line-height:2; }
.ed-trk__ev label, .ed-trk__big{ display:inline-flex; align-items:center; gap:6px; margin-right:10px; cursor:pointer; color:var(--ink); }
.ed-trk__big{ font-size:.86rem; }
.ed-trk .editor__field label input[type=checkbox], .ed-trk__ev input, .ed-trk__big input{ width:auto; margin:0; accent-color:var(--ink); }
.ed-trk .editor__field label{ text-transform:none; letter-spacing:0; font-weight:500; font-size:.8rem; color:var(--ink); display:inline-flex; align-items:center; gap:7px; }
.ed-mini{ display:inline-block; margin-top:7px; background:none; border:0; color:#b3261e; font-size:.76rem; cursor:pointer; text-decoration:underline; padding:0; }

/* ===== baner zgody RODO (cookie/piksele) ===== */
.ak-consent{ position:fixed; left:14px; right:14px; bottom:14px; z-index:9990; background:var(--ink); color:#fff; border-radius:14px; box-shadow:0 18px 50px rgba(0,0,0,.3); animation:akConsentIn .35s ease; }
@keyframes akConsentIn{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
.ak-consent__in{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding:14px 18px; max-width:1100px; margin:0 auto; }
.ak-consent__txt{ flex:1; min-width:240px; margin:0; font-size:.86rem; line-height:1.55; color:rgba(255,255,255,.92); }
.ak-consent__txt a{ color:#fff; text-decoration:underline; }
.ak-consent__btns{ display:flex; gap:10px; flex-shrink:0; }
.ak-consent__btns button{ font-family:inherit; font-size:.84rem; font-weight:600; border-radius:999px; padding:10px 18px; cursor:pointer; border:1px solid rgba(255,255,255,.4); }
.ak-consent__no{ background:transparent; color:#fff; }
.ak-consent__no:hover{ background:rgba(255,255,255,.12); }
.ak-consent__yes{ background:#fff; color:var(--ink); border-color:#fff; }
.ak-consent__yes:hover{ filter:brightness(.94); }
@media (max-width:560px){ .ak-consent__in{ padding:13px 15px; } .ak-consent__btns{ width:100%; } .ak-consent__btns button{ flex:1; } }

/* =====================================================================
   SUPERKIDS — rozszerzenia „mini-Elementor": etykiety sekcji, harmonogram,
   pasek narzędzi sekcji, podgląd urządzeń, zakładka „Sekcje"
   ===================================================================== */

/* widoczność elementów animowanych w trybie edycji (superkids: .reveal = opacity:0 do scrolla) */
body.editing .reveal{ opacity:1 !important; transform:none !important; }

/* wyraźny podział na sekcje + etykieta (tylko w edycji) */
body.editing main#main > section[data-ak-id]{ outline:1.5px dashed rgba(216,60,108,.35); outline-offset:-6px; }
body.editing main#main > section[data-ak-id]:hover{ outline-color:rgba(216,60,108,.7); }
body.editing main#main > section[data-ak-id]::before{
  content:attr(data-ak-label); position:absolute; top:0; left:0; z-index:28;
  background:var(--ink); color:#fff; font:600 .66rem/1.4 var(--font-body); letter-spacing:.02em;
  padding:5px 10px; border-radius:0 0 9px 0; pointer-events:none; max-width:62%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; opacity:.85;
}
/* sekcja zaplanowana harmonogramem (widoczna w edycji, oznaczona) */
body.editing .ak-schedhidden{ outline:2px dashed rgba(224,118,31,.7) !important; outline-offset:-4px; }
.ak-schedbadge{ position:absolute; top:10px; left:50%; transform:translateX(-50%); z-index:31;
  background:#e0761f; color:#fff; font:600 .68rem/1 var(--font-body); letter-spacing:.02em;
  padding:6px 11px; border-radius:var(--pill); pointer-events:none; box-shadow:var(--shadow-sm); white-space:nowrap; }

/* pasek narzędzi sekcji — czytelniejszy, zawijany */
.ed-bgctrl{ flex-wrap:wrap; max-width:min(94vw,560px); justify-content:flex-end; }
.ed-bgctrl button.is-on{ background:#e0761f; border-color:#fff; }
.ed-bgctrl button[data-a="dup"], .ed-bgctrl button[data-a="add"], .ed-bgctrl button[data-a="sched"], .ed-bgctrl button[data-a="pad"]{ padding:6px 10px; font-size:.92rem; line-height:1; }
.ed-bgcolswatch{ display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:var(--pill); overflow:hidden; border:1px solid rgba(255,255,255,.45); background:rgba(20,24,28,.82); cursor:pointer; padding:0; }
.ed-bgcolswatch input[type=color]{ width:42px; height:42px; border:0; padding:0; background:none; cursor:pointer; }

/* pasek inline — próbnik koloru + przyciski wyrównania */
.editor__fab .fabcol{ display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:var(--pill); overflow:hidden; cursor:pointer; }
.editor__fab .fabcol input[type=color]{ width:40px; height:40px; border:0; padding:0; background:none; cursor:pointer; }
.editor__fab button[data-a="alignl"], .editor__fab button[data-a="alignc"], .editor__fab button[data-a="alignr"]{ font-size:.9rem; }

/* modal harmonogramu */
.ak-sched-r{ display:flex; align-items:center; gap:8px; margin:4px 0; font-size:.9rem; color:var(--ink); text-transform:none; letter-spacing:0; font-weight:500; cursor:pointer; }
.ak-sched-r input{ width:auto; margin:0; accent-color:var(--ink); }
.ak-schedmodal .ak-picker__box, .ak-padmodal .ak-picker__box, .ak-addsec .ak-picker__box{ width:min(520px,96vw); }
input[type="datetime-local"]{ width:100%; font-family:inherit; font-size:.94rem; color:var(--ink); background:var(--panel); border:1px solid var(--line-2); border-radius:var(--r); padding:10px 12px; }

/* biblioteka bloków (dodaj sekcję) */
.ak-tplgrid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ak-tplbtn{ text-align:left; padding:16px 14px; border:1px solid var(--line-2); border-radius:var(--r); background:var(--panel); color:var(--ink); cursor:pointer; transition:border-color .15s, background .15s, transform .1s; }
.ak-tplbtn:hover{ border-color:var(--ink); background:#fff; transform:translateY(-2px); }
.ak-tplbtn b{ font-family:var(--font-head); font-size:.95rem; }

/* modal odstępów */
.ak-padrow{ display:flex; flex-wrap:wrap; gap:6px; }
.ak-padbtn{ flex:1 1 auto; min-width:48px; padding:9px 10px; border:1px solid var(--line-2); border-radius:var(--pill); background:var(--panel); color:var(--ink); font-weight:600; font-size:.82rem; cursor:pointer; }
.ak-padbtn:hover{ border-color:var(--ink); background:#fff; }
.ak-padbtn--reset{ color:var(--text-soft); }

/* zakładka „Sekcje" — nawigator */
.ed-seclist{ display:grid; gap:9px; }
.ed-secrow{ border:1px solid var(--line); border-radius:var(--r); padding:11px 12px; background:var(--panel); }
.ed-secrow__t{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ed-secname{ flex:1 1 140px; min-width:0; font-family:inherit; font-size:.9rem; color:var(--ink); background:#fff; border:1px solid var(--line-2); border-radius:10px; padding:8px 10px; }
.ed-secname:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(27,31,35,.08); }
.ed-secrow__b{ display:flex; gap:6px; margin-top:9px; flex-wrap:wrap; }
.ed-mini2{ font-family:var(--font-body); font-weight:600; font-size:.76rem; color:var(--ink); background:#fff; border:1px solid var(--line-2); border-radius:var(--pill); padding:7px 12px; cursor:pointer; transition:border-color .15s, background .15s; }
.ed-mini2:hover{ border-color:var(--ink); background:var(--panel); }
.ak-stat{ font-size:.68rem; font-weight:700; letter-spacing:.04em; padding:3px 8px; border-radius:var(--pill); white-space:nowrap; }
.ak-stat--on{ background:#d8f6e8; color:#1f7a52; }
.ak-stat--off{ background:#fde0e0; color:#b3261e; }
.ak-stat--sch{ background:#ffe7d3; color:#a8520a; }
.ak-stat--dup{ background:#e8e2f0; color:#5a3b8a; }

/* podświetlenie sekcji po „Pokaż" */
@keyframes akFlash{ 0%{ box-shadow:inset 0 0 0 3px rgba(216,60,108,.8);} 100%{ box-shadow:inset 0 0 0 3px rgba(216,60,108,0);} }
.ak-flash{ animation:akFlash 1.5s ease; }

/* przełącznik podglądu urządzeń (dolny pasek) */
.ak-bar__vp{ display:flex; gap:3px; margin-left:auto; border:1px solid rgba(255,255,255,.2); border-radius:var(--pill); padding:2px; }
.ak-bar__vp button{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:30px; color:rgba(255,255,255,.72); border-radius:var(--pill); transition:background .2s, color .2s; }
.ak-bar__vp button svg{ width:17px; height:17px; }
.ak-bar__vp button:hover{ color:#fff; }
.ak-bar__vp button.on{ background:#fff; color:var(--ink); }
.ak-bar__langs + .ak-bar__vp{ margin-left:10px; }
/* gdy obecny jest przełącznik języków, podgląd nie przejmuje marginesu */
.ak-bar__langs ~ .ak-bar__vp{ margin-left:10px; }

/* WIERNY podgląd responsywny — strona w ramce iframe (realna szerokość → media-queries działają) */
.ak-devframe{ position:fixed; left:0; right:0; top:0; bottom:54px; z-index:128; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; background:rgba(28,18,28,.62); backdrop-filter:blur(3px); }
.ak-devframe__head{ display:flex; align-items:center; gap:12px; color:#fff; font-family:var(--font-body); }
.ak-devframe__lab{ font-weight:700; font-size:.92rem; }
.ak-devframe__note{ font-size:.74rem; opacity:.7; }
.ak-devframe__x{ width:30px; height:30px; font-size:1.4rem; line-height:1; color:#fff; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.3); border-radius:50%; cursor:pointer; }
.ak-devframe__x:hover{ background:rgba(255,255,255,.28); }
.ak-devframe__dev{ background:#fff; border-radius:26px; padding:10px; box-shadow:0 40px 100px rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.12); overflow:hidden; max-width:calc(100vw - 32px); }
.ak-devframe__dev iframe{ display:block; border:0; width:100%; height:100%; border-radius:18px; background:#fff; }
@media (max-width:680px){ .ak-bar__vp{ order:1; } .ak-devframe__dev{ border-radius:18px; padding:6px; } }

/* sekcja zarządzana przez most MCP (Antigravity) */
.ak-stat--ai{ background:#e6f0ff; color:#1b54b8; }
body.editing section[data-ak-ai]{ outline:2px solid rgba(27,84,184,.55) !important; outline-offset:-4px; }
body.editing section[data-ak-ai]::after{ content:"AI"; position:absolute; top:8px; right:8px; z-index:31; background:#1b54b8; color:#fff; font:700 .6rem/1 var(--font-body); letter-spacing:.08em; padding:5px 8px; border-radius:8px; pointer-events:none; }

/* =====================================================================
   WYGODA — niezapisane zmiany, cofanie, przeciąganie sekcji, szukajka mediów
   ===================================================================== */

/* przycisk Zapisz sygnalizuje niezapisane zmiany (pomarańczowy puls) */
.ak-bar__act .ak-save.attn{ background:#e0761f; color:#fff; border-color:#e0761f; animation:akSavePulse 1.6s ease-in-out infinite; }
.ak-bar__act .ak-save.attn:hover{ background:#c9660f; }
.editor .ed-save.attn{ background:#e0761f; border-color:#e0761f; animation:akSavePulse 1.6s ease-in-out infinite; }
@keyframes akSavePulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(224,118,31,.45); } 50%{ box-shadow:0 0 0 7px rgba(224,118,31,0); } }

/* przycisk Cofnij w dolnym pasku */
.ak-bar__act .ak-undo[disabled]{ opacity:.38; cursor:default; }
.ak-bar__act .ak-undo[disabled]:hover{ background:none; }

/* uchwyt przeciągania + stany drag w zakładce „Sekcje" */
.ed-draghandle{ flex:0 0 auto; cursor:grab; color:var(--text-faint); font-size:1.05rem; line-height:1; padding:6px 4px; border-radius:8px; user-select:none; letter-spacing:-.08em; }
.ed-draghandle:hover{ color:var(--ink); background:#fff; }
.ed-draghandle:active{ cursor:grabbing; }
.ed-secrow.dragging{ opacity:.45; }
.ed-secrow.dragover{ border-color:var(--ink); box-shadow:0 0 0 2px rgba(27,31,35,.14); position:relative; }
.ed-secrow.dragover::before{ content:""; position:absolute; left:10px; right:10px; top:-6px; height:3px; border-radius:2px; background:#d83c6c; }

/* szukajka w bibliotece mediów */
.ak-medhead{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ak-medsearch{ margin-left:auto; flex:0 1 190px; min-width:120px; font-family:inherit; font-size:.82rem; color:var(--ink); background:#fff; border:1px solid var(--line-2); border-radius:var(--pill); padding:7px 12px; }
.ak-medsearch:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(27,31,35,.08); }

/* przycisk „wyczyść formatowanie" w pasku inline */
.editor__fab button[data-a="clean"]{ font-size:.78rem; font-weight:700; }

/* =====================================================================
   Zakładka „Strony" — edycja menu, dodawanie/ukrywanie stron
   ===================================================================== */
.ak-hint-warn{ color:#c9660f; font-weight:700; }
.ed-menulist, .ed-pagelist{ display:grid; gap:8px; margin-bottom:10px; }
.ed-menurow{ border:1px solid var(--line); border-radius:var(--r); padding:10px 11px; background:var(--panel); }
.ed-menurow__t{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.ed-menu-label{ flex:1 1 150px; min-width:0; font-family:inherit; font-size:.9rem; color:var(--ink); background:#fff; border:1px solid var(--line-2); border-radius:10px; padding:8px 10px; }
.ed-menu-label:focus, .ed-menu-href:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(27,31,35,.08); }
.ed-menu-href{ width:100%; margin-top:7px; font-family:inherit; font-size:.84rem; color:var(--ink); background:#fff; border:1px solid var(--line-2); border-radius:10px; padding:7px 10px; }
.ed-menu-page{ margin-top:6px; font-size:.78rem; color:var(--text-soft); }
.ed-menu-page code, .ed-pagerow code{ background:#fff; border:1px solid var(--line-2); border-radius:6px; padding:1px 6px; font-size:.76rem; color:var(--ink); }
.ed-menurow__b, .ed-pagerow__b{ display:flex; gap:6px; margin-top:9px; flex-wrap:wrap; }
.ed-addrow{ display:flex; gap:8px; flex-wrap:wrap; margin:4px 0 6px; }
.ed-addrow .btn{ flex:0 1 auto; padding:9px 14px; font-size:.82rem; }
.ed-pagerow{ border:1px solid var(--line); border-radius:var(--r); padding:10px 11px; background:#fff; }
.ed-pagerow__t{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.ed-newpage{ display:flex; align-items:flex-end; gap:8px; margin-top:12px; padding:12px; border:1px dashed var(--line-2); border-radius:var(--r); background:var(--panel); }
.ed-newpage .editor__field{ flex:1; margin:0; }
.ed-newpage .btn{ flex:0 0 auto; padding:11px 16px; }
.ed-menu-del, .ed-pg-del{ color:#b3261e; }
.ed-menu-del:hover, .ed-pg-del:hover{ border-color:#b3261e; background:#fde9e9; }

/* =====================================================================
   FILMY — blok wideo (YouTube/Vimeo/Drive) zamiast/obok zdjęcia
   ===================================================================== */
.ak-video{ position:relative; width:100%; }
.ak-video__frame{ position:relative; width:100%; aspect-ratio:16/9; border-radius:var(--r-lg,20px); overflow:hidden; box-shadow:var(--shadow,0 18px 40px rgba(0,0,0,.12)); background:#000; }
.ak-video__frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
.ak-video__link{ display:inline-flex; align-items:center; gap:8px; padding:12px 18px; border-radius:999px; background:var(--ink,#1b1f23); color:#fff; text-decoration:none; font-weight:600; font-size:.9rem; }
.ak-video__link:hover{ filter:brightness(1.1); }
.ak-video__play{ display:inline-flex; align-items:center; justify-content:center; font-size:.8em; }
/* stan pusty — widoczny tylko w edycji (dla gościa pusty placeholder nie zajmuje miejsca) */
.ak-video__empty{ display:none; }
body.editing .ak-video--empty{ display:block; }
body.editing .ak-video--empty .ak-video__empty{ display:flex; align-items:center; justify-content:center; gap:10px; width:100%; aspect-ratio:16/9; border:2px dashed rgba(216,60,108,.5); border-radius:var(--r-lg,20px); color:#b3261e; font-weight:700; font-size:1rem; background:rgba(216,60,108,.05); }
body.editing .ak-video--empty .ak-video__play{ font-size:1.4rem; }
/* w edycji: klik w film otwiera modal (iframe nie przechwytuje kliknięć), wyraźny hover */
body.editing .ak-video{ cursor:pointer; }
body.editing .ak-video--set{ outline:2px solid transparent; outline-offset:3px; transition:outline-color .15s; }
body.editing .ak-video--set:hover{ outline-color:rgba(216,60,108,.6); }
body.editing .ak-video iframe{ pointer-events:none; }
body.editing .ak-video--set::after{ content:"▶ Kliknij, aby zmienić film"; position:absolute; top:8px; left:8px; z-index:5; background:var(--ink,#1b1f23); color:#fff; font:600 .7rem/1 var(--font-body,sans-serif); padding:6px 10px; border-radius:8px; pointer-events:none; opacity:.9; }

/* pasek „film zamiast zdjęcia" w pickerze */
.ak-vidbar{ display:block; width:100%; text-align:left; margin:10px 0 2px; padding:12px 14px; border:1px dashed var(--line-2); border-radius:var(--r); background:var(--panel); color:var(--ink); font-size:.86rem; cursor:pointer; transition:border-color .15s, background .15s; }
.ak-vidbar:hover{ border-color:var(--ink); background:#fff; }
.ak-vidbar .ak-video__play{ color:#b3261e; margin-right:4px; }

/* opis szablonu w „Dodaj sekcję" */
.ak-tplbtn small{ display:block; margin-top:3px; font-family:var(--font-body); font-weight:400; font-size:.76rem; color:var(--text-soft); }

/* ładny modal potwierdzenia (zamiast systemowego confirm) */
.ak-confirm .ak-picker__box{ width:min(440px,94vw); }
.ak-cf__msg{ margin:2px 0 18px; font-size:.95rem; line-height:1.65; color:var(--ink); }
.ak-cf__msg b{ color:inherit; }                 /* zwykłe <b> (nazwa pliku, nazwa galerii) — bez czerwieni */
.ak-cf__msg .ak-cf__warn{ color:#b3261e; }      /* czerwień tylko dla faktycznego ostrzeżenia (np. „nadpisane") */
.ak-cf__btns{ display:flex; gap:10px; justify-content:flex-end; }
.ak-cf__btns .btn{ padding:11px 20px; }
.ak-picker__box .ak-cf__ok--danger{ background:#b3261e; border-color:#b3261e; color:#fff; }
.ak-picker__box .ak-cf__ok--danger:hover{ filter:none; background:#9c1f18; }
