/* ============================================================
   EDITOR SETOV (`editor.html`) - tri stlpce: zoznam kusov, 3D, vyber.
   Premenne (farby) su z `app.css`.
   ============================================================ */
body.ed { margin:0; height:100vh; overflow:hidden; display:flex; flex-direction:column;
          background:var(--surf); color:var(--ink);
          font:13px/1.4 ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body.ed button { font:inherit; }

/* hlavicka webu (`menu.css`) je v editore obycajny riadok nad pasom nastrojov -
   telo je flex na celu vysku okna, `sticky` tu netreba */
body.ed #site { position:relative; flex:0 0 auto; }
/* editor je appka na celu sirku okna - hlavicka sa nestahuje do stredu */
body.ed #site .in { max-width:none; padding:0 14px; }
#edTop { flex:0 0 auto; display:flex; align-items:center; gap:14px; padding:10px 14px;
         background:var(--panel); border-bottom:1px solid var(--hair); }
#edTop .spat { display:inline-flex; align-items:center; gap:6px; padding:0 12px 0 8px; height:36px;
               border-radius:2rem; background:var(--surf); color:var(--ink); text-decoration:none;
               font-weight:700; }
#edTop .spat:hover { background:var(--surf-hi); }
#edTop .spat svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.4;
                   stroke-linecap:round; stroke-linejoin:round; }
#edTop .tt { display:flex; align-items:baseline; gap:10px; min-width:0; }
#edTop .tt b { font-size:16px; white-space:nowrap; }
#edTop #edMeno { width:14em; min-width:6em; height:28px; padding:0 8px; margin:0 -8px 0 -4px; border:1px solid transparent;
                 border-radius:8px; background:none; color:var(--muted); font:inherit; text-overflow:ellipsis; }
#edTop #edMeno:hover { border-color:var(--surf-hi); }
#edTop #edMeno:focus { outline:0; border-color:var(--surf-hi); background:var(--panel); color:var(--ink); }
#edTop #edMeno[hidden] { display:none; }
#edTop #edMeta { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#edTop .nastr { margin-left:auto; display:flex; align-items:center; gap:8px; }
#edTop .nastr button { display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 16px;
                       border-radius:2rem; cursor:pointer; font-weight:700; }
#edTop .nastr .ik { width:36px; padding:0; justify-content:center; border:0; background:var(--surf); }
#edTop .nastr .ik:hover:not(:disabled) { background:var(--surf-hi); }
#edTop .nastr svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2.2;
                    stroke-linecap:round; stroke-linejoin:round; }
#edTop .nastr .sec { border:1px solid var(--surf-hi); background:var(--panel); color:var(--ink); }
#edTop .nastr .sec:hover:not(:disabled) { background:var(--surf); }
#edTop .nastr .prim { border:0; background:var(--acc); color:#fff; }
#edTop .nastr .prim:hover:not(:disabled) { background:var(--acc-dark); }
#edTop .nastr button:disabled { opacity:.4; cursor:default; }
#edTop .nastr button.done { background:var(--ink); color:#fff; }

#edMain { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:280px minmax(0, 1fr) 290px; }

/* ---- vlavo: zoznam ---- */
#edLeft { display:flex; flex-direction:column; min-height:0; background:var(--panel);
          border-right:1px solid var(--hair); }
#edLeft .hl { position:relative; margin:12px 12px 8px; }
#edLeft .hl svg { position:absolute; left:11px; top:50%; transform:translateY(-50%); width:16px; height:16px;
                  fill:none; stroke:var(--muted); stroke-width:2.2; stroke-linecap:round; }
#edLeft .hl input { width:100%; box-sizing:border-box; height:38px; border:0; border-radius:2rem;
                    padding:0 12px 0 34px; background:var(--surf); color:var(--ink); font:inherit; }
