﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>:root {
  --bg: #f4f5f7; --surface: #ffffff; --raised: #ffffff; --ink: #15181e; --soft: #5d6573; --faint: #8a93a2;
  --line: #e2e5ea; --chip: #eef0f3; --hover: #f2f4f7; --accent: #1f9d55; --accent-ink: #fff;
  --accent-soft: #e5f6ec; --bad: #d1242f; --bad-soft: #fde8e8; --warn: #b7791f; --focus: #2f7cf6;
  --shadow: 0 1px 2px #0000000d, 0 4px 16px #0000000f; --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1116; --surface: #161a21; --raised: #1c212a; --ink: #e8ecf1; --soft: #9aa3b2; --faint: #6b7483;
    --line: #2a303b; --chip: #232934; --hover: #1f2530; --accent: #2fb866; --accent-soft: #163626;
    --bad: #ff6b6b; --bad-soft: #3a1c1f; --shadow: 0 1px 2px #0006, 0 6px 20px #0005; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--focus); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* controls */
button { font: inherit; border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; color: var(--ink);
  background: var(--chip); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button:hover { filter: brightness(.97); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.danger { background: var(--bad); color: #fff; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--line); }
button.big { padding: 11px 16px; justify-content: center; width: 100%; font-size: 15px; }
button.small { padding: 4px 10px; font-size: 13px; }
button.link { background: none; padding: 0; color: var(--focus); }
.icon-btn { background: transparent; padding: 7px; border-radius: 8px; color: var(--soft); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-width: 0; }
input[type=color] { padding: 2px; width: 44px; height: 34px; cursor: pointer; }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
textarea { width: 100%; }
.wide { width: 100%; }
.hint { color: var(--soft); font-size: 13px; margin: 6px 0; }
.bad { color: var(--bad); }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 4px; }
.stack > span { font-size: 13px; color: var(--soft); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 9px; border-radius: 99px;
  background: var(--chip); color: var(--soft); white-space: nowrap; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.code { width: 100%; font: 12px/1.4 ui-monospace, Menlo, monospace; }

/* sign-in */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; padding: 28px 24px;
  box-shadow: var(--shadow); display: grid; gap: 12px; }
.login-card .logo { width: 56px; height: 56px; border-radius: 14px; }
.login-card h1 { font-size: 22px; }
.lead { color: var(--soft); margin: 0; }
.oauth { display: grid; gap: 8px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pw summary { color: var(--soft); cursor: pointer; font-size: 13px; margin-bottom: 6px; }
.pw input { width: 100%; }

/* shared top bar */
.top { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; background: var(--surface);
  border-bottom: 1px solid var(--line); flex: none; }
.brand { white-space: nowrap; flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; gap: 2px; margin-left: 12px; overflow-x: auto; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; color: var(--soft);
  text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { background: var(--chip); color: var(--ink); font-weight: 600; }
.who { color: var(--soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* library */
.home { min-height: 100%; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--soft); margin: 4px 0 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; border: 1px solid var(--line); }
.card .pic { aspect-ratio: 16 / 10; background: var(--chip); position: relative; cursor: pointer; overflow: hidden; }
.card .pic img, .card .pic svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .pic .chip { position: absolute; left: 10px; top: 10px; box-shadow: var(--shadow); background: var(--surface); }
.card .pic .chip.ok { background: var(--accent); color: #fff; }
.card .meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.card .meta b { font-size: 15px; }
.card .meta small { color: var(--soft); }
.card .acts { display: flex; gap: 6px; padding: 0 14px 14px; margin-top: auto; }
.card.new { align-items: center; justify-content: center; min-height: 230px; border: 2px dashed var(--line);
  background: transparent; box-shadow: none; cursor: pointer; color: var(--soft); gap: 8px; text-align: center; padding: 16px; }
.card.new:hover { border-color: var(--accent); color: var(--accent); }
.card.new .plus { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; }
.empty { background: var(--surface); border-radius: 16px; padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 22px 0; text-align: left; }
.step { background: var(--bg); border-radius: 12px; padding: 14px; }
.step b { display: block; margin-bottom: 4px; }
.step .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.list { display: grid; gap: 8px; }
.list-row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.list-row .grow small { display: block; color: var(--soft); }
.secret { display: block; padding: 10px; background: var(--chip); border-radius: 8px; word-break: break-all;
  font: 13px ui-monospace, Menlo, monospace; }

/* editor */
.editor { height: 100%; display: flex; flex-direction: column; }
.back { color: var(--soft); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.back:hover { background: var(--hover); color: var(--ink); }
.title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.name-btn { background: none; padding: 4px 6px; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.name-btn:hover { background: var(--hover); }
#ed-publish .short { display: none; }
.save-state { color: var(--faint); font-size: 12px; white-space: nowrap; }
.save-state.bad { color: var(--bad); }
.work { flex: 1; display: flex; min-height: 0; }
.rail { width: 84px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 8px 6px;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.rail button { flex-direction: column; gap: 4px; background: none; padding: 9px 2px; font-size: 11px; color: var(--soft);
  border-radius: 10px; white-space: normal; text-align: center; line-height: 1.15; }
.rail button:hover { background: var(--hover); color: var(--ink); }
.rail button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.panel { width: 380px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex;
  flex-direction: column; min-height: 0; }
.panel-head { padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 17px; }
.panel-head p { color: var(--soft); margin: 4px 0 0; font-size: 13px; }
.panel-body { overflow-y: auto; padding: 14px 18px 40px; flex: 1; display: grid; gap: 16px; align-content: start; }
.sec { display: grid; gap: 10px; }
.sec + .sec { border-top: 1px solid var(--line); padding-top: 16px; }
.sec > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); }
.field { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; }
.field > span { color: var(--soft); font-size: 13px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice button { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; background: var(--bg);
  border: 2px solid transparent; white-space: normal; text-align: left; }
.choice button small { color: var(--soft); font-size: 12px; }
.choice button.on { border-color: var(--accent); background: var(--accent-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.tags .chip { background: var(--chip); color: var(--ink); font-size: 13px; }
.tags .chip button { padding: 0; background: none; color: var(--soft); }
.tags input { border: 0; padding: 2px 4px; flex: 1; min-width: 80px; background: transparent; }
.thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--chip); display: block; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.swatch { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 8px; padding: 5px 8px 5px 5px; }
.swatch input { width: 32px; height: 32px; border: 0; flex: none; border-radius: 6px; }
.swatch code { font-size: 11px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; flex: 1; }
.swatch small { color: var(--faint); font-size: 11px; }
.group-head { display: flex; align-items: center; gap: 8px; }
.group-head h4 { margin: 0; font-size: 14px; flex: 1; }
.slider { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; }
.slider span { color: var(--soft); font-size: 13px; }
.slider output { font-size: 12px; color: var(--soft); text-align: right; }
.layer-group summary { cursor: pointer; padding: 6px 0; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.layer-group summary small { color: var(--faint); font-weight: 400; }
.layer { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 6px; padding: 3px 0; }
.layer .lname { background: none; padding: 4px 6px; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis;
  font-size: 13px; text-align: left; }
.layer .lname:hover { background: var(--hover); }
.layer.off .lname { color: var(--faint); text-decoration: line-through; }
.layer small { color: var(--faint); font-size: 11px; }
.layer-edit { background: var(--bg); border-radius: 10px; padding: 12px; display: grid; gap: 10px; margin: 4px 0 8px; }
.icon-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-groups button { padding: 5px 11px; border-radius: 99px; font-size: 13px; }
.icon-groups button.on { background: var(--accent); color: #fff; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.icon-cell { flex-direction: column; background: var(--bg); padding: 8px 4px 6px; border: 2px solid transparent;
  position: relative; white-space: normal; }
.icon-cell img { width: 40px; height: 40px; object-fit: contain; }
.icon-cell span { font-size: 11px; color: var(--soft); text-align: center; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.icon-cell.custom::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent); }
.icon-cell.on { border-color: var(--accent); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--soft);
  cursor: pointer; display: grid; gap: 6px; justify-items: center; }
.drop.over, .drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.icon-big { display: flex; gap: 14px; align-items: center; }
.icon-big canvas, .icon-big img { width: 72px; height: 72px; object-fit: contain; background:
  repeating-conic-gradient(var(--chip) 0 25%, transparent 0 50%) 0 0 / 12px 12px; border-radius: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.check .i { margin-top: 1px; }
.check.ok .i { color: var(--accent); }
.check.no .i { color: var(--bad); }
.check.maybe .i { color: var(--warn); }

/* map */
.stage { flex: 1; position: relative; min-width: 0; background: var(--chip); }
#map { position: absolute; inset: 0; }
.map-tools { position: absolute; left: 12px; top: 12px; right: 60px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.map-tools > * { pointer-events: auto; box-shadow: var(--shadow); }
.map-tools select, .map-tools button { background: var(--surface); border: 0; height: 34px; }
.map-tools .seg { display: flex; background: var(--surface); border-radius: 8px; overflow: hidden; }
.map-tools .seg button { border-radius: 0; box-shadow: none; }
.map-tools .seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.map-errors { position: absolute; left: 12px; right: 12px; bottom: 34px; background: var(--bad-soft); color: var(--bad);
  border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px; }
.map-zoom { position: absolute; right: 12px; bottom: 34px; background: var(--surface); color: var(--soft); font-size: 12px;
  padding: 3px 8px; border-radius: 6px; box-shadow: var(--shadow); }

/* dialogs, menus, toasts */
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface);
  color: var(--ink); box-shadow: 0 20px 60px #0005; }
.dlg.wide { width: min(860px, calc(100vw - 32px)); }
.dlg::backdrop { background: #0008; }
.dlg header { display: flex; align-items: center; padding: 16px 18px 8px; gap: 8px; }
.dlg header h2 { font-size: 18px; flex: 1; }
.dlg-body { padding: 4px 18px 16px; display: grid; gap: 12px; max-height: 70vh; overflow-y: auto; }
.dlg-body p { margin: 0; }
.dlg footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tpl { flex-direction: column; align-items: stretch; padding: 0; background: var(--bg); border: 2px solid transparent;
  overflow: hidden; gap: 0; white-space: normal; text-align: left; }
.tpl .pic { aspect-ratio: 16 / 10; background: var(--chip); }
.tpl .pic svg, .tpl .pic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.tpl .pic svg.i { width: 36px; height: 36px; }
.tpl b { padding: 8px 10px 0; }
.tpl small { padding: 0 10px 9px; color: var(--soft); font-size: 12px; }
.tpl.on { border-color: var(--accent); }
.menu { position: fixed; z-index: 50; background: var(--raised); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px #0003; padding: 6px; min-width: 220px; display: grid; }
.menu button { background: none; justify-content: flex-start; padding: 9px 10px; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--bad); background: none; font-weight: 400; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 10px); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; max-width: 90vw; z-index: 100; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 900px) {
  .panel { width: 320px; }
}
@media (max-width: 720px) {
  .top { padding: 0 8px; gap: 6px; }
  .brand span, .who { display: none; }
  .nav { margin-left: 0; }
  .work { flex-direction: column; }
  .rail { width: auto; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .rail button { min-width: 72px; }
  .stage { order: -1; flex: none; height: 42vh; }
  .panel { width: 100%; flex: 1; border-right: 0; }
  .field { grid-template-columns: 1fr; gap: 4px; }
  #ed-save, #ed-status, .editor .top > .grow { display: none; }
  .title { flex: 1; }
  #ed-publish .long { display: none; }
  #ed-publish .short { display: inline; }
}

/* Phone preview QR and version history (02.11.2026). */
.qr { width: 220px; margin: 12px auto; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.version { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line, #0001); }
.version img, .version .blank { width: 96px; height: 60px; object-fit: cover; border-radius: 8px; background: #8882; flex: none; }
.palette-row { display: flex; gap: 6px; margin: 8px 0; }
.palette-row span { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #0002; }
.stat { displa