/* ArchiFlow — мудборд: свободная доска (Claude, 18.11.2026; макет утверждён владелицей).
   Один файл стилей на доску в приложении (board-v13.js, корень .afb) и на показ листа на весь экран (board-view-v13.js,
   корень .afbv — «Показать клиенту» и кабинет клиента). Лист — 1600 × 1000 единиц, масштабируется целиком (transform),
   поэтому толщина рамок и размер ручек делятся на масштаб (--iz). Телефон: класс .afb-phone — панель добавления внизу,
   листы — строкой, которая листается вбок, ручки крупнее. Всё внутри .afb / .afbv — стили приложения не задеваются.
   23.11.2026: палитра цвета (.cpk), поле и список размера шрифта (.fsb, .szp), список шрифтов по группам (.fnp), боковые ручки
   ширины текста (.sd), панель над элементом в две строки (.tb.two) и с переносом, направляющие — тонкие отрезки внутри листа,
   надпись пустого листа — внутри листа. */
.afb, .afbv {
  --s0: #1c1c1e; --s1: #232325; --s2: #2a2a2d; --s3: #323235;
  --line: rgba(255,255,255,.085); --line2: rgba(255,255,255,.16);
  --tx: #ECEAE5; --mu: #8d8a85; --ac: #c8b58a; --acd: rgba(200,181,138,.14);
  --sans: -apple-system, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
  --paper: #ebe4d5; --ink: #2b2620;
  font-family: var(--sans); font-size: 13px; line-height: 1.4; color: var(--tx);
}
.afb *, .afbv * { box-sizing: border-box; }
.afb button, .afbv button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.afb input, .afbv input { font: inherit; color: inherit; }
.afb .i, .afbv .i { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* раздел «Мудборд» занимает всю высоту панели проекта */
.afg[data-page="mood"].afb-on { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; padding-left: 0; padding-right: 0; }
.afg[data-page="mood"].afb-on > .afg-head { padding-left: 22px; padding-right: 22px; flex: none; }
.afg[data-page="mood"].afb-on > .afg-body { flex: 1; min-height: 0; padding: 0; display: flex; }
html.afs-phone .afg[data-page="mood"].afb-on > .afg-head { padding-left: 14px; padding-right: 14px; }
.afb-slot { flex: 1; min-width: 0; min-height: 0; display: flex; }
.afb { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--s0); outline: none; overflow: hidden; }
.afb.loading .vp { opacity: .4; pointer-events: none; }