#edLeft .hl input:focus { outline:2px solid var(--acc); outline-offset:1px; }
#edLeft .vyb { display:flex; gap:6px; margin:0 12px 8px; }
#edLeft .vyb button { flex:1; height:28px; border:0; border-radius:9px; cursor:pointer;
                      background:var(--surf); color:var(--ink); font-weight:600; font-size:12px; }
#edLeft .vyb button:hover { background:var(--surf-hi); }
#edList { flex:1 1 auto; min-height:0; overflow:auto; padding:0 6px 12px; }
#edList label { display:flex; align-items:center; gap:7px; min-width:0; flex:1; cursor:pointer; }
#edList input { accent-color:#d81b8c; flex:0 0 auto; margin:0; }
#edList em { font-style:normal; color:var(--muted); font-variant-numeric:tabular-nums; margin-left:6px; }
#edList .sk { display:flex; align-items:center; padding:10px 8px 6px; margin-top:4px;
              border-top:1px solid var(--hair); }
#edList .sk b { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
#edList .dr { display:flex; align-items:center; gap:2px; padding:3px 8px 3px 2px; border-radius:8px; }
#edList .dr:hover { background:var(--surf); }
#edList .dr span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#edList .ro { width:20px; height:20px; border:0; background:none; cursor:pointer; color:var(--muted);
              padding:0; flex:0 0 auto; }
#edList .ks { padding:2px 8px 2px 30px; }
#edList .ks small { color:var(--muted); font-variant-numeric:tabular-nums; }
#edList .prazdne { color:var(--muted); padding:12px; }

/* ---- stred: 3D ---- */
#edStage { position:relative; min-width:0; min-height:0; background:#1a1c1e; }
#edCv { position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; }
#edRect { position:absolute; z-index:5; border:1.5px dashed #ffd34d; background:rgba(255,211,77,.12);
          pointer-events:none; }
#edRect[hidden] { display:none; }
#edEmpty { position:absolute; inset:0; display:grid; place-items:center; background:var(--surf); }
#edEmpty[hidden] { display:none; }
#edEmpty .drop { display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
                 padding:36px 40px 28px; border-radius:20px; border:2px dashed var(--surf-hi);
                 background:var(--panel); max-width:420px; }
body.drop #edEmpty .drop { border-color:var(--acc); }
#edEmpty .drop svg { width:40px; height:40px; fill:none; stroke:#d81b8c; stroke-width:1.8;
                     stroke-linecap:round; stroke-linejoin:round; margin-bottom:4px; }
#edEmpty .drop b { font-size:16px; }
#edEmpty .drop span { color:var(--muted); margin-bottom:10px; }
#edEmpty .btns { display:flex; flex-direction:column; gap:8px; align-items:center; }
#edEmpty .btns button { border-radius:2rem; min-height:42px; padding:0 22px; cursor:pointer; font-weight:700; }
#edEmpty .btns .prim { border:0; background:var(--acc); color:#fff; }
#edEmpty .btns .sec { border:1px solid var(--surf-hi); background:var(--panel); color:var(--ink); }
#edEmpty .btns [hidden] { display:none; }

#edTools { position:absolute; z-index:4; left:12px; top:12px; display:flex; gap:8px; }
#edTools[hidden] { display:none; }
#edTools .seg { display:flex; gap:3px; padding:3px; border-radius:12px; background:rgba(16,18,20,.82);
                backdrop-filter:blur(10px); }
#edTools .seg button, #edTools .tg { height:30px; border:0; border-radius:9px; padding:0 12px; cursor:pointer;
                  background:none; color:#e9e6e0; font-weight:600; font-size:12.5px; }
#edTools .seg button.on { background:#e9e6e0; color:#1a1c1e; }
#edTools .tg { display:inline-flex; align-items:center; gap:6px; height:36px; border-radius:12px;
               background:rgba(16,18,20,.82); backdrop-filter:blur(10px); }
