/* Верстак — редактор: верхняя полоса, полоса значков, панели, холст на «коврике», панель блока; телефон — нижняя панель и листы. */

.ed { height: 100dvh; display: grid; grid-template-rows: 48px minmax(0, 1fr); background: var(--bg); overflow: hidden; }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 6px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; z-index: 20; --ctl: 34px; }
.ed-top-l, .ed-top-r { display: flex; align-items: center; gap: 4px; flex: 1 1 0; min-width: 0; }
.ed-top-r { justify-content: flex-end; }
.ed-top .sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; flex: none; }
.site-name { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); min-width: 0; cursor: text; }
.site-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; font-size: var(--fs); }
.site-name .ic { color: var(--faint); opacity: 0; transition: opacity var(--t-fast); } .site-name:hover { background: var(--surface-3); } .site-name:hover .ic, .site-name:focus-visible .ic { opacity: 1; }
.site-name-inp { width: 220px; min-height: 34px; font-weight: 700; }
.page-btn { gap: 7px; padding: 0 8px; min-width: 0; flex: 0 1 auto; font-weight: 500; } .page-btn .btn-t { max-width: 16ch; }
.dev-seg { flex: none; } .dev-seg button { width: 36px; padding: 0; }
.savest { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; flex: none; }
.savest:disabled { cursor: default; } .savest .ic { color: var(--ok); }
.savest.is-offline, .savest.is-error, .savest.is-conflict { color: var(--warn); background: var(--warn-soft); cursor: pointer; } .savest.is-offline .ic, .savest.is-error .ic, .savest.is-conflict .ic { color: inherit; }
.savest.short { padding: 0 4px; }
.pub-btn { min-width: 0; }

