/* Garantis Доска — фирменный вид (скилл grt-design): системный шрифт, 16/14/12/11 px,
   акцент #2563EB, тёмная шапка #0F172A, скругление 4px, тень только у всплывающих панелей. */
:root {
  --blue: #2563EB; --dark: #0F172A; --bg: #F8FAFC; --line: #E2E8F0; --line2: #CBD5E1;
  --t1: #1E293B; --t2: #334155; --t3: #475569; --t4: #64748B; --t5: #94A3B8;
  --amber-bg: #FFFBEB; --amber: #B45309; --amber-l: #FCD34D; --red: #DC2626;
  --sh: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .10);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--t2); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.on-board { overflow: hidden; overscroll-behavior: none; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--blue); }
.fatal { padding: 40px; font-size: 14px; color: var(--red); }
.dim { color: var(--t4); }
.err { color: var(--red); font-size: 12px; margin-top: 6px; min-height: 0; }
.err:empty { display: none; }
.note, .fly-note { font-size: 11px; color: var(--t5); line-height: 1.4; }
.empty { color: var(--t5); font-size: 14px; padding: 16px 4px; }
.empty.big { padding: 40px 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.warn { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-l); border-radius: 4px; padding: 8px 12px; font-size: 12px; }
.info { background: #fff; border: 2px solid var(--blue); border-radius: 4px; padding: 6px 12px; font-size: 12px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sh); }

/* ── элементы управления ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line2); background: #fff;
  border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--t2); white-space: nowrap; text-decoration: none; }
.btn:hover { background: #F1F5F9; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1D4ED8; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-t { color: var(--red); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.wide { width: 100%; height: 36px; font-size: 14px; }
.btn.link { border: 0; background: none; color: var(--t4); font-weight: 400; }
.btn:disabled { opacity: .5; cursor: default; }
.inp { height: 30px; border: 1px solid var(--line2); border-radius: 4px; padding: 0 8px; font: inherit; font-size: 12px; color: var(--t1); background: #fff; outline: none; }
.inp:focus { border-color: var(--blue); }
textarea.inp { height: auto; padding: 6px 8px; resize: vertical; line-height: 1.4; }
select.inp { padding-right: 4px; }
.inp.sm { height: 24px; }
.inp.dark { background: #1E293B; border-color: #334155; color: #fff; width: 280px; }
.inp.dark::placeholder { color: var(--t5); }
.inp.code { width: 100%; height: 44px; font-size: 16px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.icon-btn { border: 0; background: none; width: 26px; height: 26px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: var(--t3); font-size: 14px; }
.icon-btn:hover { background: #F1F5F9; }
.icon-btn:disabled { opacity: .3; }
.lbl { font-size: 12px; color: var(--t3); margin-bottom: 4px; }
.fld { display: flex; flex-direction: column; }
.form { display: flex; flex-direction: column; gap: 12px; }
.chk-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t3); cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.seg.wrap { flex-wrap: wrap; }
.seg button { border: 0; background: #fff; padding: 4px 10px; font-size: 12px; color: var(--t3); border-right: 1px solid var(--line2); white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--blue); color: #fff; }
.seg.inline button { padding: 3px 8px; }
.ava { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; user-select: none; border: 2px solid #fff; }
.ava.more { background: var(--t5); width: 28px; height: 28px; font-size: 11px; }
kbd { font-family: var(--font); font-size: 11px; background: #F1F5F9; border: 1px solid var(--line2); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }

/* ── всплывающее ── */
.toasts { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: var(--dark); color: #fff; font-size: 12px; padding: 8px 14px; border-radius: 4px; box-shadow: var(--sh); transition: opacity .3s; }
.toast.err { background: var(--red); }
.toast.out { opacity: 0; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 900; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 4px; box-shadow: var(--sh); max-width: 100%; display: flex; flex-direction: column; max-height: 84vh; }
.modal-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-title { flex: 1; font-size: 16px; font-weight: 600; color: var(--t1); }
.modal-body { padding: 16px; overflow: auto; font-size: 12px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.confirm-text { font-size: 14px; line-height: 1.5; color: var(--t2); }
.pop { position: fixed; z-index: 950; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--sh); padding: 8px; font-size: 12px; max-width: 360px; max-height: calc(100vh - 16px); overflow: auto; overscroll-behavior: contain; }
.size-pop { width: 190px; display: flex; flex-direction: column; gap: 6px; }
.size-inp { width: 100%; flex: 1; font-variant-numeric: tabular-nums; }
.size-list { max-height: 196px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); padding-top: 4px; }
.size-list .menu-item { padding: 5px 8px; font-variant-numeric: tabular-nums; }
.pop.fly { padding: 10px; }
.menu { display: flex; flex-direction: column; min-width: 200px; max-height: 70vh; overflow: auto; }
.menu-item { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 4px; font-size: 12px; color: var(--t2); width: 100%; }
.menu-item:hover { background: #F1F5F9; }
.menu-item.on { color: var(--blue); font-weight: 600; }
.menu-item.danger { color: var(--red); }
.menu-item.disabled { color: var(--t5); cursor: default; background: none; }
.mi-ico { width: 16px; text-align: center; flex: none; }
.mi-text { flex: 1; }
.mi-key { color: var(--t5); font-size: 11px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.list { display: flex; flex-direction: column; min-width: 220px; }
.fly-h { font-size: 11px; color: var(--t4); font-weight: 600; margin: 4px 0 6px; }
.fly-note { max-width: 240px; margin-top: 8px; }
.swatches { display: grid; gap: 4px; }
.swatches.s4 { grid-template-columns: repeat(4, 26px); }
.swatches.s5 { grid-template-columns: repeat(5, 32px); }
.swatches.s7 { grid-template-columns: repeat(7, 26px); }
.swatches.s8 { grid-template-columns: repeat(8, 24px); }
.sw { width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--line2); padding: 0; }
.swatches.s8 .sw { width: 24px; height: 24px; }
.sw.round { border-radius: 50%; }
.sw.on { outline: 2px solid var(--blue); outline-offset: 1px; }
.sw.none { background: repeating-linear-gradient(45deg, #fff 0 4px, #E2E8F0 4px 8px); }
.swatches.emo { grid-template-columns: repeat(7, 32px); }
.swatches.s5.emo { grid-template-columns: repeat(5, 32px); }
.sw.emo { font-size: 18px; line-height: 1; padding: 0; background: #fff; border-color: transparent; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sw.emo:hover { background: #F1F5F9; }
.sw-own { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--t4); cursor: pointer; }
.sw-custom { width: 26px; height: 22px; border: 1px solid var(--line2); border-radius: 4px; padding: 0; background: none; }
.shapes-grid { display: grid; grid-template-columns: repeat(4, 40px); gap: 4px; }
.shp { width: 40px; height: 34px; border: 1px solid transparent; background: #fff; border-radius: 4px; color: var(--t2); display: flex; align-items: center; justify-content: center; }
.shp:hover { background: #F1F5F9; }
.shp.on { border-color: var(--blue); color: var(--blue); }

/* выбор людей */
.pp { display: flex; flex-direction: column; gap: 6px; }
.pp-list { border: 1px solid var(--line); border-radius: 4px; max-height: 110px; overflow: auto; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; font-size: 12px; border-bottom: 1px solid #F1F5F9; }
.pp-row:hover { background: #F1F5F9; }
.pp-row.on { background: #EFF6FF; }
.pp-name { color: var(--t1); }
.pp-dep { color: var(--t5); font-size: 11px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pp-empty { padding: 8px; color: var(--t5); font-size: 12px; }
.chk { width: 14px; height: 14px; border: 1px solid var(--line2); border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; flex: none; }
.pp-row.on .chk { background: var(--blue); border-color: var(--blue); }

/* ── вход ── */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--dark); padding: 16px; }
.login-box { width: 380px; max-width: 100%; background: #fff; border-radius: 4px; padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sh); }
.login-logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--t1); }
.login-logo .ico { color: var(--blue); }
.login-sub { font-size: 12px; color: var(--t4); line-height: 1.5; }
.login-who { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
.login-who .dim { font-size: 12px; }
.login-dev { border-top: 1px dashed var(--line2); padding-top: 12px; margin-top: 4px; }
.login-dev .inp { flex: 1; }

/* ── список досок ── */
.hdr { height: 52px; background: var(--dark); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 10; }
.hdr-logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 16px; font-weight: 600; white-space: nowrap; }
.hdr-logo .ico { color: #93C5FD; }
.hdr-user { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 4px; }
.hdr-user:hover { background: #1E293B; }
.hdr-user .ava { border-color: var(--dark); }
.list-wrap { display: flex; min-height: calc(100vh - 52px); }
.side-nav { width: 220px; flex: none; padding: 16px 12px; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 2px; }
.nav-i { display: flex; justify-content: space-between; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 4px; font-size: 14px; color: var(--t2); }
.nav-i:hover { background: #F1F5F9; }
.nav-i.on { background: #EFF6FF; color: var(--blue); font-weight: 600; }
.nav-n { font-size: 11px; color: var(--t5); font-variant-numeric: tabular-nums; }
.nav-foot { margin-top: auto; font-size: 11px; color: var(--t5); line-height: 1.4; padding: 8px 10px; }
.list-main { flex: 1; padding: 20px 28px 40px; min-width: 0; }
.sec-h { font-size: 16px; font-weight: 600; color: var(--t1); margin: 8px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-h .dim { font-weight: 400; font-size: 14px; }
.tpl-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; }
.tpl-tile { flex: none; width: 128px; height: 92px; border: 1px solid var(--line); background: #fff; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tpl-tile:hover { border-color: var(--blue); }
.tpl-tile .tt-e { font-size: 24px; }
.tpl-tile .tt-t { font-size: 12px; color: var(--t2); }
.tpl-tile:first-child .tt-e { color: var(--blue); font-size: 28px; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.btile { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.btile:hover { border-color: var(--blue); }
.bt-th { height: 150px; background: #F1F5F9; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.bt-th img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.bt-ph { color: var(--t5); font-size: 28px; }
.bt-info { padding: 10px 12px; position: relative; }
.bt-name { font-size: 14px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 54px; }
.bt-meta { font-size: 11px; color: var(--t5); margin-top: 3px; }
.bt-act { position: absolute; right: 6px; top: 8px; display: flex; }
.star { font-size: 16px; color: var(--t5); }
.star.on { color: #F59E0B; }
.blist { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 12px; }
.blist th { text-align: left; font-weight: 600; color: var(--t3); padding: 8px 10px; border-bottom: 1px solid var(--line); background: #F8FAFC; }
.blist td { padding: 8px 10px; border-bottom: 1px solid #F1F5F9; color: var(--t2); white-space: nowrap; }
.blist tr:hover td { background: #F8FAFC; cursor: pointer; }
.bl-e { margin-right: 8px; }
.bl-act { text-align: right; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tpl { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 14px 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.tpl:hover { border-color: var(--blue); }
.tpl-e { font-size: 22px; }
.tpl-t { font-size: 14px; font-weight: 600; color: var(--t1); }
.tpl-d { font-size: 11px; color: var(--t4); line-height: 1.4; }

/* ── доска ── */
/* overflow: clip — в отличие от hidden, браузер не может сам прокрутить слой (к курсору при наборе крупного текста у края) */
.bd { position: fixed; inset: 0; overflow: hidden; overflow: clip; }
.cw { position: absolute; inset: 0; overflow: hidden; overflow: clip; background-color: #F8FAFC; outline: none; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
.cw.grid-dots { background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1.2px); }
.cw.grid-lines { background-image: linear-gradient(#E2E8F0 1px, transparent 1px), linear-gradient(90deg, #E2E8F0 1px, transparent 1px); }
.cw[data-tool="hand"], .cw.panning { cursor: grab; }
.cw.panning:active { cursor: grabbing; }
.cw[data-tool="sticky"], .cw[data-tool="text"], .cw[data-tool="shape"], .cw[data-tool="frame"], .cw[data-tool="card"], .cw[data-tool="mind"],
.cw[data-tool="table"], .cw[data-tool="stamp"], .cw[data-tool="line"], .cw[data-tool="pen"], .cw[data-tool="marker"] { cursor: crosshair; }
.cw[data-tool="comment"] { cursor: cell; }
.cw[data-tool="eraser"] { cursor: none; }
.cw[data-tool="laser"] { cursor: crosshair; }
.scene, .ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ov { pointer-events: none; }
.ov .hdl { pointer-events: all; cursor: pointer; }
.ov .qplus { cursor: copy; opacity: .85; }
.ov .qplus:hover { opacity: 1; }
.scene [data-id] { cursor: default; }
.scene .frame-title { user-select: none; }
.scene .frame-title-hit { cursor: move; }
.cw[data-tool="select"] .scene [data-id]:not(.locked) { cursor: move; }
.cw[data-tool="select"] .scene [data-type="frame"] .frame-body { cursor: default; }
.scene foreignObject { overflow: visible; }
.hl, .el { position: absolute; inset: 0; pointer-events: none; overflow: hidden; overflow: clip; }
.el > * { pointer-events: auto; }

/* правка текста поверх объекта */
.edwrap { position: absolute; transform-origin: 0 0; display: flex; flex-direction: column; }
.edwrap .editor { outline: none; cursor: text; user-select: text; -webkit-user-select: text; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.3em; }
.ed-sticky { box-shadow: 0 0 0 2px var(--blue); }
.ed-sticky .editor { height: auto; max-height: 100%; }
.ed-text .editor { box-shadow: 0 0 0 1.5px var(--blue); min-width: 60px; }
.edwrap .editor:empty::before { content: 'Текст'; color: var(--t5); pointer-events: none; }
.ed-mind .editor:empty::before { content: 'Тема'; }
.ed-shape { justify-content: center; }
.ed-mind { justify-content: center; box-shadow: 0 0 0 2px var(--blue); }
.ed-table .editor { box-shadow: inset 0 0 0 2px var(--blue); min-height: 100%; }
.ed-line .editor { box-shadow: 0 0 0 1.5px var(--blue); background: #fff; }
.editor.frame-ed { background: #fff; border: 1px solid var(--blue); border-radius: 4px; padding: 2px 6px; font-size: 12px; font-weight: 600; color: var(--t3); min-width: 120px; }

.pin { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; display: flex; align-items: flex-end; }
.pin-a { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: var(--sh); }
.pin-n { background: var(--dark); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 5px; margin-left: -8px; margin-bottom: 20px; border: 1px solid #fff; }
.pin.resolved { opacity: .45; }
.cursor { position: absolute; left: 0; top: 0; pointer-events: none; transition: transform .08s linear; display: flex; align-items: flex-start; }
.cursor span { color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin: 14px 0 0 -2px; white-space: nowrap; }
.reaction { position: absolute; pointer-events: none; animation: rise 2.6s ease-out forwards; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); }
.re-e { font-size: 40px; }
.re-n { color: #fff; font-size: 11px; padding: 0 6px; border-radius: 4px; }
@keyframes rise { 0% { opacity: 0; margin-top: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; margin-top: -140px; } }

/* плавающие панели */
.fp { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--sh); display: flex; align-items: center; gap: 2px; padding: 4px; }
.top-left { top: 12px; left: 12px; max-width: calc(100vw - 24px); }
.top-right { top: 12px; right: 12px; }
.tools { top: 64px; left: 12px; flex-direction: column; padding: 4px; max-height: calc(100vh - 140px); overflow-y: auto; overflow-x: hidden; }
.bottom-left { bottom: 12px; left: 12px; }
.bottom-right { bottom: 12px; right: 12px; }
.minimap { bottom: 58px; right: 12px; padding: 0; width: 200px; height: 130px; cursor: pointer; display: block; }
.ctxbar { z-index: 30; flex-wrap: nowrap; white-space: nowrap; }
.bt-logo { display: flex; color: var(--blue); padding: 3px 4px; border-radius: 4px; }
.bt-logo:hover { background: #F1F5F9; }
.bt-title { font-size: 14px; font-weight: 600; color: var(--t1); padding: 4px 6px; border-radius: 4px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.bt-title:hover { background: #F1F5F9; }
.bt-role { font-size: 11px; color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-l); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.bt-status { width: 8px; height: 8px; border-radius: 50%; background: var(--t5); margin: 0 4px; flex: none; }
.bt-status.online { background: var(--blue); }
.bt-status.offline { background: var(--amber-l); }
.bt-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; flex: none; }
.tb-hsep { height: 1px; width: 28px; background: var(--line); margin: 4px auto; flex: none; }
.tb-btn { position: relative; min-width: 32px; height: 32px; border: 0; background: none; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--t2); padding: 0 6px; font-size: 12px; flex: none; }
.tb-btn:hover { background: #F1F5F9; }
.tb-btn.on { background: #EFF6FF; color: var(--blue); }
.tb-btn:disabled { opacity: .35; cursor: default; background: none; }
.tb-btn.sm { min-width: 26px; height: 26px; padding: 0 4px; }
.tb-btn.txt span { font-size: 12px; }
.tools .tb-btn { width: 40px; height: 40px; }
.tools .tb-btn.on { background: var(--blue); color: #fff; }
.fly-dot { position: absolute; right: 3px; bottom: 3px; width: 0; height: 0; border-left: 4px solid transparent; border-bottom: 4px solid currentColor; opacity: .5; }
.zoom-val { min-width: 52px; font-variant-numeric: tabular-nums; }
.share-btn { margin-left: 4px; height: 32px; }
.share-btn .ico { margin-right: 2px; }
.peers { display: flex; align-items: center; padding-left: 4px; }
.peers .ava { margin-left: -6px; cursor: pointer; }
.peers .ava.me { cursor: default; margin-left: 0; }
.peers .ava.following { outline: 2px solid var(--blue); }
.peers .tb-btn { margin-left: 2px; }
.timer-chip span { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; }
.timer-chip.done { color: var(--red); background: #FEF2F2; }
.timer-chip.paused { color: var(--amber); }
.timer-pop { width: 280px; }
.timer-pop .seg button { flex: 1 0 25%; border-bottom: 1px solid var(--line2); }
.sw-cur { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line2); display: inline-block; }
.sw-cur.ring { background: #fff; border-width: 3px; border-radius: 50%; }
.a-col { font-weight: 700; font-size: 14px; border-bottom: 3px solid var(--t1); line-height: 1; padding: 0 2px; }
.size-btn { min-width: 44px; font-variant-numeric: tabular-nums; }
.grp { display: inline-flex; }
.banners { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 25; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.vote-b b { color: var(--t1); }
.search-bar { top: 64px; left: 50%; transform: translateX(-50%); gap: 6px; padding: 4px 4px 4px 10px; }
.srch-n { font-size: 11px; color: var(--t4); min-width: 40px; font-variant-numeric: tabular-nums; }
.blocker { position: absolute; inset: 0; background: rgba(248, 250, 252, .92); z-index: 100; display: flex; align-items: center; justify-content: center; }
.blocker-box { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px; box-shadow: var(--sh); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; max-width: 360px; }
.blocker-t { font-size: 16px; font-weight: 600; color: var(--t1); }
.blocker-x { font-size: 12px; color: var(--t4); }

/* боковая панель */
.side { position: absolute; top: 64px; right: 12px; bottom: 58px; width: 320px; z-index: 22; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--sh); display: flex; flex-direction: column; }
.side-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.side-t { flex: 1; font-size: 14px; font-weight: 600; color: var(--t1); }
.side-tools { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.side-list { flex: 1; overflow: auto; padding: 6px; }
.side-item { padding: 8px; border-radius: 4px; cursor: pointer; font-size: 12px; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid #F1F5F9; }
.side-item:hover { background: #F8FAFC; }
.side-item.dim { opacity: .55; }
.side-item.auto b { font-weight: 400; color: var(--t3); }
.si-top { display: flex; align-items: center; gap: 6px; color: var(--t1); }
.si-top .th-d { margin-left: auto; }
.si-x { color: var(--t3); line-height: 1.4; }
.si-n { color: var(--blue); font-size: 11px; }
.side-foot { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.frame-item { flex-direction: row; align-items: center; }
.fi-n { width: 20px; color: var(--t5); font-variant-numeric: tabular-nums; }
.fi-t { flex: 1; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-b { display: flex; }
.vote-row { flex-direction: row; align-items: center; gap: 10px; }
.vr-n { min-width: 28px; height: 28px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.vr-t { flex: 1; color: var(--t1); }
.ver-prev { background: #F8FAFC; border: 1px solid var(--line); display: flex; justify-content: center; }
.ver-prev svg { max-width: 100%; height: auto; }

/* обсуждение */
.thread { position: absolute; z-index: 40; width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--sh); display: flex; flex-direction: column; max-height: 420px; }
.th-head { display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.th-t { flex: 1; font-size: 12px; font-weight: 600; color: var(--t1); }
.th-list { overflow: auto; padding: 6px 12px; display: flex; flex-direction: column; gap: 10px; }
.th-list:empty { display: none; }
.th-msg { display: flex; gap: 8px; }
.th-msg .ava { border: 0; }
.th-b { flex: 1; min-width: 0; }
.th-n { font-size: 12px; font-weight: 600; color: var(--t1); }
.th-d { font-size: 11px; color: var(--t5); font-weight: 400; margin-left: 6px; }
.th-x { font-size: 12px; color: var(--t2); line-height: 1.45; overflow-wrap: anywhere; user-select: text; }
.ment { color: var(--blue); font-weight: 600; }
.th-in { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; position: relative; }
.th-in textarea { width: 100%; }
.ment-box { position: absolute; left: 12px; right: 12px; bottom: 100%; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--sh); max-height: 180px; overflow: auto; }

/* доступ */
.share { display: flex; flex-direction: column; gap: 16px; }
.share select.inp { width: 100%; }
.members { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; max-height: 220px; overflow: auto; }
.mem { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid #F1F5F9; }
.mem .ava { border: 0; }
.mem-n { flex: 1; font-size: 12px; color: var(--t1); min-width: 0; }
.mem-d { font-size: 11px; color: var(--t5); }
.mem-r { font-size: 11px; color: var(--t4); }
.mem select.inp { width: 140px; }
.keys { border-collapse: collapse; width: 100%; }
.keys td { padding: 4px 6px; border-bottom: 1px solid #F1F5F9; font-size: 12px; }
.keys td:first-child { width: 46%; }

/* презентация */
.presenting .fp, .presenting .side, .presenting .banners { display: none !important; }
.presenting .cw { background: #0F172A !important; background-image: none !important; }
.presenting .pin { display: none; }
.pres-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 60; background: rgba(15, 23, 42, .9); color: #fff; border-radius: 4px; padding: 4px; display: flex; align-items: center; gap: 4px; }
.pres-bar .tb-btn { color: #fff; font-size: 16px; }
.pres-bar .tb-btn:hover { background: #334155; }
.pres-bar .tb-btn.on { background: var(--blue); color: #fff; }
.pres-bar .tb-btn.txt { font-size: 12px; }
.pb-t { font-size: 12px; padding: 0 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pres-bar .bt-sep { background: #334155; }

/* узкий экран */
@media (max-width: 760px) {
  .hdr { padding: 0 12px; gap: 8px; }
  .hdr .inp.dark { width: 120px; }
  .hdr-user span { display: none; }
  .side-nav { display: none; }
  .list-main { padding: 16px; }
  .bgrid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .top-right .tb-btn, .top-right .bt-sep, .peers { display: none; }
  .top-left { max-width: calc(100vw - 150px); }
  .bottom-left .bt-sep, .bottom-left .tb-btn.txt, .bottom-right .tb-btn[title="Миникарта"], .bottom-right .bt-sep { display: none; }
  .share-btn { padding: 0 8px; }
  .bt-title { max-width: 120px; }
  .tools { top: auto; bottom: 58px; left: 50%; transform: translateX(-50%); flex-direction: row; max-width: calc(100vw - 24px); overflow-x: auto; overflow-y: hidden; }
  .tools .tb-btn { width: 36px; height: 36px; }
  .tb-hsep { width: 1px; height: 26px; margin: 0 2px; }
  .minimap { display: none !important; }
  .side { left: 12px; width: auto; }
  .ctxbar { max-width: calc(100vw - 24px); overflow-x: auto; }
}

.zoom-tip { position: fixed; z-index: 1001; transform-origin: 0 0; max-width: 420px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-l); border-radius: 4px; padding: 8px 12px; font-size: 12px; line-height: 1.5; box-shadow: var(--sh); }
.zoom-tip .btn { margin-left: 4px; }
/* логотип в тёмной шапке: контур светлый, иначе он сливается с фоном */
.hdr-logo .logo [stroke="#0F172A"] { stroke: #E2E8F0; }
.logo { flex: none; display: block; }