#edTools .tg.on { background:#ffd34d; color:#1a1c1e; }
#edTools .tg svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; }
#edTools .pad { cursor:default; gap:5px; padding-right:10px; }
#edTools .pad input { width:58px; height:24px; border:0; border-radius:7px; padding:0 6px; text-align:right;
                      background:rgba(255,255,255,.1); color:inherit; font:inherit; }
#edHint, #edNote { position:absolute; z-index:4; left:12px; bottom:12px; margin:0; padding:6px 12px;
                   border-radius:10px; background:rgba(16,18,20,.72); color:#c9c4ba; font-size:12px; }
#edHint[hidden], #edNote[hidden] { display:none; }

/* ---- vpravo: vyber ---- */
#edRight { display:flex; flex-direction:column; gap:14px; min-height:0; overflow-x:hidden; overflow-y:auto; padding:16px 14px;
           background:var(--panel); border-left:1px solid var(--hair); }
#edSelHead { display:flex; flex-direction:column; gap:1px; }
#edSelHead b { font-size:17px; line-height:1.25; overflow-wrap:anywhere; }
#edSelHead span { color:var(--muted); font-size:11.5px; overflow-wrap:anywhere; }
#edSelHead span:empty { display:none; }
#edProps { display:flex; flex-direction:column; gap:18px; }
#edProps[hidden] { display:none; }
#edProps [hidden] { display:none; }
#edProps button { font:inherit; color:var(--ink); cursor:pointer; }
#edProps svg { width:16px; height:16px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:2;
               stroke-linecap:round; stroke-linejoin:round; }

/* jedina vyrazna vec v paneli - oranzova ako sloty a lista upravy */
#edProps .fokus { display:flex; align-items:center; gap:12px; width:100%; padding:11px 14px; border-radius:14px;
                  border:1.5px solid #ff8a1f; background:#fff4e8; text-align:left; }
#edProps .fokus:hover { background:#ffe8d1; }
#edProps .fokus[hidden] { display:none; }
#edProps .fokus svg { width:22px; height:22px; color:#d8680a; }
#edProps .fokus span { display:flex; flex-direction:column; gap:1px; }
#edProps .fokus b { font-size:13.5px; }
#edProps .fokus small { color:var(--muted); font-size:11.5px; }

#edProps .sk h3 { margin:0 0 8px; font-size:12px; font-weight:700; color:var(--muted); }
#edProps .suradnice { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:6px; }
#edProps .suradnice label { min-width:0; display:flex; align-items:center; height:32px; border-radius:9px; background:var(--surf); }
#edProps .suradnice label:focus-within { outline:2px solid var(--acc); outline-offset:1px; }
#edProps .suradnice i { width:24px; flex:0 0 auto; text-align:center; font-style:normal; font-weight:700;
                        font-size:11.5px; color:var(--dim); }
#edProps .suradnice input { flex:1; width:0; min-width:0; height:100%; border:0; padding:0 8px 0 0; background:none;
                            color:var(--ink); font:12.5px/1 ui-sans-serif,-apple-system,sans-serif;
                            font-variant-numeric:tabular-nums; }
#edProps .suradnice input:focus { outline:0; }
#edProps .pozn { margin:6px 0 0; font-size:11.5px; color:var(--muted); }
#edProps .pozn:empty { display:none; }
#edProps .krok { display:flex; align-items:center; gap:4px; margin-top:8px; }
#edProps .krok span { flex:0 0 58px; color:var(--muted); font-size:12px; }
#edProps .krok button { flex:1; min-width:0; height:28px; border:0; border-radius:8px; padding:0 2px; background:var(--surf);
                        font-weight:600; font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
#edProps .krok button:hover { background:var(--surf-hi); }

/* otocenie: tri dvojice ↺ uhol ↻ */
#edProps .otoc .par { flex:1; min-width:0; display:flex; align-items:center; height:28px; border-radius:8px;
                      background:var(--surf); }
