/* ======================================================================
   Board — стили новых функций: значки объектов, схемы, медиа, таблицы, документы,
   фасилитация, слайды, форматы, комментарии, экспорт, доступ, доступность.
   ====================================================================== */
/* ---------- значки на объектах ---------- */
.deco { position: absolute; inset: 0; pointer-events: none; }
.deco-tags { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; flex-wrap: wrap; gap: 3px; }
.tag-chip { display: inline-block; max-width: 140px; padding: 1px 8px; border-radius: 10px; font: 600 11px/18px var(--font); color: #1f2329; background: #e8e9ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deco-est { position: absolute; right: 6px; bottom: 6px; min-width: 22px; height: 22px; border-radius: 11px; background: #eef1ff; color: #2f4be0; font: 700 12px/22px var(--font); text-align: center; padding: 0 6px; }
.deco-ppl { position: absolute; right: 6px; top: 6px; display: flex; }
.deco-ppl .avatar { margin-left: -6px; border: 2px solid #fff; }
.deco-status { position: absolute; left: 6px; top: -24px; padding: 2px 9px; border-radius: 10px; font: 600 11px/16px var(--font); color: #1f2329; white-space: nowrap; }
.deco-link { position: absolute; right: -10px; top: -10px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #d3d6dc; background: #fff; display: grid; place-items: center; pointer-events: auto; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.deco-link .ic { width: 14px; height: 14px; color: var(--accent); }
.deco-rx { position: absolute; left: 4px; bottom: -14px; display: flex; gap: 3px; pointer-events: auto; }
.rx-chip { border: 1px solid #d3d6dc; background: #fff; border-radius: 12px; padding: 0 7px; font: 600 12px/22px var(--font); cursor: pointer; }
.rx-chip.mine { border-color: var(--accent); background: var(--accent-soft); }
.deco-count { position: absolute; right: -12px; bottom: -12px; min-width: 30px; height: 26px; border-radius: 13px; border: 0; background: var(--accent); color: #fff; font: 700 13px var(--font); pointer-events: auto; cursor: pointer; }
.deco-sync { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: #13a8a8; color: #fff; font: 700 12px/20px var(--font); text-align: center; }
.deco-changed { position: absolute; left: 0; top: -22px; padding: 1px 8px; border-radius: 9px; background: #e8459b; color: #fff; font: 600 11px/18px var(--font); white-space: nowrap; }
.item.changed { outline: 3px solid #e8459b; outline-offset: 3px; }
.color-custom { margin-top: 8px; align-items: center; }
.color-custom input[type=color] { width: 36px; height: 32px; border: 1px solid #dfe1e6; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; flex: none; }
.pinput.hex { width: 100px; font-family: ui-monospace, Consolas, monospace; }
.cgrid.wide-grid { grid-template-columns: repeat(8, 26px); }
.tag-row { display: flex; align-items: center; gap: 4px; }
.tag-row .oitem { flex: 1; }
.tchk { width: 18px; text-align: center; color: var(--muted); }
.card-modal .card-title { font-size: 16px; font-weight: 600; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.card-foot .chip.st, .card-foot .chip.tag { color: #1f2329; }
.olist.row.wrap { flex-wrap: wrap; }
.scroll-pop { max-height: 70vh; overflow: auto; }
.hl-face { font-weight: 800; background: linear-gradient(transparent 55%, #fff3a3 55%); padding: 0 3px; }
.chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 8px 0; cursor: pointer; line-height: 1.35; }
.chk input { margin-top: 2px; }
.center-pop { left: 50% !important; top: 30% !important; transform: translateX(-50%); }
/* ---------- схемы ---------- */
.shape-lib { max-height: 60vh; overflow: auto; margin-top: 8px; }
.plabel.sm { font-size: 11px; margin: 10px 0 4px; }
.item.lanes { background: #fff; border: 1px solid #c9cdd4; }
.ln-title { position: absolute; left: 0; right: 0; top: 0; height: 40px; padding: 0 12px; font: 700 16px/40px var(--font); border-bottom: 1px solid #c9cdd4; white-space: nowrap; overflow: hidden; }
.ln-lanes { position: absolute; left: 0; right: 0; top: 40px; bottom: 0; display: flex; flex-direction: column; }
.item.lanes.vert .ln-lanes { flex-direction: row; }
.ln-lane { position: relative; border-bottom: 1px solid #dfe2e7; flex: none; }
.item.lanes.vert .ln-lane { border-bottom: 0; border-right: 1px solid #dfe2e7; height: 100% !important; }
.ln-name { position: absolute; left: 10px; top: 8px; font: 600 14px var(--font); color: #3d4350; }
.item.entity { background: #fff; border: 1px solid #c9cdd4; border-radius: 8px; overflow: hidden; }
.er-head { height: 40px; color: #fff; font: 700 15px/40px var(--font); padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-row { display: flex; align-items: center; height: 30px; padding: 0 10px; gap: 8px; font-size: 14px; }
.er-row.alt { background: #f6f7f9; }
.er-k { width: 24px; font: 700 10px var(--font); color: #6b7280; }
.er-n { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.er-t { color: #6b7280; font-size: 13px; }
.handle.lbl { width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 2px solid #e8459b; cursor: ew-resize; pointer-events: auto; position: absolute; }
.guide.eq { background: #e8459b; }
.eq-label { position: absolute; left: 50%; top: 50%; background: #e8459b; color: #fff; font: 600 11px var(--font); padding: 0 4px; border-radius: 4px; transform-origin: 0 0; white-space: nowrap; }
.size-match { position: absolute; border: dashed #e8459b; pointer-events: none; }
.size-match span { position: absolute; left: 0; top: -18px; background: #e8459b; color: #fff; font: 600 11px var(--font); padding: 0 4px; border-radius: 4px; transform-origin: 0 100%; white-space: nowrap; }
.ruler-line { position: absolute; background: #e8459b; pointer-events: none; }
.ruler-label { position: absolute; left: 50%; top: 50%; background: #e8459b; color: #fff; font: 600 11px var(--font); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.theme-row { gap: 10px; }
.theme-sw { display: flex; gap: 2px; }
.theme-sw i { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid; }
/* ---------- медиа ---------- */
.item.vfile, .item.embed { background: #111; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.item.vfile video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.vctl { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; z-index: 2; }
.vctl .cb.small { background: rgba(255, 255, 255, .85); }
.embed-box { background: #f2f3f5; }
.item.file { background: #fff; border: 1px solid #d3d6dc; border-radius: 10px; display: flex; align-items: center; gap: 12px; padding: 0 12px; box-shadow: 0 1px 4px rgba(16, 24, 40, .08); }
.file-ic { width: 46px; height: 58px; border-radius: 6px; color: #fff; font: 800 14px var(--font); display: grid; place-items: center; flex: none; }
.file-body { flex: 1; min-width: 0; }
.file-name { font: 600 14px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.file-dl { width: 32px; padding: 0; flex: none; }
.item.doc.one .doc-pager { display: none; }
.lib-pop { width: 360px; }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 50vh; overflow: auto; }
.lib-item { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; display: flex; flex-direction: column; background: #f7f8fa; }
.lib-item img { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.lib-ext { flex: 1; display: grid; place-items: center; font: 800 16px var(--font); color: #5f6169; }
.lib-name { font-size: 11px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.lib-del { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; padding: 0; background: rgba(255, 255, 255, .9); }
.stk-pop { width: 380px; }
.stk-box { max-height: 46vh; overflow: auto; }
.tone-row .em.on { background: var(--accent-soft); }
.rec-badge { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 100; border: 0; border-radius: 18px; background: #e5484d; color: #fff; font: 700 13px var(--font); padding: 8px 16px; cursor: pointer; box-shadow: var(--shadow); }
/* ---------- таблицы ---------- */
.tbl-cell.ro { background: #fafbfc; color: #3d4350; }
.tree-tw { border: 0; background: transparent; cursor: pointer; padding: 0 4px 0 0; font-size: 12px; color: var(--muted); }
.tbl-person { display: inline-flex; align-items: center; gap: 5px; }
.tbl-link { color: #2a5bd7; text-decoration: underline; cursor: pointer; }
.tbl-dep { color: #6b7280; font-size: 13px; }
.tbl-prog { position: relative; display: block; height: 18px; border-radius: 9px; background: #eef0f4; overflow: hidden; }
.tbl-prog i { position: absolute; left: 0; top: 0; bottom: 0; background: #8fd14f; }
.tbl-prog b { position: relative; font-size: 11px; padding-left: 6px; line-height: 18px; }
.tf-eye { width: 26px; height: 26px; padding: 0; margin-left: 6px; vertical-align: middle; }
.tf-hl { margin-top: 6px; }
.tf-hl input[type=color] { width: 32px; height: 30px; border: 1px solid #dfe1e6; border-radius: 6px; padding: 2px; }
.rows-list { max-height: 240px; }
.item.table.as-timeline .tbl-grid, .item.table.as-timeline .tk-box { display: none; }
.item.table:not(.as-timeline) .tl-box { display: none; }
.tl-box { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.tl-head { position: absolute; top: 0; right: 0; height: 44px; border-bottom: 1px solid #e1e4e8; }
.tl-month { position: absolute; top: 6px; font: 600 12px var(--font); color: #3d4350; white-space: nowrap; }
.tl-day { position: absolute; top: 26px; font-size: 11px; color: var(--muted); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #e8459b; opacity: .6; }
.tl-label { position: absolute; left: 0; width: 160px; height: 34px; padding: 0 8px; font: 500 13px/34px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #e1e4e8; }
.tl-bar { position: absolute; height: 24px; border-radius: 6px; background: #a6ccf5; display: flex; align-items: center; cursor: grab; font: 600 12px var(--font); color: #1f2329; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.tl-bar.nodate { background: repeating-linear-gradient(45deg, #eef0f4, #eef0f4 6px, #e1e4e8 6px, #e1e4e8 12px); }
.tl-grip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.tl-grip.l { left: 0; }
.tl-grip.r { right: 0; }
.tl-text { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.item.tview { background: #fff; border: 1px dashed #13a8a8; }
.tview-badge { position: absolute; left: 0; top: -22px; font: 600 12px var(--font); color: #13a8a8; white-space: nowrap; }
/* ---------- документы ---------- */
.rt-img { display: block; max-width: 100%; margin: 8px 0; border-radius: 6px; }
.rt-co { position: relative; background: var(--co, #fff6d6); border-radius: 8px; padding: 10px 12px 10px 40px; margin: 6px 0; }
.rt-co::before { content: attr(data-e); position: absolute; left: 12px; top: 9px; }
.date-chip { display: inline-block; padding: 0 6px; border-radius: 6px; background: #eef1ff; color: #2f4be0; font-weight: 500; }
.txt code { font-family: ui-monospace, Consolas, monospace; background: #f0f1f4; padding: 0 4px; border-radius: 4px; font-size: .92em; }
.txt mark { color: inherit; padding: 0 1px; border-radius: 2px; }
.txt li.rt-l1 { margin-left: 1.3em; }
.txt li.rt-l2 { margin-left: 2.6em; }
.txt li.rt-l3 { margin-left: 3.9em; }
.code-gutter { display: none; position: absolute; left: 0; top: 30px; bottom: 0; width: 34px; padding: 10px 6px 0 0; text-align: right; color: #6b7280; font: var(--code-fs, 13px)/1.45 ui-monospace, Consolas, monospace; white-space: pre; overflow: hidden; border-right: 1px solid #333849; }
.item.code.lines .code-gutter { display: block; }
.item.code.lines .code-pre { padding-left: 46px; }
.item.code .code-pre { font-size: var(--code-fs, 13px); }
/* ---------- фасилитация ---------- */
.item.poll, .item.scale { background: #fff; border: 1px solid #d3d6dc; border-radius: 12px; padding: 12px; box-shadow: 0 1px 4px rgba(16, 24, 40, .08); }
.poll-q { font: 700 16px var(--font); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poll-opts { display: flex; flex-direction: column; gap: 8px; }
.poll-opt { position: relative; height: 36px; border: 1px solid #d3d6dc; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font: 14px var(--font); cursor: pointer; overflow: hidden; }
.poll-opt i { position: absolute; left: 0; top: 0; bottom: 0; background: #eef1ff; transition: width .3s; }
.poll-opt span, .poll-opt b { position: relative; }
.poll-opt.mine { border-color: var(--accent); }
.poll-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
.item.wheel { display: flex; flex-direction: column; align-items: center; }
.wheel-svg { width: 100%; flex: 1; min-height: 0; overflow: visible; }
.wheel-svg g { transform-origin: 0 0; }
.wheel-res { font: 700 16px var(--font); min-height: 22px; }
.wheel-spin { margin-top: 4px; }
.scale-track { position: relative; height: 30px; margin: 16px 10px 6px; border-radius: 15px; background: linear-gradient(90deg, #fde2e1, #fdecc8, #d9f2e6); cursor: pointer; }
.scale-mark { position: absolute; top: 3px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; color: #fff; font: 700 11px/24px var(--font); text-align: center; border: 2px solid #fff; pointer-events: none; }
.scale-mark.mine { box-shadow: 0 0 0 2px var(--accent); }
.scale-lab { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 6px; }
.item.flip { border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); transition: background .2s; }
.item.flip.back { border: 2px solid #a6ccf5; }
.flip-face { font: 600 16px var(--font); text-align: center; white-space: pre-wrap; }
.flip-btn { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); cursor: pointer; font-size: 15px; }
.stack-top { position: absolute; inset: 0 12px 12px 0; cursor: copy; box-shadow: 4px 4px 0 rgba(0, 0, 0, .06), 8px 8px 0 rgba(0, 0, 0, .05); }
.stack-lab { position: absolute; left: 0; right: 12px; bottom: 24px; text-align: center; font: 600 12px var(--font); color: #5f6169; pointer-events: none; }
.item.abtn .abtn-face { width: 100%; height: 100%; border: 0; border-radius: 28px; color: #fff; font: 700 15px var(--font); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.item.dot { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.poker-cards .pcard { width: 44px; height: 58px; border: 2px solid #d3d6dc; border-radius: 8px; font: 700 16px var(--font); background: #fff; }
.poker-cards .pcard.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.poker-res { font: 700 15px var(--font); margin: 8px 0; }
.hands-chip { font-size: 13px; font-weight: 700; padding: 0 10px; width: auto; }
.hand-mark { font-size: 16px; }
.vhist { font-size: 12px; }
body.priv-anon .item.note .author { display: none; }
.theme-pop { width: 360px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.theme-card i { width: 18px; height: 18px; border-radius: 4px; }
.theme-card span { width: 100%; font-size: 11px; margin-top: 4px; text-align: left; }
.edge-bubble { position: fixed; z-index: 40; border: 0; border-radius: 12px; color: #fff; font: 600 13px var(--font); padding: 6px 12px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: var(--shadow); }
.burst { position: fixed; z-index: 90; font-size: 24px; pointer-events: none; animation: burst 1.2s ease-out forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) scale(.6); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2); opacity: 0; } }
.profile-card { position: fixed; z-index: 80; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 160px; }
/* ---------- слайды и презентация ---------- */
.fgrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.fgrid .fitem { flex-wrap: wrap; }
.fthumb { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f2f3f5; border-radius: 6px; }
.fitem.hid { opacity: .55; }
.fitem.drop { box-shadow: inset 0 2px 0 var(--accent); }
.fitem.dragging { opacity: .4; }
.fnote { font-size: 13px; }
.fbtn { width: 26px; height: 26px; padding: 0; margin-left: auto; flex: none; }
.fitem .fbtn + .fbtn { margin-left: 0; }
.phud-extra { display: flex; gap: 2px; align-items: center; }
.present-notes { position: fixed; left: 16px; bottom: 76px; width: 360px; max-height: 40vh; overflow: auto; padding: 12px 14px; z-index: 60; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.lightbox { position: fixed; z-index: 4; pointer-events: none; box-shadow: 0 0 0 100vmax rgba(15, 17, 21, .78); border-radius: 2px; }
.slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; max-height: 70vh; overflow: auto; }
.slide-card { border: 2px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; cursor: pointer; text-align: left; font: 500 12px var(--font); }
.slide-card.on { border-color: var(--accent); }
.slide-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f2f3f5; display: block; margin-bottom: 4px; }
.item.hid-frame { opacity: .45; }
.item.frame.hid-frame { outline: 2px dashed #8a9099; }
.item.hid-gone { display: none !important; }
body.pres-canvas #presentHud { display: flex; }
/* ---------- форматы ---------- */
.item.grid { background: #fff; border: 1px solid #c9cdd4; }
.grid-cells { position: absolute; inset: 0; }
.grid-cell { position: absolute; border-right: 1px solid #dfe2e7; border-bottom: 1px solid #dfe2e7; padding: 6px 8px; overflow: hidden; }
.grid-cell.head { background: #f2f3f5; font-weight: 600; }
.grid-cell.vert .grid-t { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; }
.grid-t { font-size: 14px; color: #1f2329; }
.handle.gline { position: absolute; background: var(--accent); border-radius: 3px; pointer-events: auto; }
.handle.gline.v { width: 6px; height: 40px; cursor: col-resize; }
.handle.gline.h { width: 40px; height: 6px; cursor: row-resize; }
.item.timeline { background: #fff; border: 1px solid #c9cdd4; border-radius: 8px; overflow: hidden; }
.tlw { position: absolute; inset: 0; }
.tlw-title { position: absolute; left: 10px; top: 4px; font: 700 14px var(--font); width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlw-head { position: absolute; top: 0; right: 0; height: 48px; border-bottom: 1px solid #e1e4e8; }
.tlw-tick { position: absolute; top: 26px; font-size: 11px; color: var(--muted); white-space: nowrap; padding-left: 3px; }
.tlw-grid { position: absolute; top: 40px; bottom: 0; width: 1px; background: #eef0f4; }
.tlw-lane { position: absolute; left: 0; right: 0; border-bottom: 1px solid #eef0f4; }
.tlw-lane.alt { background: #fafbfc; }
.tlw-ln { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font: 600 13px var(--font); color: #3d4350; width: 135px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlw-bar { height: 32px; color: #fff; }
.tlw-ms { position: absolute; top: 40px; bottom: 0; width: 2px; background: var(--c); cursor: ew-resize; }
.tlw-ms span { position: absolute; left: 4px; top: 0; background: var(--c); color: #fff; font: 600 11px var(--font); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.tlw-deps { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.proto-bar { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
body.proto-mode #topLeft, body.proto-mode #topRight, body.proto-mode #leftRail, body.proto-mode #bottomRight, body.proto-mode #context, body.proto-mode #overlay, body.proto-mode #pins, body.proto-mode .scrollbar { display: none !important; }
body.proto-mode #viewport { cursor: pointer; background-image: none; }
.item.proto-flash { outline: 3px solid #e8a200; }
.mind-tw { position: absolute; right: -12px; top: 50%; transform: translateY(-50%); min-width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid #4262ff; background: #fff; font: 700 11px var(--font); cursor: pointer; padding: 0 4px; color: #4262ff; }
.mind-tw.hidden { display: none; }
.item.mind.mind-gone { display: none !important; }
.item.mind.ms-rect { border-radius: 4px; }
.item.mind.ms-round { border-radius: 12px; }
.item.mind.ms-none { border-color: transparent !important; background: transparent; }
.item.mind.ms-card { border-radius: 10px; border-width: 2px; border-top-width: 6px; }
.tpl-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tpl-grid { margin-bottom: 10px; }
.tpl-card { display: flex; flex-direction: column; gap: 4px; }
.tpl-prev { width: 100%; aspect-ratio: 260 / 150; border-radius: 6px; background: #fbfbfc; border: 1px solid var(--line); object-fit: contain; }
/* ---------- комментарии ---------- */
.pin.unread::after { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #2d9bf0; border: 2px solid #fff; }
.pin.at-me::before { content: '@'; position: absolute; right: -10px; bottom: -6px; width: 16px; height: 16px; border-radius: 50%; background: #e8459b; color: #fff; font: 700 10px/16px var(--font); text-align: center; }
.pin.draft { box-shadow: 0 0 0 2px #e8a200, 0 2px 8px rgba(0, 0, 0, .25); }
.pin-open { position: absolute; left: 36px; top: 0; width: 220px; background: #fff; color: #1f2329; border-radius: 10px; padding: 6px 10px; font: 500 12px/1.35 var(--font); box-shadow: var(--shadow); white-space: normal; pointer-events: none; }
.msg-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rx-add { border: 1px dashed #c4c8d0; background: #fff; border-radius: 12px; padding: 0 8px; font-size: 12px; cursor: pointer; color: var(--muted); }
.rx-pick { display: flex; gap: 2px; }
.msg { position: relative; }
.msg-edit { position: absolute; right: 0; top: 0; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 14px; }
.ctabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.citem-c.unread { background: #eef6ff; }
.citem-c.unread .mmeta::before { content: '● '; color: #2d9bf0; }
.cdraft { font-size: 11px; color: #e8a200; margin-left: auto; }
/* ---------- экспорт ---------- */
.area-pick { position: fixed; inset: 0; z-index: 95; cursor: crosshair; background: rgba(15, 17, 21, .12); }
.area-box { position: fixed; border: 2px dashed var(--accent); background: rgba(66, 98, 255, .08); display: none; }
.area-tip { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); background: #1f2329; color: #fff; font: 600 13px var(--font); padding: 8px 14px; border-radius: 10px; }
/* ---------- доступ и уведомления ---------- */
.access-badge { margin-right: 2px; display: inline-flex; opacity: .85; }
#btnShare .access-badge .ic { width: 16px; height: 16px; }
.link-row .pinput { font-size: 12px; }
.board-cover { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.nitem { cursor: pointer; }
.nacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nacts textarea { width: 100%; }
.nfoot { margin-top: 8px; justify-content: space-between; }
/* ---------- доступность и прочее ---------- */
.a11y-item { align-items: flex-start; }
.a11y-sev { flex: none; font: 700 10px var(--font); padding: 2px 6px; border-radius: 6px; background: #fdecc8; color: #8a5a00; margin-top: 2px; }
.a11y-sev.crit { background: #fde2e1; color: #b42318; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; font: 700 14px var(--font); }
.skip-link:focus { top: 12px; }
.sopt.stype { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: 12px var(--font); padding: 0 4px; max-width: 110px; }
.search-list { max-height: 260px; overflow: auto; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.sres { display: flex; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 6px 8px; border-radius: 6px; font: 13px var(--font); cursor: pointer; }
.sres:hover { background: #f2f3f5; }
.skind { flex: none; color: var(--muted); font-size: 12px; width: 76px; }
.pen-presets { display: flex; gap: 6px; }
.pen-presets .preset { width: 40px; height: 32px; padding: 0; justify-content: center; display: inline-flex; align-items: center; background: #f4f4f7; }
.pen-presets .preset.empty { color: #8a8aa3; background: transparent; border: 1.5px dashed #d4d4de; }
.pen-presets .preset .ic { width: 16px; height: 16px; }
.pdot { display: inline-block; border-radius: 50%; }
.announce-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px; background: #fff7e0; border: 1px solid #f2d27a; border-radius: 12px; padding: 6px 8px 6px 14px; font: 600 13px var(--font); box-shadow: var(--shadow); }
body.tool-dragging, body.tool-dragging * { cursor: copy !important; }
body.commenter #leftRail .tool:not([data-tool="select"]):not([data-tool="hand"]):not([data-tool="comment"]) { opacity: .35; pointer-events: none; }

/* ================= Engage: вопрос участникам ================= */
.engage-card { position: fixed; right: 16px; bottom: 72px; z-index: 70; width: 340px; max-height: calc(100vh - 150px); overflow: auto; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px 14px; user-select: text; -webkit-user-select: text; }
.engage-card.mini { width: auto; padding: 6px 8px 6px 14px; }
.eg-head { display: flex; align-items: center; gap: 6px; }
.eg-head b { font-size: 14px; }
.eg-count { flex: 1; font-size: 12px; color: var(--muted); }
.eg-q { font-size: 17px; font-weight: 700; line-height: 1.35; margin: 8px 0 10px; overflow-wrap: anywhere; }
.eg-opts { display: flex; flex-direction: column; gap: 6px; }
.eg-opt { justify-content: flex-start; text-align: left; width: 100%; min-height: 38px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); white-space: normal; height: auto; }
.eg-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.eg-scale { display: flex; gap: 4px; flex-wrap: wrap; }
.eg-num { flex: 1 1 26px; min-width: 26px; height: 38px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 700; }
.eg-num.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.eg-scale-l { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.eg-rank { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.eg-rrow { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 8px; }
.eg-rrow span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.eg-ok { color: #12a150; margin-top: 6px; }
.eg-res { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.eg-bars { display: flex; flex-direction: column; gap: 6px; }
.eg-bar { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; align-items: center; gap: 8px; font-size: 13px; }
.eg-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.eg-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width .3s; }
.eg-bar.ok { color: #12a150; font-weight: 700; }
.eg-bar.ok .eg-fill { background: #12a150; }
.eg-bar b { text-align: right; }
.eg-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 6px 0; line-height: 1.15; font-weight: 700; }
.eg-matrix { display: flex; justify-content: center; padding: 22px 0; }
.eg-pad { position: relative; width: 220px; height: 220px; border-radius: 8px; background: linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat, linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat, #fafbfc; border: 1px solid var(--line); }
.eg-pad.pick { cursor: crosshair; }
.eg-ax { position: absolute; font-size: 11px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.eg-ax.l { left: 4px; top: 50%; transform: translateY(-120%); }
.eg-ax.r { right: 4px; top: 50%; transform: translateY(-120%); }
.eg-ax.b { bottom: -18px; left: 50%; transform: translateX(-50%); }
.eg-ax.t { top: -18px; left: 50%; transform: translateX(-50%); }
.eg-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); opacity: .75; border: 2px solid #fff; }
.eg-dot.me { background: #f59f00; opacity: 1; width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.eg-lead { margin-top: 12px; }
.eg-lrow { display: flex; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 6px; font-size: 14px; }
.eg-lrow.me { background: var(--accent-soft); }
.eg-host { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.eg-host .cb { width: auto; padding: 0 10px; font-size: 13px; }
.popover.eg-pop { width: 320px; }
.eg-pop .pinput + .pinput { margin-top: 6px; }
.eg-kinds { margin: 8px 0 2px; }
.eg-kinds .cb { width: auto; padding: 0 10px; font-size: 12.5px; }
.eg-qr { display: flex; justify-content: center; margin: 6px 0 10px; }
.eg-qrsvg { width: 220px; height: 220px; }
.eg-qr.big .eg-qrsvg { width: min(480px, 80vw); height: min(480px, 80vw); }
@media (max-width: 600px) { .engage-card { left: 8px; right: 8px; width: auto; bottom: 64px; } }

/* ===== Холст: промежутки, замок, Shift, точное выделение ===== */
.gap-handle { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1.5px solid #c4c8d0; color: #5f6169;
  display: grid; place-items: center; font-size: 15px; line-height: 1; pointer-events: auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.gap-handle.x { cursor: ew-resize; } .gap-handle.y { cursor: ns-resize; }
.gap-handle:hover { border-color: var(--accent); color: var(--accent); }
.lock-badge[data-lock] { pointer-events: auto; cursor: pointer; transition: box-shadow .5s; }
.lock-badge.pressing { box-shadow: 0 0 0 6px rgba(66, 98, 255, .35); }
body.shift-held #context { visibility: hidden; }
#marquee.precise { border-style: dashed; }
.font-list { max-height: 360px; }
.font-list .plabel { margin-top: 8px; }
.font-list .oitem .cb { margin-left: auto; width: 22px; height: 22px; }

/* ===== Схемы: ERD, пул, выноски, подписи, код ===== */
.item.entity .er-add { display: none; position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); border: 1px dashed #b8bdc7; background: #fff; border-radius: 6px; font: 600 12px var(--font); color: #5f6169; padding: 3px 10px; cursor: pointer; }
.item.entity.selected .er-add, .item.entity:hover .er-add { display: block; }
.item.entity.er-c1 .er-k, .item.entity.er-c1 .er-t, .item.entity.er-c2 .er-k { display: none; }
.item.lanes.pool .ln-title { right: auto; bottom: 0; width: 40px; height: auto; border-bottom: 0; border-right: 1px solid #c9cdd4; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; padding: 12px 0; line-height: 40px; }
.item.lanes.pool .ln-lanes { top: 0; left: 40px; }
body.picking #viewport { cursor: crosshair; }
.clabel.follow { font-size: 14px; }
.dl-row .pinput { flex: 1; min-width: 0; }
.code-wrap { position: relative; display: flex; border: 1px solid var(--line, #e3e5ea); border-radius: 8px; overflow: hidden; }
.code-wrap .mm-code { border: 0; border-radius: 0; flex: 1; margin: 0; }
.code-gutter { width: 34px; flex: none; overflow: hidden; background: #f5f6f8; color: #9aa0aa; font: 13px/1.45 ui-monospace, Consolas, monospace; text-align: right; padding: 8px 6px 8px 0; box-sizing: border-box; user-select: none; }
.code-gutter div { line-height: inherit; }
.code-wrap.nolines .code-gutter { display: none; }
.code-measure { position: absolute; visibility: hidden; left: -9999px; top: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.45 ui-monospace, Consolas, monospace; }
.code-opts { gap: 14px; font-size: 13px; margin: 6px 0; }
.code-wrap .mm-code.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-manage { max-height: 65vh; overflow: auto; }
.cs-set { border: 1px solid #e3e5ea; border-radius: 10px; padding: 10px; margin: 10px 0; }
.cs-set > .inline-row .pinput { flex: 1; min-width: 0; font-weight: 600; }
.cs-show { font-size: 13px; white-space: nowrap; }
.cs-row { gap: 6px; margin: 4px 0; }
.cs-row .pinput { flex: 1; min-width: 0; }
.cs-row select.pinput { flex: 0 0 150px; }
.cs-row.over { opacity: .5; }
.set-row { gap: 8px; }
.set-row .tmeta { margin-left: auto; }

/* ===== Медиа: фото и GIF, иконки, видео-заготовка ===== */
.media-pop { width: 420px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 380px; overflow: auto; margin: 8px 0; }
.media-cell { position: relative; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: #f2f3f5; aspect-ratio: 1; cursor: pointer; }
.media-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 5px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icons-sep { grid-column: 1 / -1; margin-top: 8px; }
.video-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #1f2329; color: #fff; border: 2px dashed #5f6169; border-radius: 0 0 10px 10px; font: 600 15px var(--font); cursor: pointer; }
.video-ph .ic { width: 28px; height: 28px; }

/* ===== Фреймы: вложенные, выбор в панели ===== */
.item.frame.nested .frame-title { opacity: 0; transition: opacity .15s; }
.item.frame.nested:hover .frame-title, .item.frame.nested.selected .frame-title { opacity: 1; }
.fitem.picked { background: #e8edff; box-shadow: inset 3px 0 0 var(--accent); }
.fp-multi { flex-wrap: wrap; gap: 4px; padding: 6px 8px; background: #f5f7ff; border-radius: 8px; margin: 6px 0; font-size: 13px; }

/* ===== Умное рисование: подсказка ===== */
.smart-hint { display: grid; gap: 6px; margin: 6px 0; }
.smart-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sh-ic { width: 40px; height: 36px; flex: none; background: #f7f8fa; border-radius: 6px; }
.sh-arrow { color: #8a90a0; }
.kb-ladd { position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 1px dashed #9aa0aa; background: rgba(255, 255, 255, .85); color: #5f6169; display: grid; place-items: center; opacity: 0; transition: opacity .12s; cursor: pointer; z-index: 1; }
.kb-ladd .ic { width: 14px; height: 14px; }
.item.kanban:hover .kb-ladd { opacity: 1; }

/* ===== Интеллект-карта: списки; оргструктура; таймлайн ===== */
.mind-li { display: flex; gap: .4em; text-align: left; }
.mind-mk { flex: none; opacity: .8; }
.pin.pin-gone { display: none; }
.org-fields { position: absolute; left: 10px; right: 10px; bottom: 6px; font-size: 12px; line-height: 18px; color: #5f6169; text-align: center; pointer-events: none; }
.item.mind.org-card .txt, .item.mind.org-card .txtwrap { align-items: flex-start; }
.org-f { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-hiring { display: inline-block; background: #fdecc8; color: #8a5a00; border-radius: 10px; padding: 0 8px; font-weight: 600; }
.org-plus { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; pointer-events: auto; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.org-plus .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.tlw-zcol { position: absolute; top: 48px; bottom: 0; background: rgba(0, 0, 0, .035); pointer-events: none; }
.tlw.tcol .tlw-title { color: var(--tlc); }
.tlw.tcol .tlw-head { background: color-mix(in srgb, var(--tlc) 10%, white); }
.tlw.tcol .tlw-lane.alt { background: color-mix(in srgb, var(--tlc) 6%, white); }
.item.mind.root .org-fields { color: rgba(255, 255, 255, .88); }
.usm-hint { font-size: 12px; color: #6b7280; }

/* ===== Таблицы: запись, лента, канбан-вид, таймлайн, отдаление ===== */
.rec-panel { width: 360px; }
.rec-title { font: 700 18px var(--font); margin: 6px 0 10px; }
.rec-acts { flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.rec-field { border-top: 1px solid #eef0f3; padding: 8px 0; }
.rec-name { font-size: 12px; color: #6b7280; margin-bottom: 3px; }
.rec-val { font-size: 14px; white-space: pre-wrap; border-radius: 6px; padding: 3px 4px; }
.rec-val.edit { cursor: pointer; } .rec-val.edit:hover { background: #f2f4f8; }
.rec-val.empty { color: #9aa0aa; }
.feed-list { display: grid; gap: 6px; margin-top: 8px; max-height: 260px; overflow: auto; }
.feed-item { background: #f7f8fa; border-radius: 8px; padding: 6px 8px; }
.feed-meta { font-size: 11px; color: #6b7280; } .feed-txt { font-size: 13px; white-space: pre-wrap; }
.tbl-cell.feed::before { content: '💬 '; }
.item.card.tsync::after { content: '⇄'; position: absolute; right: 6px; top: 4px; font-size: 12px; color: #4262ff; }
.tk-col.tk-headonly { background-clip: padding-box; border-radius: 10px 10px 0 0; }
.tk-lane { position: absolute; left: 12px; right: 12px; height: 24px; font: 600 12px/24px var(--font); color: #3d4350; border-top: 1px dashed #c9cdd4; }
.grp-row .pinput { flex: 1; min-width: 0; }
.hl-sw { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.hist-list { max-height: 300px; }
.hist-item { font-size: 12px; padding: 2px 0; color: #3d4350; }
.tl-warn { color: #e8a200; margin-right: 4px; cursor: pointer; }
.tl-go { margin-left: 4px; color: #9aa0aa; cursor: pointer; opacity: 0; } .tl-label:hover .tl-go { opacity: 1; }
.tl-label.dragging { opacity: .6; z-index: 3; }
.tl-dep { position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #fff; border: 2px solid #4262ff; cursor: crosshair; opacity: 0; }
.tl-bar:hover .tl-dep { opacity: 1; }
body.tl-linking { cursor: crosshair; }
body.zoom-far .item[data-lod] > :not(svg) { visibility: hidden; }
body.zoom-far .item[data-lod]::before { content: attr(data-lod); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 8%; background: #f4f6fa; border: 2px solid #c9cdd4; border-radius: 12px; font: 700 64px/1.2 var(--font); color: #3d4350; z-index: 2; }

/* ===== Документ: чипы, блоки, объекты; заметки ===== */
.person-chip { display: inline-block; background: #eef1ff; color: #3446c8; border-radius: 10px; padding: 0 7px; font-size: .92em; cursor: default; }
.blk-sel { outline: 2px solid var(--accent); outline-offset: 2px; background: rgba(66, 98, 255, .06); border-radius: 4px; }
.rt-obj { margin: 10px 0; border: 1px solid #d3d6dc; border-radius: 10px; overflow: hidden; background: #fff; user-select: none; }
.rt-obj-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f5f6f8; font-size: 13px; }
.rt-obj-name { flex: 1; font-weight: 600; color: #3d4350; }
.rt-obj-btn { border: 1px solid #d3d6dc; background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.rt-obj-img { display: block; width: 100%; height: auto; }
.rt-obj-frame { display: block; width: 100%; height: 360px; border: 0; }
.np-grip { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.np-x { display: inline-flex; gap: 2px; }
.n-au { display: none; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #e8ebf3; color: #3d4350; font: 700 10px/22px var(--font); text-align: center; margin-right: 4px; }
#notesPanel.show-auth .n-au { display: inline-block; }
.n-extra { display: inline-flex; gap: 2px; flex: none; }
.n-extra .gone { opacity: .5; }
.n-obj { width: 100%; margin-top: 4px; }
.n-obj img { max-width: 100%; border: 1px solid #e3e5ea; border-radius: 8px; display: block; margin-bottom: 4px; }
.nrow { flex-wrap: wrap; }
#recPanel { position: fixed; right: 12px; top: 70px; bottom: 70px; width: 360px; z-index: 47; padding: 12px; overflow: auto; }
.nboard { margin: 10px 4px 2px; }

/* ===== Talktrack ===== */
.talk-bubble { position: fixed; left: 24px; bottom: 24px; width: 180px; height: 180px; border-radius: 50%; overflow: hidden; z-index: 300; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); border: 3px solid #fff; cursor: move; }
.talk-bubble video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.talk-rx { display: flex; gap: 2px; flex-wrap: wrap; }
.talk-line { position: relative; height: 22px; margin: 4px 0; background: #eef0f4; border-radius: 6px; }
.talk-mk { position: absolute; top: 1px; transform: translateX(-50%); font-size: 14px; cursor: pointer; }
.talk-cut { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #f2b8b5, #f2b8b5 4px, #fde2e1 4px, #fde2e1 8px); opacity: .8; }
.item.vfile.talk-new::after { content: ''; position: absolute; right: 8px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: #4262ff; box-shadow: 0 0 0 3px #fff; }
.talk-new-row::before { content: '● '; color: #4262ff; }
#talkPanel { position: fixed; right: 12px; top: 70px; bottom: 70px; width: 380px; z-index: 47; padding: 12px; overflow: auto; }
.talk-video { width: 100%; border-radius: 8px; background: #000; }
.talk-title { font: 700 16px var(--font); margin-top: 8px; }
.talk-views { font-size: 13px; color: #3d4350; }
.talk-at { border: 0; background: #eef1ff; color: #3446c8; border-radius: 6px; padding: 0 6px; font-size: 12px; cursor: pointer; }
.talk-hud { color: #f24822; font-size: 16px; }
/* ===== slides2: инструменты при показе, лента слайдов, макеты ===== */
.pres-tools { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; z-index: 60; }
.pres-tools .cb.on { background: var(--accent-soft, #e7eaff); }
body.presenting.pres-tools #overlay { display: block !important; }
body.presenting.pres-tools #context { display: flex !important; }
body.presenting:not(.pres-cursors) #cursors { display: none; }
.phud-more { display: flex; gap: 2px; align-items: center; }
.phud-more .cb.on { background: rgba(255, 255, 255, .22); }
.slide-plus { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: #4262ff; color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: auto; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.slide-plus svg { width: 18px; height: 18px; }
.slide-strip { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; display: flex; align-items: center; gap: 8px; padding: 8px; }
.strip-list { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 2px; }
.strip-card { flex: 0 0 auto; width: 132px; border: 2px solid transparent; border-radius: 8px; background: #f3f4f6; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 11px; text-align: left; color: inherit; }
.strip-card img { width: 100%; height: 72px; object-fit: contain; background: #fff; border-radius: 4px; }
.strip-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-card.on { border-color: #4262ff; }
.strip-add { align-items: center; justify-content: center; font-size: 28px; height: 98px; }
.layout-grid { display: grid; grid-template-columns: repeat(2, 150px); gap: 8px; max-height: 360px; overflow: auto; }
.layout-card { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.layout-card img { width: 100%; height: 84px; object-fit: contain; background: #f3f4f6; border-radius: 6px; }
.slides2 { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
/* ===== Engage, продолжение ===== */
.eg-code, .eg-time { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft, #e7eaff); color: #2b3bbf; white-space: nowrap; }
.eg-time.soon { background: #fdecea; color: #c92a2a; }
.eg-bigcode { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 10px; }
.eg-bigcode b { font-size: 40px; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.eg-bigcode span { font-size: 13px; color: var(--muted, #6b7280); }
.eg-open { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; margin: 6px 0; }
.eg-otext { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px; background: #fff9b1; border-radius: 8px; font-size: 13.5px; }
.eg-otext span { flex: 1; overflow-wrap: anywhere; white-space: pre-wrap; }
.eg-otext i { font-size: 11px; color: #6b7280; font-style: normal; white-space: nowrap; }
.eg-open.mine .eg-otext { background: #e7eaff; }
.eg-stmt { font-size: 13px; font-weight: 600; margin: 8px 0 4px; }
.eg-grip { cursor: grab; color: #a0a3ab; flex: 0 0 auto !important; }
.eg-rrow.over { border-color: var(--accent, #4262ff); background: #f3f5ff; }
.eg-rrow.drag { opacity: .5; }
.eg-dot.avg { width: auto; height: 18px; min-width: 18px; margin: -9px 0 0 -9px; padding: 0 6px; border-radius: 9px; color: #fff; font-size: 10px; line-height: 14px; opacity: 1; white-space: nowrap; }
/* ===== facil2: люди и оценки, стопка, шкала, перевёртыш, чат, сценарий ===== */
.item.people, .item.chips { background: #fff; border: 1px solid #d3d6dc; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.pw-title { font-size: 12.5px; font-weight: 600; color: #3d4350; }
.pw-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-chip { cursor: grab; display: inline-flex; }
.pw-val { cursor: grab; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px; background: #eef1ff; color: #2b3bbf; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.pw-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%) scale(1.1); opacity: .9; }
.flip-face.has-img { background-size: cover; background-position: center; color: transparent; }
.grad-grid { display: grid; grid-template-columns: repeat(3, 60px); gap: 6px; }
.grad-sw { height: 26px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.grad-sw.on { border-color: #1f2329; }
.pk-list { max-height: 180px; }
.pk-nav { justify-content: space-between; }
.pk-title { font-weight: 600; margin: 4px 0 8px; overflow-wrap: anywhere; }
.pk-voters { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; }
.pk-v { font-size: 12px; font-weight: 700; margin-right: 6px; }
.rooms-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.room-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line, #e3e5e8); border-radius: 8px; }
.room-row.mine { border-color: var(--accent, #4262ff); }
.room-row .pinput { flex: 1; min-width: 0; }
.room-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-ppl { display: inline-flex; align-items: center; gap: 2px; }
.rooms-assign { max-height: 200px; }
.rooms-assign select { max-width: 150px; }
.timer-chip.paused { opacity: .75; }
.bchat-btn { position: relative; }
.bchat-n { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 3px; }
.bchat { position: fixed; right: 12px; top: 64px; width: 320px; max-height: calc(100vh - 140px); display: flex; flex-direction: column; gap: 8px; padding: 10px; z-index: 70; }
.bchat-head { display: flex; justify-content: space-between; align-items: center; }
.bchat-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.bchat-msg { background: #f3f4f6; border-radius: 10px; padding: 6px 10px; max-width: 88%; }
.bchat-msg.me { align-self: flex-end; background: #e7eaff; }
.bchat-meta { font-size: 11px; color: #6b7280; }
.bchat-text { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ag-bar { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 10px; z-index: 60; }
.ag-step { font-size: 12px; color: #6b7280; }
.ag-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.ag-row span:first-child { flex: 1; }
.ag-row.cur { font-weight: 700; color: var(--accent, #4262ff); }
.ag-row.done { opacity: .55; }
.ag-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.ag-edit { display: flex; gap: 4px; align-items: center; }
.ag-edit .pinput:first-child { flex: 1; min-width: 0; }
.ag-edit select { max-width: 110px; }
body.priv-shuf #cursors .tag, body.priv-anon #cursors .tag { display: none; }
body.priv-anon #cursors .cursor-arrow path { fill: #8a9099; }
body.priv-shuf #cursors .bubble, body.priv-anon #cursors .bubble { background: #8a9099 !important; }
body.presenting .ag-bar, body.presenting .bchat { display: none; }
/* ===== sync2: синхронные копии ===== */
.item.xs-copy { outline: 2px dashed #8b5cf6; outline-offset: 3px; }
.item.xs-gone { outline-color: #e5484d; }
.xs-badge { position: absolute; left: 0; top: -22px; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 6px; background: #8b5cf6; color: #fff; white-space: nowrap; cursor: pointer; pointer-events: auto; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.item.xs-orig .xs-badge { background: #6b7280; }
.item.xs-gone .xs-badge { background: #e5484d; }
.xs-boards { max-height: 260px; }
.xs-boards .oitem { justify-content: space-between; }
.found-row { position: relative; }
.found-more { margin-left: auto; }
/* ===== proto2: просмотр прототипа ===== */
body.proto-links-off .proto-link { display: none; }
.proto-bezel { position: fixed; border: 12px solid #1f2329; border-radius: 40px; pointer-events: none; z-index: 40; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); box-sizing: border-box; }
.proto-bezel.desktop { border-color: #2b2d33; }
.proto-mode .item.pl-t { transition: opacity .15s, translate .15s, scale .1s; }
.proto-mode .item.pl-off { opacity: .35; }
.proto-mode .item.pl-dim { opacity: .45; }
.proto-mode .item.pl-on { opacity: 1; }
.proto-mode .item.pl-press { scale: .95; }
.pl-val { position: absolute; inset: 2px; display: flex; align-items: center; padding: 0 10px; background: inherit; background-color: #fff; border-radius: inherit; font-size: inherit; color: #1f2329; pointer-events: none; overflow: hidden; white-space: nowrap; }
.pl-input { position: fixed; z-index: 90; border: 2px solid #4262ff; border-radius: 8px; padding: 0 10px; box-sizing: border-box; background: #fff; }
.proto-bolt { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #f59f00; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; pointer-events: auto; cursor: crosshair; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.proto-bolt-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%); font-size: 22px; }
/* ===== export3: векторный PDF через печать ===== */
@media screen { #printPages { display: none; } }
@media print {
  body.printing > *:not(#printPages) { display: none !important; }
  body.printing { background: #fff !important; overflow: visible !important; }
  #printPages .pp { position: relative; overflow: hidden; break-after: page; }
  #printPages .pp:last-child { break-after: auto; }
  #printPages .pp.land { page: land; width: 297mm; height: 210mm; }
  #printPages .pp.port { page: port; width: 210mm; height: 297mm; }
  #printPages .pp svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  #printPages .pp-link { position: absolute; display: block; }
  @page land { size: A4 landscape; margin: 0; }
  @page port { size: A4 portrait; margin: 0; }
}
/* ===== tpl2: шаблоны ===== */
.tpl2-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.tpl-card { position: relative; }
.tpl-link { position: absolute; top: 6px; right: 6px; font-size: 13px; opacity: 0; cursor: pointer; background: #fff; border-radius: 6px; padding: 1px 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.tpl-card:hover .tpl-link, .tpl-card:focus-within .tpl-link { opacity: 1; }
.tcard.own { position: relative; }
.tcard.own .tpl-prev { width: 100%; height: 90px; object-fit: contain; background: #fbfbfc; border-radius: 6px; }
.tcard.featured { border-color: #f59f00; }
.tacts { display: flex; gap: 2px; margin-top: 4px; }
.tpl-edit-bar { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 12px; z-index: 60; font-size: 13.5px; }
.ftpl { margin-top: 6px; }
/* ===== посетители без регистрации: упрощённая панель ===== */
body.visitor #toolbar .tool[data-action], body.visitor #toolbar .more-tools,
body.visitor #toolbar .tool[data-tool]:not([data-tool="select"]):not([data-tool="note"]):not([data-tool="text"]):not([data-tool="shape"]):not([data-tool="rect"]):not([data-tool="pen"]):not([data-tool="connector"]):not([data-tool="comment"]) { display: none !important; }
.vis-hidden { display: none !important; }
.inv-multi textarea { flex: 1; min-width: 0; resize: vertical; }
.share-sv { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; margin: 8px 0; background: #f3f5ff; border-radius: 8px; }
/* ===== бренд-центр на доске ===== */
.brand-imgs { margin-bottom: 8px; }
.brand-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 6px; }
.brand-img { border: 1px solid #e3e5ea; border-radius: 6px; background: #fff; padding: 2px; height: 48px; cursor: pointer; }
.brand-img img { width: 100%; height: 100%; object-fit: contain; }
.brand-style { font-size: 15px; }
.quick-bar { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px; z-index: 60; }
/* панель объекта не уходит за край экрана — переносится на вторую строку */
#context { flex-wrap: wrap; height: auto; min-height: 44px; max-width: calc(100vw - 86px); }
@media (max-width: 640px) { #context { max-width: calc(100vw - 16px); } }

/* выбор при вставке таблицы: таблица / сетка / стикеры */
.cb.wide.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; height: auto; min-height: 52px; padding: 9px 12px; margin-top: 6px; text-align: left; }
.cb.wide.choice b { font-size: 14px; }
.cb.wide.choice .phint { margin: 0; font-weight: 400; }

/* обрыв связи: баннер сверху по центру, доска только для чтения */
#offlineBar { position: fixed; top: 70px; left: 50%; transform: translate(-50%, -12px); z-index: 300; padding: 9px 16px; border-radius: 10px; background: #1f2329; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 24px); text-align: center; }
#offlineBar.show { opacity: 1; transform: translate(-50%, 0); }

/* объект, который сейчас редактирует другой участник */
.remote-sel.remote-edit { background: rgba(255, 255, 255, .55); }

/* данные графика: таблица «подпись + ряды» */
.chart-pop { width: min(520px, calc(100vw - 16px)); }
.cg-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line, #e3e5e8); border-radius: 8px; }
.cg { border-collapse: collapse; width: 100%; font-size: 13px; }
.cg th, .cg td { border-bottom: 1px solid #eef0f2; padding: 2px; text-align: left; }
.cg th { background: #f7f8fa; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.cg-in { width: 100%; min-width: 64px; border: 1px solid transparent; border-radius: 5px; padding: 5px 6px; font: inherit; background: transparent; }
.cg-in:focus { border-color: var(--accent); outline: none; background: #fff; }
.cg-in.bad { border-color: #e5484d; background: #fff1f1; }
.cg-name { font-weight: 600; width: calc(100% - 30px); }
.cg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 2px 0 4px; vertical-align: middle; }
.cg-del { border: 0; background: none; color: #9aa0a8; cursor: pointer; font-size: 16px; padding: 0 4px; }
.cg-del:hover { color: #e5484d; }
.cg-err { min-height: 18px; margin: 6px 2px; color: #d93036; font-size: 12.5px; }
.cg-foot { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cg-foot .phint { margin: 0; }
.ch-val { font: 600 11px var(--font); fill: #3d4350; }
.ch-val.ch-in { fill: #fff; }

/* цитата в документе и тексте */
.txt .rt-q { border-left: 3px solid #c9cdd4; padding: 2px 0 2px 12px; margin: 6px 0; color: #4a5160; font-style: italic; }

/* таблица и код, которые правятся прямо в документе */
.rt-live-code { display: block; width: 100%; box-sizing: border-box; margin: 6px 0 2px; padding: 10px 12px; border: 1px solid #2b303b; border-radius: 8px; background: #1f2329; color: #e6e9ef; font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; tab-size: 2; }
.rt-live-wrap { overflow-x: auto; margin-top: 6px; }
.rt-live-tbl { border-collapse: collapse; min-width: 100%; font-size: 13px; }
.rt-live-tbl td { border: 1px solid #e3e5e8; padding: 0; min-width: 90px; }
.rt-live-tbl tr.hdr td { background: #f6f7f9; font-weight: 600; }
.rt-live-tbl input { width: 100%; box-sizing: border-box; border: 0; padding: 6px 8px; font: inherit; background: transparent; }
.rt-live-tbl input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; }
.rt-live-add { display: flex; gap: 6px; margin-top: 6px; }

/* выбор значка выноски */
.co-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.co-ic { border: 0; background: none; font-size: 18px; padding: 4px; border-radius: 6px; cursor: pointer; }
.co-ic:hover, .co-ic.on { background: #eef1ff; }

/* карточка: панель справа, доска не затемняется */
.modal-back.side-back { background: transparent; pointer-events: none; }
.modal-back.side-back > .modal { pointer-events: auto; }
.modal.card-modal.side { position: fixed; top: 64px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); max-height: none; border-radius: 14px; box-shadow: 0 10px 40px rgba(16, 20, 30, .22); }
@media (max-width: 640px) { .modal.card-modal.side { top: 8px; right: 8px; left: 8px; bottom: 8px; width: auto; } }