.ed-body { position: relative; display: flex; min-height: 0; min-width: 0; }
.ed-rail { width: 80px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; z-index: 12; }
.ed-rail button, .m-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 10.5px; font-weight: 500; line-height: 1.1; cursor: pointer; }
.ed-rail button > span:last-child, .m-nav button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-ic { position: relative; display: grid; place-items: center; width: 40px; height: 30px; border-radius: 9px; transition: background var(--t-fast), color var(--t-fast); }
.ed-rail button:hover .rail-ic { background: var(--surface-3); color: var(--ink); }
.ed-rail button.on, .m-nav button.on { color: var(--ink); font-weight: 600; }
.ed-rail button.on .rail-ic, .m-nav button.on .rail-ic { background: var(--lime); color: #16181D; }
.badge { position: absolute; right: -4px; top: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent-2); color: #fff; font: 700 10.5px/17px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--surface); }

.ed-panel, .ed-insp { display: flex; flex-direction: column; min-height: 0; background: var(--surface); flex: none; z-index: 10; }
.ed-panel { width: 300px; border-right: 1px solid var(--line); animation: slide-r var(--t-slow) var(--ease) both; }
.ed-panel.wide { width: 360px; }
.ed-insp { width: 320px; border-left: 1px solid var(--line); animation: slide-l var(--t-slow) var(--ease) both; }
@keyframes slide-r { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes slide-l { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.pane-h { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 14px; flex: none; --ctl: 32px; }
.pane-h h2 { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-tabs { padding: 0 12px 10px; flex: none; }
.pane-b { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scrollbar-width: thin; }
.pane-sub { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.pane-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.is-tablet .ed-panel { position: absolute; left: 80px; top: 0; bottom: 0; box-shadow: var(--sh-3); }
.is-tablet .ed-insp { position: absolute; right: 0; top: 0; bottom: 0; box-shadow: var(--sh-3); }

/* ── холст ── */
.ed-stage { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; overflow: hidden; display: flex; justify-content: center; padding: 0 14px; background-color: var(--mat);
  background-image: linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px), linear-gradient(var(--mat-line-2) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line-2) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px; background-position: 13px 17px; }
.ed-stage.flat { padding: 0; background-image: none; }
.ed-canvas { position: relative; flex: none; max-width: 100%; transition: width var(--t-slow) var(--ease); }
.ruler { position: relative; height: 18px; margin-top: 0; color: var(--faint); font: 500 9.5px/1 var(--font); overflow: hidden;
  background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px calc(var(--step) * 10)), repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px var(--step));
  background-size: 100% 9px, 100% 4px; background-position: 0 100%, 0 100%; background-repeat: no-repeat; }
.ruler span { position: absolute; top: 1px; padding-left: 3px; font-variant-numeric: tabular-nums; }
.ruler b { position: absolute; right: 0; top: 0; padding: 1px 0 3px 8px; background: var(--mat); color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-frame { position: relative; overflow: hidden; background: #fff; border-radius: 10px 10px 0 0; box-shadow: var(--sh-2), 0 0 0 1px var(--line); }
.ed-stage.flat .ed-frame { border-radius: 0; box-shadow: none; }
.ed-frame iframe { display: block; border: 0; transform-origin: 0 0; background: #fff; }
.ed-veil { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface); color: var(--muted); padding: 24px; text-align: center; }
body.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; } body.is-dragging iframe { pointer-events: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 500; padding: 7px 11px; border-radius: 9px; background: #16181D; color: #fff; font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--sh-3); pointer-events: none; white-space: nowrap; }
.drag-ghost.ok { background: var(--sel); }

/* ── поля панели ── */
.fields { display: flex; flex-direction: column; gap: 14px; }
.rich { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.rich:focus-within { border-color: var(--sel); box-shadow: 0 0 0 3px rgba(61, 107, 255, .2); }
.rich-bar { display: flex; gap: 1px; padding: 3px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rich-bar button { display: grid; place-items: center; width: 30px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: 14px; }
.rich-bar button:hover { background: var(--surface-3); color: var(--ink); } .rich-bar b, .rich-bar i { font-family: Georgia, serif; }
.rich-t { border: 0; border-radius: 0; min-height: 76px; max-height: 280px; overflow-y: auto; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-t:focus { box-shadow: none; } .rich-t:empty::before { content: attr(data-ph); color: var(--faint); }
.rich-t p { margin: 0 0 .5em; } .rich-t ul, .rich-t ol { margin: 0 0 .5em; padding-left: 1.3em; } .rich-t a { color: var(--link); text-decoration: underline; }
.imgf { display: flex; flex-direction: column; gap: 8px; }
.imgf-face { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface-2); cursor: pointer; }
.imgf-face img { width: 100%; height: 100%; object-fit: cover; }
.imgf.empty .imgf-face { aspect-ratio: auto; height: 72px; border-style: dashed; color: var(--muted); }
.imgf.empty .imgf-face span { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: var(--fs-sm); }
.imgf-face:hover { border-color: var(--sel); } .imgf-act { display: flex; gap: 6px; align-items: center; }
.linkf { display: flex; gap: 4px; align-items: center; }
.linkf-b { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; min-width: 0; }
.linkf-b .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .linkf-b.empty { color: var(--muted); } .linkf-b > .ic { color: var(--muted); }
.colorf { display: flex; flex-direction: column; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); cursor: pointer; flex: none; display: grid; place-items: center; color: var(--muted); }
.swatch.on { outline: 2px solid var(--pick); outline-offset: 2px; }
.swatch-own { width: var(--ctl); height: var(--ctl); border-radius: var(--r-sm); background-color: var(--c); overflow: hidden; }
.swatch-own input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); opacity: 0; cursor: pointer; }
@media (pointer: coarse) { .swatch { width: 36px; height: 36px; } }
.numf { display: flex; align-items: center; gap: 10px; } .numf .inp-wrap { width: 96px; flex: none; } .numf .range { flex: 1; }
.sub-box { display: flex; flex-direction: column; gap: 12px; padding: 10px; border-radius: var(--r); background: var(--surface-2); }

.listf { display: flex; flex-direction: column; gap: 8px; }
.listf-rows { display: flex; flex-direction: column; gap: 4px; }
.listf-row { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.listf-row.open { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.listf-h { display: flex; align-items: center; min-height: 38px; --ctl: 32px; padding-right: 2px; }
@media (pointer: coarse) { .listf-h { --ctl: 44px; } }
.listf-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: var(--ctl); padding: 0 4px; border: 0; background: none; color: var(--ink); text-align: left; font-weight: 500; font-size: var(--fs-sm); cursor: pointer; }
.listf-t .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .listf-t > .ic { color: var(--faint); }
.listf-th { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; }
.listf-b { padding: 10px; border-top: 1px solid var(--line); }
.grip { display: grid; place-items: center; width: 26px; height: var(--ctl, 32px); border: 0; background: none; color: var(--faint); cursor: grab; touch-action: none; flex: none; border-radius: 6px; }
.grip:hover { color: var(--ink); } .grip.ghost { cursor: default; }
@media (pointer: coarse) { .grip { width: 36px; } }
[data-sort][data-drag] { opacity: .4; }
[data-sort][data-drop]::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--sel); z-index: 2; }
[data-sort][data-drop="before"]::after { top: -4px; } [data-sort][data-drop="after"]::after { bottom: -4px; }

/* ── панель блока: вид ── */
.vtiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.vtile { display: flex; flex-direction: column; gap: 6px; padding: 7px 7px 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink-2); cursor: pointer; text-align: center; }
.vtile:hover { border-color: var(--faint); }
.vtile.on { border-color: var(--pick); box-shadow: 0 0 0 1px var(--pick); color: var(--ink); }
.vtile-n { font-size: 12.5px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.vtile-pic { display: grid; gap: 4px; height: 44px; padding: 7px; border-radius: 6px; background: var(--surface-2); }
.vtile-pic i { border-radius: 2px; background: var(--line-strong); }
.tp-0 { grid-template: 1fr 1fr 1fr / 1fr; justify-items: center; } .tp-0 i:nth-child(1) { width: 70%; background: var(--faint); } .tp-0 i:nth-child(2) { width: 90%; } .tp-0 i:nth-child(3) { width: 34%; }
.tp-1 { grid-template: 1fr 1fr / 1fr 1fr; } .tp-1 i:nth-child(1) { background: var(--faint); } .tp-1 i:nth-child(3) { grid-area: 1 / 2 / 3 / 3; }
.tp-2 { grid-template: 1fr / 1fr 1fr 1fr; } .tp-2 i:nth-child(2) { background: var(--faint); }
.tp-3 { grid-template: 2fr 1fr / 1fr 1fr; } .tp-3 i:nth-child(1) { grid-column: 1 / 3; background: var(--faint); }
.bgs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bgc { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 500; cursor: pointer; min-width: 0; }
.bgc i { width: 100%; height: 34px; border-radius: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); color: #fff; }
.bgc-none i { background: linear-gradient(to top right, transparent calc(50% - 1px), var(--line-strong) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), var(--surface); }
.bgc-soft i { background: var(--surface-3); } .bgc-accent i { background: var(--sel); } .bgc-dark i { background: #16181D; } .bgc-image i { background: linear-gradient(135deg, #6B7280, #1F2937); }
.bgc.on { color: var(--ink); font-weight: 700; } .bgc.on i { outline: 2px solid var(--pick); outline-offset: 2px; }
.bgc span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.insp-bare { display: flex; flex-direction: column; gap: 12px; padding: 0 0 8px; }

/* ── блоки ── */
.bgroup h3 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 4px 2px 6px; }
.bcards { display: flex; flex-direction: column; gap: 4px; }
.bcard { display: flex; align-items: center; gap: 11px; padding: 8px 8px 8px 10px; min-height: 52px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; touch-action: pan-y; transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.bcard:hover { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.bcard:active { transform: scale(.985); }
.bcard > .sic { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); }
.bcard-t { flex: 1; min-width: 0; } .bcard-t b { display: block; font-size: var(--fs-sm); } .bcard-t small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.bcard-plus { color: var(--faint); } .bcard:hover .bcard-plus { color: var(--ink); }

/* ── страницы ── */
.prows, .brows { display: flex; flex-direction: column; gap: 3px; }
.prow-wrap { position: relative; border-radius: 10px; } .prow-wrap.open { background: var(--surface-2); }
.prow, .brow { position: relative; display: flex; align-items: center; min-height: 42px; border-radius: 10px; --ctl: 32px; padding-right: 2px; }
@media (pointer: coarse) { .prow, .brow { --ctl: 44px; } }
.prow:hover, .brow:hover { background: var(--surface-2); }
.prow.on { background: var(--surface-3); } .brow.on { background: var(--sel-soft); box-shadow: inset 0 0 0 1px var(--sel); }
.prow-t, .brow-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 3px 4px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.prow-t b, .brow-t b { display: block; font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-t small, .brow-t small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow-t .sic { color: var(--muted); } .brow.off .brow-t { opacity: .5; }
.page-form { padding: 6px 10px 12px; }
.brow-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: var(--fs-sm); }

/* ── оформление ── */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.preset { display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; min-width: 0; }
.preset-pic { position: relative; display: flex; align-items: flex-end; justify-content: space-between; height: 58px; padding: 8px 9px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .28); }
.preset-pic b { font-size: 21px; line-height: 1; font-weight: 700; } .preset-pic i { width: 22px; height: 12px; }
.preset-n { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding-left: 2px; }
.preset.on .preset-pic { outline: 2px solid var(--pick); outline-offset: 2px; } .preset.on .preset-n { font-weight: 700; color: var(--ink); }
.preset:hover .preset-pic { box-shadow: inset 0 0 0 1px var(--faint); }
.fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.fontb { height: calc(var(--ctl) + 2px); padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer; overflow: hidden; }
.fontb span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fontb:hover { border-color: var(--faint); } .fontb.on { border-color: var(--pick); box-shadow: 0 0 0 1px var(--pick); }

/* ── заявки ── */
.lead-filters { display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px; padding: 2px 12px; scrollbar-width: none; flex: none; } .lead-filters::-webkit-scrollbar { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: calc(var(--ctl) - 6px); padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; flex: none; cursor: pointer; }
.fchip i { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip.on { background: var(--pick); border-color: var(--pick); color: var(--on-pick); font-weight: 600; } .fchip.on i { color: inherit; opacity: .8; }
.leads { display: flex; flex-direction: column; gap: 6px; }
.lead { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.lead.st-new { border-color: color-mix(in srgb, var(--st-new) 45%, var(--line)); background: color-mix(in srgb, var(--st-new-bg) 45%, var(--surface)); }
.lead.open { box-shadow: var(--sh-1); border-color: var(--line-strong); }
.lead-h { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 7px 10px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.lead-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; min-width: 26px; }
.lead-who b { display: block; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lead-who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stchip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; flex: none; }
.stchip.st-new { background: var(--st-new-bg); color: var(--st-new); } .stchip.st-work { background: var(--st-work-bg); color: var(--st-work); }
.stchip.st-done { background: var(--st-done-bg); color: var(--st-done); } .stchip.st-spam { background: var(--st-spam-bg); color: var(--st-spam); }
.lead-b { display: flex; flex-direction: column; gap: 10px; padding: 4px 10px 10px; }
.answers { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 9px; background: var(--surface-2); }
.answers dt { font-size: 11.5px; color: var(--muted); } .answers dd { margin: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; }
a.btn { color: var(--ink); } a.btn-primary { color: var(--on-primary); }

/* ── статистика ── */
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.totals div { padding: 10px 10px 9px; border-radius: 11px; background: var(--surface-2); min-width: 0; }
.totals b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; } .totals span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; margin-top: 3px; }
.chart { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.chart-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 20px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.chart-cap b { color: var(--ink); font-weight: 600; }
.lg { display: inline-flex; align-items: center; gap: 6px; } .lg i { display: block; } .lg-v { width: 8px; height: 10px; border-radius: 2px 2px 0 0; background: var(--viz-1); } .lg-l { width: 9px; height: 9px; border-radius: 50%; background: var(--viz-2); }
.chart-plot { position: relative; height: 150px; }
.chart-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { position: relative; border-top: 1px dashed var(--line); height: 0; } .chart-grid span:last-child { border-top: 1px solid var(--line-strong); }
.chart-grid i { position: absolute; right: 0; top: 2px; font-size: 10px; font-style: normal; color: var(--faint); background: var(--surface); padding-left: 3px; }
.chart-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: stretch; }
.col-hit { position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px; border: 0; background: none; cursor: default; min-width: 0; }
.col-hit > i { display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--viz-1); transition: height var(--t-slow) var(--ease), opacity var(--t-fast); }
.chart-cols:hover .col-hit > i { opacity: .45; } .chart-cols .col-hit:hover > i, .col-hit.on > i { opacity: 1; }
.col-hit.on { background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 4px 4px 0 0; }
.col-hit:focus-visible { box-shadow: inset 0 0 0 2px var(--sel); }
.lead-dot { position: absolute; left: 50%; transform: translateX(-50%); min-width: 9px; height: 9px; padding: 0 2px; border-radius: 99px; background: var(--viz-2); color: #fff; font: 700 8px/9px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.lead-dot:not(:empty) { min-width: 13px; height: 13px; line-height: 13px; font-size: 9px; }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { position: relative; display: flex; justify-content: space-between; gap: 10px; padding-bottom: 7px; font-size: var(--fs-sm); }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar-v { color: var(--ink); font-weight: 600; }
.hbar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--surface-3); }
.hbar i { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 4px; background: var(--viz-1); }