#edProps .otoc .par b { flex:1; text-align:center; font-size:11.5px; font-weight:700; color:var(--muted);
                        font-variant-numeric:tabular-nums; }
#edProps .otoc .par button { flex:0 0 22px; height:100%; padding:0; background:none; font-size:13px; }
#edProps .otoc .par button:hover { background:var(--surf-hi); }
#edProps .otoc .par button:first-child { border-radius:8px 0 0 8px; }
#edProps .otoc .par button:last-child { border-radius:0 8px 8px 0; }

/* ikony veci (dzpage) namiesto nahladu z modelu */
#edKatList img.ik, #edSlotList img.ik { object-fit:contain; }
#edKatList img.ik { width:56px; height:56px; flex:0 0 auto; border-radius:9px; background:#fff; }

/* posadit: dve rovnocenne moznosti vedla seba */
#edProps .dva { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:6px; }
#edProps .dva button { display:flex; align-items:center; gap:8px; min-height:38px; padding:6px 10px; border:0;
                       border-radius:10px; background:var(--surf); font-weight:600; font-size:12px;
                       text-align:left; line-height:1.2; }
#edProps .dva button:hover { background:var(--surf-hi); }

/* kus: styri dlazdice ikona nad textom */
#edProps .styri { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; }
#edProps .styri button { display:flex; flex-direction:column; align-items:center; gap:5px; padding:9px 2px 7px;
                         border:0; border-radius:10px; background:var(--surf); font-size:11px; font-weight:600; }
#edProps .styri button:hover { background:var(--surf-hi); }
#edProps .styri svg { width:18px; height:18px; }

/* pridat do vyberu: riadky, nie karty */
#edProps .riadky { display:flex; flex-direction:column; border-radius:12px; background:var(--surf); }
#edProps .riadky button { display:flex; flex-direction:column; align-items:flex-start; gap:1px; padding:9px 12px;
                          border:0; background:none; text-align:left; }
#edProps .riadky button + button { border-top:1px solid var(--hair); }
#edProps .riadky button:hover b { color:#d81b8c; }
#edProps .riadky b { font-size:12.5px; }
#edProps .riadky small { color:var(--muted); font-size:11.5px; }

#edProps .del { align-self:flex-start; display:flex; align-items:center; gap:7px; height:32px; padding:0 12px;
                border:0; border-radius:9px; background:none; color:#a8322a; font-weight:600; font-size:12.5px; }
#edProps .del:hover { background:rgba(209,31,31,.08); }
#edProps button:focus-visible { outline:2px solid var(--acc); outline-offset:2px; }

#edHelp { margin-top:auto; padding-top:10px; border-top:1px solid var(--hair); }
#edHelp summary { cursor:pointer; font-size:12px; font-weight:700; color:var(--muted); }
#edHelp ul { margin:8px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:4px;
             font-size:12px; color:var(--muted); }
#edHelp kbd { display:inline-block; min-width:16px; padding:1px 5px; border-radius:5px; text-align:center;
              background:var(--surf); color:var(--ink); font:600 11px/1.4 ui-sans-serif,-apple-system,sans-serif; }

#edHlaska { position:fixed; z-index:50; left:50%; bottom:26px; transform:translateX(-50%);
            padding:10px 16px; border-radius:2rem; background:var(--ink); color:#fff; font-weight:600;
            opacity:0; pointer-events:none; transition:opacity .16s; white-space:nowrap; }
#edHlaska.on { opacity:1; }

/* Mobil a uzke okno: jeden stlpec, stranka sa posuva. Hore 3D (pevna vyska,
   aby sa platno nemenilo pri posuvani), pod nim vybrany kus a nakoniec zoznam
   a katalog - predtym boli pod 900 px skryte a z telefonu sa nedalo pridavat. */