/* шапка доски */
.afb .bhd { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; flex: none; }
.afb .btitle { background: transparent; border: 1px solid transparent; border-radius: 8px; font: 600 17px var(--sans); color: var(--tx); padding: 4px 8px; width: 370px; max-width: 100%; min-width: 90px; flex: 1 1 370px; outline: none; letter-spacing: -.01em; text-overflow: ellipsis; }
.afb .btitle:hover { border-color: var(--line2); }
.afb .btitle:focus { border-color: var(--ac); background: var(--s1); }
.afb .btitle[readonly] { pointer-events: none; }
.afb .sp { flex: 0 0 0; }
.afb .btn, .afbv .btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 99px; background: var(--s1); font-size: 12.5px; white-space: nowrap; color: var(--tx); flex: none; }
.afb .btn:hover, .afbv .btn:hover { background: var(--s2); }
.afb .btn.pri { background: var(--ac); border-color: var(--ac); color: #25200f; font-weight: 600; }
.afb .btn.pri:hover { background: #d6c59f; }
.afb .btn.ic, .afbv .btn.ic { width: 32px; padding: 0; justify-content: center; }
.afb .btn:disabled { opacity: .35; cursor: default; }
.afb .btn.busy { opacity: .6; pointer-events: none; }
.afb .ghost { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--line2); border-radius: 99px; color: var(--ac); font-size: 12px; white-space: nowrap; flex: none; }
.afb .ghost:hover { background: var(--acd); border-color: rgba(200,181,138,.5); }
.afb .ghost.busy { opacity: .55; pointer-events: none; }
.afb .trow { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; flex: none; border-bottom: 1px solid var(--line); }
.afb .arow { display: none; gap: 6px; padding: 0 12px 8px; overflow-x: auto; flex: none; scrollbar-width: none; }
.afb .arow::-webkit-scrollbar, .afb .stabs::-webkit-scrollbar { display: none; }

/* листы */
.afb .stabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; align-items: center; }
.afb .stabs .tab { height: 28px; padding: 0 6px 0 13px; border-radius: 99px; border: 1px solid var(--line); color: var(--mu); font-size: 12.5px; white-space: nowrap; display: flex; align-items: center; gap: 4px; touch-action: pan-x; flex: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.afb .stabs .tab:not(.on) { padding-right: 13px; }
.afb .stabs .tab.on { background: var(--acd); border-color: rgba(200,181,138,.5); color: var(--ac); }
.afb .stabs .tab.dragging { opacity: .5; }
.afb .stabs .tm { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: var(--ac); }
.afb .stabs .tm:hover { background: rgba(200,181,138,.22); }
.afb .stabs .ti { background: transparent; border: 0; outline: 0; color: var(--ac); font: inherit; width: 110px; padding: 0; }
.afb .stabs .tadd { width: 28px; height: 28px; border-radius: 50%; border: 1px dashed var(--line2); color: var(--mu); display: grid; place-items: center; flex: none; }
.afb .stabs .tadd:hover { color: var(--ac); border-color: rgba(200,181,138,.6); }
.afb .stabs .bgchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin-left: 6px; border-radius: 99px; background: var(--s2); font-size: 11.5px; color: var(--mu); white-space: nowrap; flex: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.afb .stabs .bgchip:hover { color: var(--tx); background: var(--s3); }
.afb .tmenu { position: absolute; z-index: 65; display: none; background: #2c2c2f; border: 1px solid var(--line2); border-radius: 12px; padding: 5px; min-width: 180px; box-shadow: 0 18px 44px rgba(0,0,0,.55); }
.afb .tmenu.open { display: block; }
.afb .tmenu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; }
.afb .tmenu button:hover { background: var(--s3); }
.afb .tmenu button:disabled { opacity: .35; }
.afb .tmenu .i { color: var(--ac); }

/* поле доски */
.afb .vp { position: relative; flex: 1; min-height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #151516 radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0/22px 22px; --iz: 2; --hs: 13px; cursor: default; }
.afb .vp.pan { cursor: grab; }
@media (pointer: coarse) { .afb .vp { --hs: 22px; } }
.afb .world, .afbv .world { position: absolute; left: 0; top: 0; transform-origin: 0 0; width: 0; height: 0; }
.afb .sheet, .afbv .sheet { position: absolute; left: 0; top: 0; width: 1600px; height: 1000px; background-color: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.55); overflow: hidden; }
.afb .layer, .afbv .layer { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.afb .afm-title { display: none; }

/* элементы листа (общие для доски и показа) */
.afb-el { position: absolute; touch-action: none; color: var(--ink); font-family: var(--sans); font-size: 13px; line-height: 1.4; }
.afb .vp .afb-el { cursor: move; }
.afb .vp .afb-el.lock { cursor: default; }
.afb .vp.ro .afb-el { cursor: default; }
.afb .vp:not(.ro) .afb-el:not(.lock):hover { outline: calc(1.5px*var(--iz)) solid rgba(200,181,138,.75); }
.afb .vp .afb-el.sel { outline: calc(1.5px*var(--iz)) solid rgba(200,181,138,.9); }
.afb-el .in { position: absolute; inset: 0; }
.afb-el.k-photo .in { overflow: hidden; border-radius: 3px; box-shadow: 0 12px 26px rgba(40,30,15,.22); background: #bba98a; }
.afb-el.k-photo.bg .in { box-shadow: none; border-radius: 0; background: transparent; }
.afb-el .cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.afb-el.bg .cv { object-fit: contain; }
.afb-el .hole { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 8px; color: #6e5a2e; font-size: 16px; background: repeating-linear-gradient(45deg, #d9ccb1, #d9ccb1 14px, #d2c4a7 14px, #d2c4a7 28px); border: 2px dashed #a58d5d; border-radius: 3px; overflow: hidden; }
.afb-el .hole .i { margin: 0 auto 4px; }
.afb-el.k-piece .in { display: flex; flex-direction: column; align-items: center; }
.afb-el.k-piece .cv { position: relative; inset: auto; flex: 1 1 0; min-height: 0; object-fit: contain; }
.afb-el.k-piece .hole { position: relative; inset: auto; flex: 1 1 0; min-height: 0; width: 100%; background: rgba(246,241,229,.75); border-style: solid; border-width: 1px; }
.afb-el .lbl { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; padding-top: 4px; white-space: nowrap; flex: none; }
.afb-el .hand { font-family: var(--hand); font-size: 19px; color: var(--ink); }
.afb-el .ffe { font-style: normal; font-size: 12px; padding: 1px 8px; border: 1px solid #a58d5d; color: #6e5a2e; border-radius: 99px; background: rgba(200,181,138,.28); }
.afb-el .ffe[data-act] { cursor: pointer; }
.afb-el .cap { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 14px; background: rgba(236,229,214,.92); padding: 3px 9px; border-radius: 2px; color: var(--ink); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afb-el.k-chip .in { padding: 10px 12px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 3px; box-shadow: 0 8px 18px rgba(40,30,15,.18); overflow: hidden; }
.afb-el.k-chip b { font-weight: 600; font-size: 16px; line-height: 1.15; }
.afb-el.k-chip u { text-decoration: none; font-size: 13px; opacity: .75; letter-spacing: .05em; }
.afb-el.k-text .in { position: relative; inset: auto; }
.afb-el .tx { white-space: pre-wrap; word-break: break-word; line-height: 1.22; outline: none; min-height: 1em; }
.afb-el .tx[contenteditable] { cursor: text; outline: calc(1.5px*var(--iz)) dashed var(--ac); outline-offset: 4px; user-select: text; -webkit-user-select: text; }
.afb-el .ts-l { letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.afb-el.k-link .in { background: #f6f1e6; border-radius: 10px; box-shadow: 0 10px 24px rgba(40,30,15,.2); display: flex; gap: 14px; align-items: center; padding: 12px 16px; overflow: hidden; }
.afb-el .fav { width: 46px; height: 46px; border-radius: 50%; background: #c8b58a; display: grid; place-items: center; font-weight: 600; font-size: 20px; color: #2a2418; flex: none; }
.afb-el .lk-t { min-width: 0; flex: 1; }
.afb-el .lk-t b { display: block; font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afb-el .lk-t span { font-size: 15px; color: #7a6f5c; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afb-el .lk-o { flex: none; border: 1px solid #a58d5d; border-radius: 99px; padding: 5px 12px; font-size: 14px; color: #6e5a2e; background: rgba(200,181,138,.25); cursor: pointer; }
.afb-el .lkb { position: absolute; right: calc(-10px*var(--iz, 1)); top: calc(-10px*var(--iz, 1)); width: calc(30px*var(--iz, 1)); height: calc(30px*var(--iz, 1)); border-radius: 50%; background: #1f1d1a; color: #c8b58a; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer; z-index: 3; }
.afb-el .lkb .i { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.afbv .afb-el .lkb { width: 30px; height: 30px; right: -9px; top: -9px; }

/* рамка выделения, ручки, направляющие */
.afb .sb { position: absolute; pointer-events: none; border: calc(2px*var(--iz)) solid var(--ac); display: none; z-index: 9000; transform-origin: 50% 50%; }
.afb .sb.multi { border-style: dashed; border-width: calc(1.5px*var(--iz)); }
.afb .sb .hd, .afb .sb .rh { position: absolute; pointer-events: auto; touch-action: none; width: calc(var(--hs)*var(--iz)); height: calc(var(--hs)*var(--iz)); background: #fff; border: calc(2px*var(--iz)) solid var(--ac); border-radius: calc(3px*var(--iz)); }
.afb .sb.multi .hd, .afb .sb.multi .rh, .afb .sb.multi .stem, .afb .sb.lock .hd, .afb .sb.lock .rh, .afb .sb.lock .stem { display: none; }
.afb .hd[data-h=tl] { left: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); top: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); cursor: nwse-resize; }
.afb .hd[data-h=tr] { right: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); top: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); cursor: nesw-resize; }
.afb .hd[data-h=bl] { left: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); bottom: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); cursor: nesw-resize; }
.afb .hd[data-h=br] { right: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); bottom: calc(var(--hs)*var(--iz)/-2 - 1px*var(--iz)); cursor: nwse-resize; }
.afb .sb .rh { left: 50%; margin-left: calc(var(--hs)*var(--iz)/-2); top: calc(-46px*var(--iz)); border-radius: 50%; cursor: grab; }
.afb .sb .stem { position: absolute; left: 50%; top: calc(-34px*var(--iz)); width: calc(1.5px*var(--iz)); height: calc(34px*var(--iz)); background: var(--ac); }
.afb .mq { position: absolute; display: none; border: calc(1px*var(--iz)) solid var(--ac); background: rgba(200,181,138,.1); z-index: 9001; pointer-events: none; }
.afb .gd { position: absolute; background: rgba(168,116,90,.6); pointer-events: none; z-index: 9002; }
.afb .gd.v { width: calc(1px*var(--iz)); margin-left: calc(-.5px*var(--iz)); }
.afb .gd.h { height: calc(1px*var(--iz)); margin-top: calc(-.5px*var(--iz)); }
.afb .vp.drag, .afb .vp.drag * { user-select: none !important; -webkit-user-select: none !important; }
.afb .vp .afb-el, .afb .vp .afb-el img { -webkit-user-drag: none; }
/* боковые ручки текста: ширина строки */
.afb .sb .sd { display: none; width: calc(var(--hs)*var(--iz)*.6); height: calc(var(--hs)*var(--iz)*1.5); top: 50%; margin-top: calc(var(--hs)*var(--iz)*-.75); border-radius: calc(var(--hs)*var(--iz)*.3); cursor: ew-resize; }
.afb .sb.txt .sd { display: block; }
.afb .sb.multi .sd, .afb .sb.lock .sd { display: none; }
.afb .sd[data-h=ml] { left: calc(var(--hs)*var(--iz)*-.3 - 1px*var(--iz)); }
.afb .sd[data-h=mr] { right: calc(var(--hs)*var(--iz)*-.3 - 1px*var(--iz)); }
.afb .sb.sm .sd[data-h=ml] { left: calc(var(--hs)*var(--iz)*-1.45); }
.afb .sb.sm .sd[data-h=mr] { right: calc(var(--hs)*var(--iz)*-1.45); }

/* панели поверх поля */
.afb .tb { position: absolute; z-index: 30; display: none; align-items: center; gap: 1px; background: #2c2c2f; border: 1px solid var(--line2); border-radius: 12px; padding: 3px; box-shadow: 0 12px 34px rgba(0,0,0,.5); transform: translateX(-50%); width: max-content; max-width: calc(100% - 12px); flex-wrap: wrap; justify-content: center; row-gap: 1px; }
.afb .tb.two { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.afb .tb .r { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1px; row-gap: 1px; }
.afb .tb .fsb { display: flex; align-items: center; height: 30px; margin-left: 3px; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; flex: none; }
.afb .tb .fsb:focus-within { border-color: var(--ac); }
.afb .tb .fsz { width: 40px; height: 28px; border: 0; outline: 0; background: transparent; color: var(--tx); text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; padding: 0 0 0 4px; user-select: text; -webkit-user-select: text; }
.afb .tb .fsb button { width: 22px; height: 28px; border-radius: 0; color: var(--mu); }
.afb .tb .sw.rb { background: conic-gradient(#e0523f, #e0b23f, #7fb24a, #3fa7b8, #4a62c8, #a24ac8, #e0523f); border-color: rgba(255,255,255,.5); position: relative; }
.afb .tb .sw.rb[style]::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.35); }
.afb .tb::-webkit-scrollbar { display: none; }
.afb .tb button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #d9d6cf; position: relative; font-size: 12px; font-weight: 600; flex: none; }
.afb .tb button:hover { background: var(--s3); color: #fff; }
.afb .tb button.on { background: var(--acd); color: var(--ac); }
.afb .tb .sep { width: 1px; height: 18px; background: var(--line2); margin: 0 3px; flex: none; }
.afb .tb .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); display: block; }
.afb .tb .fb { width: auto; padding: 0 9px; gap: 6px; display: flex; align-items: center; font-weight: 400; font-size: 14px; min-width: 120px; max-width: 170px; justify-content: space-between; }
.afb .tb .fb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.afb .lt { position: absolute; left: 10px; top: 10px; z-index: 30; display: flex; flex-direction: column; gap: 2px; background: #2c2c2f; border: 1px solid var(--line2); border-radius: 14px; padding: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.afb .lt button { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #cfcdc8; position: relative; }
.afb .lt button:hover { background: var(--s3); color: #fff; }
.afb .lt .pl { background: var(--ac); color: #25200f; }
.afb .lt .pl:hover { background: #d6c59f; color: #25200f; }
.afb .lt hr { width: 20px; border: 0; border-top: 1px solid var(--line2); margin: 3px auto; }
.afb .zc { position: absolute; right: 10px; bottom: 10px; z-index: 30; display: flex; align-items: center; gap: 2px; background: #2c2c2f; border: 1px solid var(--line2); border-radius: 99px; padding: 3px; font-size: 12px; }
.afb .zc button { height: 28px; min-width: 28px; border-radius: 99px; padding: 0 8px; color: #cfcdc8; display: grid; place-items: center; }
.afb .zc button:hover { background: var(--s3); }
.afb .zc .zl { min-width: 44px; text-align: center; color: var(--mu); font-variant-numeric: tabular-nums; }
.afb .bhint { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 20; background: rgba(44,44,47,.92); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 12px; font-size: 11px; color: var(--mu); white-space: nowrap; pointer-events: none; display: none; }
.afb .emptyh { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; color: #6f6a61; text-align: center; font-size: 13px; overflow: hidden; }
.afb .emptyh span { display: block; max-width: 100%; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }
.afb.loading .emptyh, .afb .emptyh:not([style]) { color: var(--mu); }
.afb .emptyh.on { display: none; } /* 23.11.2026: владелица — пустой лист без надписей */
.afb .savest { position: absolute; left: 12px; bottom: 10px; z-index: 20; font-size: 11px; color: var(--mu); pointer-events: none; opacity: 0; transition: opacity .2s; }
.afb .savest.on { opacity: 1; }
.afb .savest.berr { color: #e0a08a; }

/* всплывающие окна: добавить, галерея, FF&E, шрифт, ссылка, цвет */
.afb .pop { position: absolute; z-index: 40; background: #2c2c2f; border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: 0 18px 50px rgba(0,0,0,.55); display: none; width: 300px; max-width: calc(100% - 12px); max-height: calc(100% - 12px); overflow: auto; }
.afb .pop.open { display: block; }
.afb .am { display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left; padding: 8px; border-radius: 9px; }
.afb .am:hover { background: var(--s3); }
.afb .am .ti { color: var(--ac); margin-top: 1px; flex: none; width: 36px; display: grid; place-items: center; }
.afb .am .ti img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; display: block; }
.afb .am b { display: block; font-weight: 500; font-size: 12.5px; }
.afb .am small { display: block; color: var(--mu); font-size: 11px; line-height: 1.3; }
.afb .pop h4 { margin: 4px 8px 8px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); font-weight: 400; }
.afb .pop .bnone { color: var(--mu); font-size: 12px; padding: 4px 8px 10px; }
.afb .gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 4px 4px; }
.afb .gal button { display: grid; gap: 3px; text-align: left; font-size: 10.5px; color: var(--mu); min-width: 0; }
.afb .gal button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afb .gal img { width: 100%; aspect-ratio: 1.25; object-fit: cover; border-radius: 6px; display: block; background: var(--s3); }
.afb .gal button:hover img { outline: 2px solid var(--ac); }
.afb .pf { display: grid; gap: 8px; padding: 6px 8px 8px; }
.afb .pf label { display: grid; gap: 4px; font-size: 11px; color: var(--mu); }
.afb .pf input { height: 34px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s0); padding: 0 10px; color: var(--tx); outline: none; width: 100%; font-size: 16px; }
.afb .pf input:focus { border-color: var(--ac); }
.afb .pf input.bad { border-color: #d98a6a; }
.afb .pf .row { display: flex; gap: 6px; align-items: center; }
.afb .pf .btn { height: 32px; justify-content: center; }
.afb .pal6 { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 0; }
.afb .pal6 button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.afb .pal6 button:hover { outline: 2px solid var(--ac); }
.afb .pop.fnp { width: 340px; }
.afb .pop.fnp h4 { margin: 8px 8px 4px; }
.afb .fontlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4px; }
.afb .fontlist button { display: block; width: 100%; min-width: 0; text-align: left; padding: 6px 9px; border-radius: 8px; font-size: 16px; line-height: 1.25; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afb .fontlist button:hover { background: var(--s3); }
.afb .fontlist button.on { background: var(--acd); color: var(--ac); }
/* список размеров шрифта */
.afb .pop.szp { width: 76px; max-height: min(264px, calc(100% - 12px)); padding: 4px; border-radius: 10px; }
.afb .szlist button { display: block; width: 100%; height: 26px; border-radius: 6px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--tx); }
.afb .szlist button:hover { background: var(--s3); }
.afb .szlist button.on { background: var(--acd); color: var(--ac); }
/* палитра: квадрат насыщенность / яркость, полоса тона, HEX и R G B, готовые и недавние цвета */
.afb .pop.cpp { width: 288px; }
.afb .pop .cph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 8px 0 0; }
.afb .pop .cph h4 { margin: 4px 8px; }
.afb .pop .cph .btn { height: 26px; padding: 0 12px; font-size: 12px; }
.afb.afb-phone .cpk { gap: 7px; }
.afb.afb-phone .cpk .sv { height: 96px; }
.afb.afb-phone .cpk .pal6 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; }
.afb.afb-phone .cpk .pal6::-webkit-scrollbar { display: none; }
.afb.afb-phone .cpk .rec span { display: none; }
.afb.afb-phone .pop.cpp .pf { gap: 7px; padding-top: 2px; }
.afb .cpk { display: grid; gap: 9px; min-width: 0; }
.afb .cpk .sv { position: relative; height: 150px; border-radius: 9px; touch-action: none; cursor: crosshair; background-image: linear-gradient(to top, #000, rgba(0,0,0,0)), linear-gradient(to right, #fff, rgba(255,255,255,0)); border: 1px solid var(--line2); }
.afb .cpk .hue { position: relative; height: 14px; border-radius: 7px; touch-action: none; cursor: ew-resize; margin: 0 7px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.afb .cpk .hue::before { content: ""; position: absolute; inset: -8px -7px; }
.afb .cpk .sv i, .afb .cpk .hue i { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.afb .cpk .hue i { top: 50%; }
.afb .cpk .cin { display: grid; grid-template-columns: 1.9fr 1fr 1fr 1fr; gap: 6px; }
.afb .cpk .cin label { min-width: 0; }
.afb .cpk .cin input { padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.afb .cpk .pal6 { gap: 6px; }
.afb .cpk .pal6 button { width: 24px; height: 24px; flex: none; }
.afb .cpk .pal6 button.on { outline: 2px solid var(--ac); outline-offset: 1px; }
.afb .cpk .rec { display: grid; gap: 4px; }
.afb .cpk .rec span { font-size: 11px; color: var(--mu); }
@media (pointer: coarse) { .afb .cpk .pal6 button { width: 27px; height: 27px; } .afb .cpk .hue { height: 18px; border-radius: 9px; } }

/* «Мои шаблоны» */
.afb .mbg { position: absolute; inset: 0; background: rgba(8,8,9,.62); backdrop-filter: blur(3px); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.afb.ch-open .mbg { opacity: 1; pointer-events: auto; }
.afb .bmodal { position: absolute; z-index: 51; left: 50%; top: 50%; width: 700px; max-width: 94%; max-height: 92%; transform: translate(-50%, -48%) scale(.98); opacity: 0; pointer-events: none; transition: .2s; background: var(--s1); border: 1px solid var(--line2); border-radius: 18px; display: flex; flex-direction: column; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.afb.ch-open .bmodal { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.afb .ch { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.afb .ch-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.afb .ch-h h2 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; }
.afb .ch-b { padding: 12px 20px 18px; overflow-y: auto; min-height: 0; flex: 1; }
.afb .sqb { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--mu); }
.afb .sqb:hover { background: var(--s2); color: var(--tx); }
.afb .tg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.afb .tc { position: relative; display: grid; gap: 8px; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--s0); align-content: start; }
.afb .tc:hover { border-color: rgba(200,181,138,.6); background: #202022; }
.afb .tc b { font-weight: 600; font-size: 13px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.afb .tc small { color: var(--mu); font-size: 11.5px; padding: 0 4px 4px; line-height: 1.35; display: block; }
.afb .tc .tacts { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 2px 2px; }
.afb .tc .tacts .btn { height: 26px; padding: 0 9px; font-size: 11.5px; }
.afb .tc .trm { position: absolute; right: 12px; top: 12px; z-index: 3; width: 24px; height: 24px; border-radius: 50%; background: rgba(20,20,21,.75); color: #ddd; display: grid; place-items: center; }
.afb .tc .trm:hover { background: #7a3128; color: #fff; }
.afb .th { position: relative; aspect-ratio: 1.6; background: #e9e2d3; border-radius: 8px; overflow: hidden; }
.afb .th i { position: absolute; display: block; border-radius: 1.5px; background: #b6a384; }
.afb .th i.k-chip { background: var(--c); }
.afb .th i.k-text { background: linear-gradient(#3a342b, #3a342b) 0 0/70% 18%, linear-gradient(#a59a86, #a59a86) 0 45%/90% 10%, linear-gradient(#a59a86, #a59a86) 0 70%/60% 10%; background-repeat: no-repeat; border-radius: 0; }
.afb .th i.k-piece { background: #f6f1e5; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.afb .th i.k-link { background: #f6f1e6; border: 1px solid #c8b58a; }
.afb .th .pdfb { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 9.5px; letter-spacing: .08em; background: #a2382f; color: #fff; border-radius: 4px; padding: 1px 5px; }
.afb .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.afb .act-tile { display: grid; place-items: center; text-align: center; min-height: 130px; border: 1px dashed var(--line2); border-radius: 14px; color: var(--mu); padding: 12px; }
.afb .act-tile:hover { border-color: rgba(200,181,138,.6); color: var(--ac); background: var(--acd); }
.afb .act-tile b, .afb .act-tile small { display: block; }
.afb .act-tile b { font-weight: 500; font-size: 13px; color: var(--tx); }
.afb .act-tile small { font-size: 11.5px; line-height: 1.3; margin-top: 3px; }
.afb .act-tile .ci { width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px; }
.afb .sec-t { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); margin: 18px 0 10px; }
.afb .toast { position: absolute; z-index: 80; left: 50%; bottom: 20px; transform: translate(-50%, 14px); background: #2f2f33; border: 1px solid var(--line2); padding: 9px 16px; border-radius: 99px; font-size: 12.5px; opacity: 0; pointer-events: none; transition: .25s; display: flex; align-items: center; gap: 8px; max-width: 92%; text-align: center; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.afb .toast.show { opacity: 1; transform: translate(-50%, 0); }
.afb .toast i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); flex: none; }
.afb .toast.berr i { background: #d98a6a; }

/* телефон */
.afb .pbar { display: none; align-items: center; justify-content: space-between; gap: 2px; padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); flex: none; background: var(--s1); }
.afb .pbar button { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #cfcdc8; }
.afb .pbar button.pl { background: var(--ac); color: #25200f; }
.afb .pbar button:disabled { opacity: .3; }
.afb .pbar .sep { width: 1px; height: 22px; background: var(--line2); }
.afb.afb-phone .bhd { padding: 2px 12px 8px; gap: 6px; }
.afb.afb-phone .btitle { flex: 1 1 auto; width: auto; min-width: 0; font-size: 16px; padding: 4px 4px; }
.afb.afb-phone .bhd [data-act=tpl-open] { width: 32px; padding: 0; justify-content: center; }
.afb.afb-phone .bhd [data-act=tpl-open] span { display: none; }
.afb.afb-phone .bhd .sp, .afb.afb-phone .bhd [data-act=undo], .afb.afb-phone .bhd [data-act=redo] { display: none; }
.afb.afb-phone .bhd .btn.pri { padding: 0 11px; }
.afb.afb-phone .bhd .btn .lab-l, .afb.afb-mid .bhd .btn .lab-l { display: none; }
.afb:not(.afb-phone):not(.afb-mid) .bhd .btn .lab-s { display: none; }
.afb.afb-mid .trow .ghost { padding: 0 9px; }
.afb.afb-phone .bhd [data-act=pdf] { width: 32px; padding: 0; justify-content: center; }
.afb.afb-phone .bhd [data-act=pdf] .lab { display: none; }
.afb.afb-phone .trow { padding: 0 12px 8px; border: 0; }
.afb.afb-phone .trow .ghost { display: none; }
.afb.afb-phone .arow { display: flex; }
.afb.afb-phone .lt, .afb.afb-phone .zc [data-act=zoom-in], .afb.afb-phone .zc [data-act=zoom-out], .afb.afb-phone .zc .zl { display: none; }
.afb.afb-phone .pbar { display: flex; }
.afb.afb-phone .vp { --hs: 22px; }
.afb.afb-phone .afb-el .lkb { right: calc(-7px*var(--iz, 1)); top: calc(-7px*var(--iz, 1)); width: calc(20px*var(--iz, 1)); height: calc(20px*var(--iz, 1)); }
.afb.afb-phone .bhint.on { display: block; }
.afb.afb-phone .tb .fb { min-width: 96px; max-width: 124px; }
.afb.afb-phone .tb .fsz { font-size: 16px; width: 44px; }
.afb.afb-phone .tb .r > button:not(.fb) { width: 28px; }
.afb.afb-phone .toast { bottom: 76px; }
.afb.afb-phone .bmodal { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 88%; border-radius: 22px 22px 0 0; border-width: 1px 0 0; transform: translateY(105%); opacity: 1; transition: transform .28s ease; }
.afb.afb-phone.ch-open .bmodal { transform: none; }
.afb.afb-phone .tg { grid-template-columns: 1fr 1fr; gap: 10px; }
.afb.afb-phone .ch-h { padding: 14px 16px 2px; }
.afb.afb-phone .ch-b { padding: 12px 16px 20px; }
.afb.ro .lt, .afb.ro .pbar, .afb.ro [data-act=undo], .afb.ro [data-act=redo], .afb.ro [data-act=tpl-open], .afb.ro .ghost, .afb.ro .arow, .afb.ro .tadd, .afb.ro .tm { display: none !important; }

/* лист на весь экран: «Показать клиенту» и кабинет клиента */
.afbv { position: fixed; inset: 0; z-index: 2147483000; background: #0f0f10; display: flex; flex-direction: column; }
.afbv .pt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; color: var(--mu); font-size: 12px; flex: none; }
.afbv .pt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afbv .pt b { color: var(--ac); font-weight: 500; margin-right: 8px; }
.afbv .ps { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 24px; overflow: hidden; }
.afbv .pw { position: relative; overflow: hidden; background: var(--paper); box-shadow: 0 30px 80px rgba(0,0,0,.6); flex: none; }
.afbv .pw .sheet { box-shadow: none; }
.afbv .pb { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px; flex: none; }
.afbv .pb .btn.ic { width: 38px; height: 38px; }
.afbv .pb.one .btn, .afbv .pb.one .dots { visibility: hidden; }
.afbv .dots { display: flex; gap: 7px; }
.afbv .dots i { width: 7px; height: 7px; border-radius: 50%; background: #3d3d40; display: block; }
.afbv .dots i.on { background: var(--ac); width: 20px; border-radius: 5px; }
.afbv .lbx { position: absolute; inset: 0; z-index: 5; background: rgba(8,8,9,.9); display: grid; place-items: center; padding: 20px; }
.afbv .lbx img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 640px) { .afbv .ps { padding: 0 8px; } .afbv .pt { padding: 12px 12px; } }

/* 23.11.2026 — фон листа: картинка во весь лист под элементами (board-view-v13.js applyBg) и окно «Фон листа». */
.afb .sheet > .sbg, .afbv .sheet > .sbg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; pointer-events: none; }
.afb .pop .bgrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.afb .pop .bgrow .btn { flex: 1 1 auto; justify-content: center; }
.afb .pop .bgimg { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.afb .pop .bgimg img { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; }
.afb .pop .bgimg label { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--dim, #8d8a85); display: flex; flex-direction: column; gap: 4px; }
.afb .pop .bgimg input[type=range] { width: 100%; accent-color: #c8b58a; }
