/* KB_TEMPLATES: logo maker – phone-first, logical properties so Arabic (RTL) mirrors itself */
.klm{max-width:1100px;text-align:start;padding:16px}
.klm .btn-link{background:none;border:0;padding:6px 2px;color:var(--brand);font:inherit;font-size:.92rem;cursor:pointer;text-decoration:underline;min-height:36px}
.lm-start{display:grid;gap:8px;max-width:560px}
.klm .lm-start label{margin:.2rem 0}
.lm-ideas{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.lm-ideas-list{display:flex;flex-wrap:wrap;gap:6px}
.lm-ideas-list button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-size:.88rem;cursor:pointer;min-height:36px}
.lm-ideas-list button:hover{border-color:var(--brand);color:var(--brand)}
.lm-private{margin:4px 0 0;font-size:.9rem;color:var(--ok);font-weight:600}
.lm-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:4px 0 10px}
.lm-count{margin:0;color:var(--muted);font-size:.9rem}
.lm-cats{display:flex;gap:6px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.lm-cats button{flex:none;border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 13px;font:inherit;font-size:.9rem;cursor:pointer;color:var(--ink-2);white-space:nowrap;min-height:38px}
.lm-cats button.on{background:var(--brand);border-color:var(--brand);color:#fff}
.lm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(46%,240px),1fr));gap:12px}
.lm-tile{border:0;background:none;padding:0;cursor:pointer;text-align:start;font:inherit;color:inherit;min-width:0;display:flex;flex-direction:column;gap:6px}
.lm-thumb{display:grid;place-items:center;width:100%;aspect-ratio:1.5;border-radius:12px;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.1),0 6px 16px -8px rgba(15,23,42,.28);background:
  linear-gradient(45deg,#eef2f7 25%,transparent 25%,transparent 75%,#eef2f7 75%),
  linear-gradient(45deg,#eef2f7 25%,transparent 25%,transparent 75%,#eef2f7 75%);
  background-size:16px 16px;background-position:0 0,8px 8px;background-color:#fff;transition:transform .15s,box-shadow .15s}
.lm-thumb svg{display:block;width:100%;height:100%}
.lm-tile:hover .lm-thumb,.lm-tile:focus-visible .lm-thumb{transform:translateY(-2px);box-shadow:0 2px 4px rgba(15,23,42,.14),0 12px 24px -10px rgba(15,23,42,.38)}
.lm-tile:focus-visible{outline:none}.lm-tile:focus-visible .lm-thumb{outline:3px solid var(--brand);outline-offset:2px}
.lm-tl{font-size:.8rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lm-more-row{text-align:center;margin:16px 0 4px}
.lm-lic{margin:16px 0 0}
.lm-note{color:var(--ink-2)}
/* editor */
.lm-ed{position:fixed;inset:0;z-index:80;background:#e9edf3;display:flex;flex-direction:column;font:15px/1.4 var(--font);color:var(--ink);text-align:start;touch-action:manipulation}
.lm-ed[hidden]{display:none}
.lm-ed *{box-sizing:border-box}
.lm-ed button{font:inherit;color:inherit}
.lm-ed input,.lm-ed select{font:inherit;color:var(--ink);border:1px solid #cbd5e1;border-radius:8px;padding:7px 8px;background:#fff;min-width:0;max-width:100%}
.le-top{display:flex;align-items:center;gap:6px;padding:6px 8px;background:#fff;border-bottom:1px solid var(--line);min-height:52px;flex:none}
.le-title{flex:1;min-width:0;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 4px}
.le-go{background:var(--brand);color:#fff!important;border:0;border-radius:10px;padding:0 14px;height:40px;font-weight:700;cursor:pointer;flex:none}
.le-ib{border:0;background:none;min-width:40px;height:40px;border-radius:10px;cursor:pointer;display:inline-grid;place-items:center;padding:0 8px}
.le-ib:hover{background:#f1f5f9}
.le-body{flex:1;display:flex;flex-direction:column;min-height:0}
.le-stage{flex:1;min-height:0;display:grid;place-items:center;padding:16px;background:
  linear-gradient(45deg,#e8edf3 25%,transparent 25%,transparent 75%,#e8edf3 75%),
  linear-gradient(45deg,#e8edf3 25%,transparent 25%,transparent 75%,#e8edf3 75%);
  background-size:20px 20px;background-position:0 0,10px 10px;background-color:#f4f6f9}
.le-stage .le-card{width:min(92vw,560px);max-height:100%;filter:drop-shadow(0 8px 22px rgba(15,23,42,.22))}
.le-stage svg{display:block;width:100%;height:auto;border-radius:8px}
.le-panel{flex:none;background:#fff;border-top:1px solid var(--line);max-height:46vh;overflow:auto;padding:10px 12px 16px}
.le-tabs{display:flex;gap:4px;overflow-x:auto;padding:0 0 8px;scrollbar-width:thin}
.le-tabs button{flex:none;border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 12px;font-size:.88rem;cursor:pointer;min-height:36px}
.le-tabs button.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.le-lab{font-size:.8rem;color:var(--muted);margin:8px 0 4px;font-weight:600}
.le-pals,.le-icons,.le-lays{display:flex;flex-wrap:wrap;gap:6px}
.le-pals button{width:36px;height:36px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #cbd5e1;cursor:pointer;padding:0}
.le-pals button.on{box-shadow:0 0 0 2px var(--brand)}
.le-lays button,.le-fonts button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 10px;cursor:pointer;min-height:40px;font-size:.85rem}
.le-lays button.on,.le-fonts button.on{border-color:var(--brand);background:#eef2ff;color:var(--brand);font-weight:700}
.le-icons{max-height:28vh;overflow:auto}
.le-icons button{width:40px;height:40px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:6px;cursor:pointer;display:grid;place-items:center}
.le-icons button.on{border-color:var(--brand);background:#eef2ff}
.le-icons button svg{width:22px;height:22px}
.le-search{width:100%;margin:0 0 8px}
.le-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.le-row label{display:flex;flex-direction:column;gap:2px;font-size:.8rem;color:var(--muted);margin:0}
.le-dl{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.le-use{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.le-use a,.le-use button.btn{text-decoration:none}
.le-msg{min-height:1.2em;margin:6px 0 0;font-size:.9rem;color:var(--ok)}
.le-msg.err{color:#b91c1c}
@media (min-width:860px){
  .le-body{flex-direction:row}
  .le-panel{width:340px;max-height:none;border-top:0;border-inline-start:1px solid var(--line);order:2}
  .le-stage{order:1}
}
@media (max-width:640px){
  .lm-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .lm-thumb{border-radius:10px}
}