@media (max-width: 900px) {
  body.ed { height:auto; min-height:100vh; overflow:visible; }
  #edMain { display:flex; flex-direction:column; flex:0 0 auto; }
  #edStage { flex:0 0 auto; height:58vh; min-height:300px; }
  #edRight { order:2; max-height:none; overflow:visible; border-left:0; border-top:1px solid var(--hair); }
  #edLeft { order:3; height:70vh; min-height:360px; border-right:0; border-top:1px solid var(--hair); }
  #edHelp { display:none; }
}
/* Pas nastrojov na telefone: nazov na vlastnom riadku, akcie pod nim v jednom
   riadku, ktory sa da posuvat prstom - nic sa neprekryva ani nevypadne z okna. */
@media (max-width: 760px) {
  #edTop { flex-wrap:wrap; gap:8px; padding:8px 12px 10px; }
  #edTop .tt { width:100%; }
  #edTop .nastr { margin-left:0; width:100%; overflow-x:auto; flex-wrap:nowrap; padding-bottom:2px;
                  scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  #edTop .nastr::-webkit-scrollbar { display:none; }
  #edTop .nastr button { flex:0 0 auto; height:36px; padding:0 13px; white-space:nowrap; }
  #edTop .nastr .ik { width:36px; padding:0; }
  #edHint { left:10px; right:10px; max-width:none; white-space:normal; }
}
#edTools [hidden] { display:none; }

/* Oko ako vo Figme - vidiet ho pri prejdeni mysou; pri skrytom natrvalo. */
#edList .oko { flex:0 0 auto; width:24px; height:22px; margin-left:4px; border:0; border-radius:6px;
               background:none; cursor:pointer; color:var(--muted); display:grid; place-items:center;
               padding:0; visibility:hidden; }
#edList .sk:hover .oko, #edList .dr:hover .oko, #edList .ks:hover .oko,
#edList .skryte .oko, #edList .ciast .oko { visibility:visible; }
#edList .oko:hover { background:var(--surf-hi); color:var(--ink); }
#edList .oko svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2;
                   stroke-linecap:round; }
#edList .oko .x { display:none; }
#edList .skryte .oko .x, #edList .ciast .oko .x { display:inline; }
#edList .ciast .oko { opacity:.55; }
#edList .skryte label, #edList .skryte em { opacity:.42; }
#edList .ks { display:flex; align-items:center; }
/* Zamok - rovnako ako oko: pri prejdeni mysou, pri zamknutom natrvalo. */
#edList .zamok { flex:0 0 auto; width:24px; height:22px; margin-left:4px; border:0; border-radius:6px;
                 background:none; cursor:pointer; color:var(--muted); display:grid; place-items:center;
                 padding:0; visibility:hidden; }
#edList .sk:hover .zamok, #edList .dr:hover .zamok, #edList .ks:hover .zamok,
#edList .zamk .zamok, #edList .ciastZ .zamok { visibility:visible; }
#edList .zamok:hover { background:var(--surf-hi); color:var(--ink); }
#edList .zamok svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2;
                     stroke-linecap:round; }
#edList .zamok .z { display:none; }
#edList .zamk .zamok .z, #edList .ciastZ .zamok .z { display:inline; }
#edList .zamk .zamok .o, #edList .ciastZ .zamok .o { display:none; }
#edList .zamk .zamok { color:var(--ink); }
#edList .ciastZ .zamok { opacity:.55; }
#edList .zamk input { opacity:.35; pointer-events:none; }
#edList em + .zamok { margin-left:auto; }
#edList .ks .zamok { margin-left:auto; }

/* ---- zalozky vlavo: v sete / katalog ---- */
#edLeft .zal { display:flex; gap:3px; margin:12px 12px 0; padding:3px; border-radius:12px; background:var(--surf); }
#edLeft .zal button { flex:1; height:32px; border:0; border-radius:9px; cursor:pointer; background:none;
                      color:var(--muted); font-weight:700; }