/* ── настройки и публикация ── */
.slug { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.slug:focus-within { border-color: var(--sel); box-shadow: 0 0 0 3px rgba(61, 107, 255, .2); }
.slug-pre { padding: 0 2px 0 10px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; direction: rtl; flex: none; }
.slug .inp { border: 0; border-radius: 0; box-shadow: none !important; padding-left: 4px; background: var(--surface); font-weight: 600; min-width: 0; }
.imgrow { display: flex; align-items: center; gap: 8px; }
.imgrow-face { width: 84px; height: 46px; border-radius: 9px; border: 1px solid var(--line-strong); padding: 0; overflow: hidden; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.imgrow-face.sq { width: 46px; } .imgrow-face.empty { border-style: dashed; } .imgrow-face img { width: 100%; height: 100%; object-fit: cover; }
.dlg-pub { max-width: 560px; }
.pub { display: flex; gap: 20px; align-items: center; }
.pub-qr { width: 168px; height: 168px; flex: none; display: grid; place-items: center; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: #16181D; }
.pub-qr > div { width: 100%; height: 100%; } .pub-qr svg { width: 100%; height: 100%; display: block; }
.pub-t { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 1; }
.pub-url { display: flex; align-items: center; gap: 4px; padding: 2px 2px 2px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.pub-url a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
@media (max-width: 520px) { .pub { flex-direction: column; align-items: stretch; } .pub-qr { align-self: center; } }

/* ── телефон ── */
.ed.is-phone { grid-template-rows: 50px minmax(0, 1fr) auto; --ctl: 44px; }
.is-phone .ed-top { padding: 0 6px 0 0; gap: 0; --ctl: 44px; }
.is-phone .ed-top .ibtn { width: 44px; }
.m-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px; border: 0; background: none; color: var(--ink); text-align: left; }
.m-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); } .m-title > .ic { color: var(--faint); }
.is-phone .savest { height: 24px; background: none !important; padding: 0 2px; }
.is-phone .pub-btn { height: 40px; padding: 0 11px; margin-left: 4px; }
.is-phone .pub-btn.btn-done { width: 44px; padding: 0; } .is-phone .pub-btn.btn-done .btn-t { display: none; }
.is-phone .ed-stage { padding-bottom: var(--sheet-pad, 0px); transition: padding-bottom var(--t-slow) var(--ease); }
.m-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 40; position: relative; }
.m-nav button { min-height: 50px; justify-content: center; min-width: 0; padding: 4px 2px; }
.m-nav .rail-ic { width: 46px; height: 28px; }
.m-strip { position: fixed; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 35; display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: #16181D; color: #E9EBEF; box-shadow: var(--sh-3), 0 0 0 1px rgba(255, 255, 255, .08); animation: pop var(--t-slow) var(--ease) both; overflow-x: auto; scrollbar-width: none; }
.m-strip::-webkit-scrollbar { display: none; }
.m-strip button { flex: 1 1 0; min-width: 44px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; border: 0; border-radius: 12px; background: none; color: inherit; font-size: 10px; font-weight: 500; white-space: nowrap; }
.m-strip button:disabled { opacity: .3; } .m-strip button:active:not(:disabled) { background: #2B2F38; }
.m-strip button.main { background: var(--lime); color: #16181D; font-weight: 700; flex: 1.7 1 0; }
.m-strip button.x { flex: 0 0 44px; }
.m-strip button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; } .m-strip button.danger { color: #FF9C9C; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; --sheet-h: 52dvh; height: var(--sheet-h); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .22), 0 0 0 1px var(--line); animation: rise var(--t-slow) var(--ease) both; transition: height var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.sheet-full { --sheet-h: calc(100dvh - 56px); } .sheet-auto { height: auto; max-height: 70dvh; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-h { flex: none; padding: 6px 6px 4px 16px; touch-action: none; cursor: grab; }
.sheet-grab { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto 2px; }
.sheet-t { display: flex; align-items: center; gap: 2px; } .sheet-t h2 { flex: 1; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-b { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; overscroll-behavior: contain; }
.sheet-b > .pane-b { padding: 4px 14px 24px; } .sheet-b > .insp-bare { padding: 2px 14px 24px; }
.more-list { display: flex; flex-direction: column; padding: 0 8px 12px; }
.more-list button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; font-weight: 500; font-size: var(--fs-md); }
.more-list button > span:not(.ic) { flex: 1; } .more-list button .ic { color: var(--muted); } .more-list button:active { background: var(--surface-3); }

@media (prefers-reduced-motion: reduce) { .ed-panel, .ed-insp, .sheet, .m-strip { animation: none; } .ed-canvas { transition: none; } }