#edLeft .zal button.on { background:var(--panel); color:var(--ink); box-shadow:0 1px 4px rgba(0,0,0,.12); }
#edPaneSet, #edPaneKat { display:flex; flex-direction:column; min-height:0; flex:1 1 auto; }
#edPaneSet[hidden], #edPaneKat[hidden] { display:none; }
#edKatTypy { display:flex; flex-wrap:wrap; gap:5px; margin:0 12px 8px; }
#edKatTypy.stlm { opacity:.45; }
#edKatTypy button { border:0; border-radius:2rem; padding:5px 10px; cursor:pointer; background:var(--surf);
                    color:var(--ink); font-weight:600; font-size:12px; }
#edKatTypy button em { font-style:normal; color:var(--muted); font-weight:500; margin-left:2px; }
#edKatTypy button.on { background:var(--ink); color:#fff; }
#edKatTypy button.on em { color:rgba(255,255,255,.7); }
#edKatList { flex:1 1 auto; min-height:0; overflow:auto; padding:0 8px 12px; display:flex; flex-direction:column; gap:4px; }
#edKatList .kv { display:flex; align-items:center; gap:10px; width:100%; border:0; border-radius:12px; padding:5px;
                 background:none; cursor:pointer; text-align:left; color:var(--ink); }
#edKatList .kv:hover { background:var(--surf); }
#edKatList .kv.on { background:#fbe0ef; }
#edKatList canvas { width:56px; height:56px; flex:0 0 auto; border-radius:9px; background:#2a2c2e; }
#edKatList .kv span { display:flex; flex-direction:column; gap:1px; min-width:0; }
#edKatList .kv b { font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#edKatList .kv small { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#edKatList .viac { color:var(--muted); font-size:12px; padding:8px; margin:0; }

/* tlacidlo „pridat" - hlavna vec, co sa v editore robi */
#edTools .tg.pridaj { background:#d81b8c; color:#fff; }
#edTools .tg.pridaj svg { stroke-width:2.6; }

/* lista pri pokladani */
#edKladiem { position:absolute; z-index:6; left:50%; bottom:14px; transform:translateX(-50%);
             display:flex; align-items:center; gap:12px; padding:8px 8px 8px 16px; border-radius:2rem;
             background:#d81b8c; color:#fff; box-shadow:0 10px 28px rgba(0,0,0,.35); white-space:nowrap; }
#edKladiem[hidden] { display:none; }
#edKladiem span { opacity:.85; font-size:12px; }
#edKladiem .rada { opacity:1; font-weight:700; background:#fff; color:#d81b8c; padding:3px 9px; border-radius:2rem; }
#edKladiem .rada[hidden] { display:none; }
#edKladiem button { border:0; border-radius:2rem; height:30px; padding:0 14px; cursor:pointer;
                    background:#fff; color:#d81b8c; font-weight:700; }
/* nastroje sa uz nezmestia do riadku - zalamu sa, ale napisy nie */
#edTools { right:12px; flex-wrap:wrap; }
#edTools .tg, #edTools .seg button { white-space:nowrap; }

/* upravit samostatne - lista dole, ta ista rec ako pokladanie, len tmava */
#edFokus { position:absolute; z-index:6; left:50%; bottom:14px; transform:translateX(-50%);
           display:flex; align-items:center; gap:8px; padding:8px 8px 8px 16px; border-radius:2rem;
           background:#1a1c1e; color:#e9e6e0; box-shadow:0 10px 28px rgba(0,0,0,.35); white-space:nowrap; }
#edFokus[hidden] { display:none; }
#edFokus b { margin-right:6px; }
#edFokus button { border:0; border-radius:2rem; height:30px; padding:0 14px; cursor:pointer; font-weight:700;
                  background:rgba(255,255,255,.12); color:inherit; }
#edFokus button.prim { background:#ff8a1f; color:#1a1c1e; }

/* vlastne vzory v katalogu */
#edKatList .kv { position:relative; }
#edKatList .kv.moje { background:#fff4e6; }
#edKatList .kv .zmaz { position:absolute; right:6px; top:6px; width:22px; height:22px; border-radius:50%;
                       font-style:normal; line-height:22px; text-align:center; color:var(--muted); }
#edKatList .kv .zmaz:hover { background:rgba(209,31,31,.12); color:#a8322a; }

/* ponuka na slote */
#edSlotMenu { position:absolute; z-index:7; width:340px; max-height:min(520px, calc(100% - 16px)); display:flex;
              flex-direction:column; gap:8px; padding:12px; box-sizing:border-box; border-radius:16px;
              background:var(--panel); color:var(--ink); box-shadow:0 14px 34px rgba(0,0,0,.4); }
#edSlotMenu[hidden] { display:none; }
#edSlotMenu .hlava { flex:0 0 auto; display:flex; align-items:center; gap:6px; }
#edSlotMenu .hlava b { flex:1; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#edSlotMenu .hlava button { border:0; border-radius:8px; height:28px; padding:0 10px; cursor:pointer;
                            background:rgba(209,31,31,.1); color:#a8322a; font-weight:600; }
#edSlotMenu .hlava button[hidden] { display:none; }
#edSlotMenu .hlava .x { background:none; color:var(--muted); font-size:20px; padding:0 6px; }
#edSlotMenu input { flex:0 0 auto; height:38px; box-sizing:border-box; border:0; border-radius:2rem; padding:0 14px;
                    background:var(--surf); color:inherit; font:inherit; }
#edSlotMenu input:focus { outline:2px solid var(--acc); outline-offset:1px; }
/* dve zbrane vedla seba, obrazok na celu sirku karty - pusky su dlhe a uzke */
#edSlotList { flex:1 1 auto; min-height:0; overflow-x:hidden; overflow-y:auto; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr));
              gap:8px; padding-right:2px; }
#edSlotList button { display:flex; flex-direction:column; align-items:stretch; gap:4px; min-width:0; border:0;
                     border-radius:12px; padding:6px 6px 8px; background:var(--surf); cursor:pointer; color:inherit; }
#edSlotList button:hover { background:var(--surf-hi); }
#edSlotList button:focus-visible { outline:2px solid var(--acc); outline-offset:1px; }
#edSlotList img.ik, #edSlotList canvas { width:100%; height:auto; aspect-ratio:1.6; border-radius:8px; background:#fff; }
/* ikona je stvorec a puska v nom len vodorovny pas - orezat hore a dole */
#edSlotList img.ik { object-fit:cover; }
#edSlotList canvas { object-fit:contain; background:#2a2c2e; }
#edSlotList span { font-size:12px; font-weight:600; line-height:1.25; text-align:center; overflow-wrap:anywhere; }
#edSlotList .viac { grid-column:1 / -1; color:var(--muted); font-size:12px; margin:4px; }
/* hlaska nad listou upravy / pokladania, nie cez nu */
body:has(#edOhrada:not([hidden])) #edHlaska, body:has(#edFokus:not([hidden])) #edHlaska, body:has(#edKladiem:not([hidden])) #edHlaska { bottom:80px; }

/* ohrada - lista dole, oranzova ako jej nahlad */
#edOhrada { position:absolute; z-index:6; left:50%; bottom:14px; transform:translateX(-50%);
            display:flex; align-items:center; gap:8px; padding:8px; border-radius:2rem;
            background:#1a1c1e; color:#e9e6e0; box-shadow:0 10px 28px rgba(0,0,0,.35); white-space:nowrap; }
#edOhrada[hidden] { display:none; }
#edOhrada select { height:30px; max-width:230px; border:0; border-radius:2rem; padding:0 10px;
                   background:rgba(255,255,255,.12); color:inherit; font:inherit; font-weight:600; }
#edOhrada select option { color:#1a1c1e; }
#edOhrada .vz { display:flex; align-items:center; gap:6px; font-size:12.5px; cursor:pointer; }
#edOhrada .vz.stlm { opacity:.4; }
#edOhrada .vz input { accent-color:#ff8a1f; }
#edOhrada .pocet { display:flex; flex-direction:column; min-width:150px; line-height:1.25; }
#edOhrada .pocet b { font-size:12px; font-weight:600; }
#edOhrada .pocet small { font-size:11px; opacity:.65; }
#edOhrada button { border:0; border-radius:2rem; height:30px; padding:0 14px; cursor:pointer; font-weight:700;
                   background:rgba(255,255,255,.12); color:inherit; }
#edOhrada button.prim { background:#ff8a1f; color:#1a1c1e; }

/* zarovnat: popis a pat ikon v riadku */
#edProps .zar { display:flex; align-items:center; gap:4px; margin-top:6px; }
#edProps .zar span { flex:0 0 58px; color:var(--muted); font-size:12px; }
#edProps .zar button { flex:1; min-width:0; height:30px; display:grid; place-items:center; border:0; border-radius:8px;
                       background:var(--surf); padding:0; }
#edProps .zar button:hover { background:var(--surf-hi); }
#edProps .zar svg { width:17px; height:17px; }
#edProps #edZarovnaj .dva { margin-top:8px; }
#edProps #edZarHlavny { margin:-4px 0 2px; }

/* aj s vecami na nom - oranzova ako na mape */
#edProps .svecami { display:flex; align-items:center; gap:8px; padding:8px 11px; border-radius:11px; cursor:pointer;
                    background:#fff4e8; font-size:12.5px; font-weight:600; user-select:none; }
#edProps .svecami[hidden] { display:none; }
#edProps .svecami input { accent-color:#ff8a1f; width:15px; height:15px; margin:0; }

/* Na telefone nastroje 3D v jednom riadku, ktory sa da posuvat prstom - inak
   sa zalomili do styroch a zabrali polovicu nahladu. Musi byt AZ ZA pravidlom
   `#edTools { flex-wrap:wrap }` vyssie, inak ho prebije. */
@media (max-width: 760px) {
  #edTools { right:0; left:0; top:8px; padding:0 10px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  #edTools::-webkit-scrollbar { display:none; }
  #edTools > * { flex:0 0 auto; }
}

/* Katalog na mobile: kategorie (Hotové zostavy, príbytky…) v jednom riadku,
   ktory sa posuva prstom - zalomene do desiatich riadkov zabrali takmer cely
   panel a na samotny katalog ostal prúžok. Vyblednutie vpravo napovie, ze
   riadok pokracuje. */
@media (max-width: 900px) {
  #edKatTypy { flex:0 0 auto; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; padding-bottom:2px;
               -webkit-mask-image:linear-gradient(90deg, #000 85%, transparent);
               mask-image:linear-gradient(90deg, #000 85%, transparent); }
  #edKatTypy::-webkit-scrollbar { display:none; }
  #edKatTypy > * { flex:0 0 auto; white-space:nowrap; }
}
/* Napoveda „Shift+klik… Ctrl+A" je o klavesoch - na dotyku nema zmysel a len
   zakryva nahlad. */
@media (pointer: coarse) {
  #edHint { display:none !important; }
}

/* Tlacidla +/- v 3D - len na dotyku. Vpravo dole, nad napovedou nic neprekryvaju. */
#edZoom { display:none; position:absolute; z-index:4; right:10px; bottom:10px; flex-direction:column; gap:6px; }
#edZoom button { width:46px; height:46px; border:0; border-radius:50%; cursor:pointer;
                 background:rgba(16,18,20,.82); color:#fff; font:400 26px/1 ui-sans-serif,-apple-system,sans-serif; }
#edZoom button:active { background:#e9e6e0; color:#1a1c1e; }
@media (pointer: coarse) { #edZoom { display:flex; } }
