:root {
  --violet: #7000ff;
  --violet-600: #5b00e0;
  --violet-800: #3a00a8;
  --violet-900: #24006b;
  --lavender: #a98bff;
  --lavender-200: #e4daff;
  --lavender-100: #f1ecff;
  --bg: #f4f0ff;
  --card: #ffffff;
  --ink: #1d1235;
  --ink-2: #4b4166;
  --ink-3: #7c7299;
  --line: #e7e0f7;
  --yellow: #ffe600;
  --cyan: #4fd3ff;
  --orange: #ff6a3d;
  --green: #12b76a;
  --red: #e5374f;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 24px rgba(58, 0, 168, 0.08);
  --head: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + var(--safe-b)); }
.boot { padding: 48px 16px; text-align: center; color: var(--ink-3); }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 24px; line-height: 1.15; font-weight: 800; }
h2 { font-size: 18px; line-height: 1.25; font-weight: 700; }
h3 { font-size: 15px; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
a { color: var(--violet); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.page { padding: 12px 16px 24px; }

/* Шапка и навигация */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(244, 240, 255, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn {
  width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--card);
  display: grid; place-items: center; color: var(--violet-800); font-size: 18px; cursor: pointer; box-shadow: var(--shadow);
}
.rolechip {
  border: 0; border-radius: 999px; padding: 7px 12px; background: var(--card); color: var(--violet-800);
  font: 700 13px var(--body); cursor: pointer; box-shadow: var(--shadow); white-space: nowrap;
}
.demo-pill { background: var(--yellow); color: #3a2b00; border-radius: 999px; padding: 3px 9px; font: 800 11px var(--body); letter-spacing: .04em; text-transform: uppercase; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center; background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar .in { display: flex; width: 100%; max-width: 560px; }
.tabbar a {
  flex: 1; text-align: center; text-decoration: none; color: var(--ink-3);
  font: 700 11px var(--body); padding: 6px 2px; border-radius: 12px;
}
.tabbar a .ic { display: block; font-size: 20px; line-height: 24px; }
.tabbar a.on { color: var(--violet); background: var(--lavender-100); }

/* Карточки */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 10px; }
.section-title h2 { flex: 1; }
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 28px; padding: 20px;
  background: radial-gradient(120% 90% at 100% 0%, #8f3dff 0%, rgba(143, 61, 255, 0) 55%), linear-gradient(160deg, #7000ff 0%, #4a00c4 55%, #2c0080 100%);
  box-shadow: 0 12px 32px rgba(74, 0, 196, 0.35);
}
.hero .kicker { font: 700 12px var(--body); opacity: .85; letter-spacing: .02em; }
.hero h1 { font-size: 26px; margin-top: 6px; }
.hero .stage { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.hero .art { position: absolute; right: -26px; top: -18px; width: 128px; opacity: .9; pointer-events: none; }
.hero .kicker, .hero h1 { position: relative; padding-right: 70px; }
.hero .main-action { margin-top: 18px; }
.hero .sub { margin-top: 8px; font-size: 13px; opacity: .9; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px;
  font: 700 12px var(--body); background: var(--lavender-100); color: var(--violet-800); white-space: nowrap;
}
.hero .badge { background: rgba(255, 255, 255, .18); color: #fff; }
.badge.yellow { background: var(--yellow); color: #3a2b00; }
.badge.green { background: #dcfae6; color: #05603a; }
.badge.red { background: #ffe4e8; color: #a3122a; }
.badge.cyan { background: #dff6ff; color: #035b7d; }
.badge.orange { background: #ffe9e0; color: #9a2c07; }
.badge.gray { background: #eeeaf6; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 13px 18px; min-height: 48px; cursor: pointer;
  font: 800 15px var(--body); text-decoration: none; transition: transform .08s ease, opacity .15s;
  background: var(--violet); color: #fff; width: 100%;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.white { background: #fff; color: var(--violet-800); }
.btn.soft { background: var(--lavender-100); color: var(--violet-800); }
.btn.ghost { background: transparent; color: var(--violet); border: 2px solid var(--lavender-200); }
.btn.danger { background: #ffe4e8; color: #a3122a; }
.btn.yellow { background: var(--yellow); color: #2b2100; }
.btn.sm { min-height: 38px; padding: 8px 14px; font-size: 13px; border-radius: 12px; width: auto; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns .btn { flex: 1; min-width: 140px; }
.linkbtn { border: 0; background: none; color: var(--violet); font: 700 14px var(--body); padding: 6px 0; cursor: pointer; }

/* Быстрые переходы */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tile {
  background: var(--card); border-radius: 18px; padding: 14px 10px 12px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-height: 92px;
}
.tile .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: var(--lavender-100); }
.tile b { font: 700 13px/1.2 var(--body); }
.tile.y .ic { background: #fff7b3; } .tile.c .ic { background: #dff6ff; } .tile.o .ic { background: #ffe9e0; }
.tiles.more { grid-template-columns: repeat(2, 1fr); }

/* Метрики */
.metric { display: flex; align-items: flex-end; gap: 10px; }
.metric .big { font: 800 40px/1 var(--head); color: var(--violet); }
.bar { height: 10px; border-radius: 99px; background: var(--lavender-100); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--lavender)); }

/* Списки задач */
.task {
  display: block; text-decoration: none; color: inherit; background: var(--card); border-radius: 18px;
  padding: 14px; box-shadow: var(--shadow); border-left: 5px solid var(--lavender-200);
}
.task + .task { margin-top: 10px; }
.task.in_progress { border-left-color: var(--violet); }
.task.done { border-left-color: var(--green); }
.task.overdue { border-left-color: var(--red); }
.task .t { font-weight: 800; }
.task .e { color: var(--ink-2); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task .meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.group-h { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; }
.group-h h2 { font-size: 15px; flex: 1; }

/* Раскрывающиеся карточки */
details.exp { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
details.exp + details.exp { margin-top: 10px; }
details.exp > summary { list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; position: relative; }
details.exp > summary::-webkit-details-marker { display: none; }
details.exp > summary::after { content: '⌄'; position: absolute; right: 16px; top: 12px; font-size: 20px; color: var(--violet); transition: transform .2s; }
details.exp[open] > summary::after { transform: rotate(180deg); }
details.exp .body { padding: 0 16px 16px; }
.field { margin-top: 12px; }
.field .lbl { font: 800 11px var(--body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.src { font: 800 10px var(--body); border-radius: 6px; padding: 2px 6px; text-transform: none; letter-spacing: 0; }
.src.h { background: #ede5ff; color: var(--violet-800); }
.src.r { background: #dff6ff; color: #035b7d; }
.quote { border-left: 3px solid var(--lavender); padding-left: 10px; }

/* Формы */
label.f { display: block; margin-top: 14px; }
label.f > span { display: block; font: 800 13px var(--body); margin-bottom: 6px; }
label.f > span em { color: var(--red); font-style: normal; }
input[type=text], input[type=date], input[type=number], textarea, select {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 11px 12px; background: #fff;
  font: 500 15px/1.4 var(--body); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--violet) 50%), linear-gradient(135deg, var(--violet) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--lavender); box-shadow: 0 0 0 4px var(--lavender-100); }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.err { color: var(--red); font-weight: 700; font-size: 13px; margin-top: 8px; }
.saving { color: var(--ink-3); font-size: 13px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 16px; padding: 12px; cursor: pointer; background: #fff; }
.choice + .choice { margin-top: 8px; }
.choice input { margin-top: 3px; accent-color: var(--violet); width: 18px; height: 18px; }
.choice.on { border-color: var(--violet); background: var(--lavender-100); }
.toggle { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-weight: 600; }
.toggle input { accent-color: var(--violet); width: 20px; height: 20px; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale button { border: 0; border-radius: 10px; padding: 9px 0; background: var(--lavender-100); color: var(--violet-800); font: 800 13px var(--body); cursor: pointer; }
.scale button.on { background: var(--violet); color: #fff; }

/* Плашки */
.note { border-radius: 16px; padding: 12px 14px; background: var(--lavender-100); color: var(--violet-900); font-size: 14px; }
.note.yellow { background: #fff9c2; color: #4a3b00; }
.note.red { background: #ffe9ec; color: #7a0d1f; }
.note.green { background: #e3fbec; color: #05603a; }
.note.cyan { background: #e2f7ff; color: #034763; }
.conflict { border: 2px solid var(--orange); border-radius: 16px; padding: 12px; background: #fff4ef; margin-top: 12px; }

/* Лента комментариев */
.feed > * + * { margin-top: 10px; }
.entry { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.entry .who { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; }
.entry .who .when { font-weight: 500; color: var(--ink-3); margin-left: auto; }
.entry .txt { margin-top: 6px; white-space: pre-line; }
.avatar { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font: 800 12px var(--body); color: #fff; background: var(--violet); flex: none; }
.avatar.manager { background: #1c9bff; } .avatar.hr { background: var(--orange); }

/* Карусель */
.onb { min-height: 100vh; background: linear-gradient(170deg, #7000ff 0%, #4a00c4 60%, #2c0080 100%); color: #fff; display: flex; flex-direction: column; }
.onb .top { display: flex; align-items: center; padding: 14px 16px; gap: 10px; }
.onb .top .linkbtn { color: #fff; opacity: .85; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; flex: 1; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; padding: 0 16px 16px; display: flex; flex-direction: column; }
.slide .ill { height: 150px; display: flex; justify-content: center; }
.slide .ill svg { height: 150px; width: auto; }
.slide .num { font: 800 12px var(--body); opacity: .75; margin-top: 4px; }
.slide h2 { font-size: 22px; margin: 4px 0 10px; }
.slide .panel { background: #fff; color: var(--ink); border-radius: 22px; padding: 14px; overflow-y: auto; max-height: calc(100vh - 360px); min-height: 160px; }
.slide .panel .item + .item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.onb .foot { padding: 12px 16px calc(16px + var(--safe-b)); }
.dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .35); transition: width .2s; }
.dots i.on { width: 24px; background: var(--yellow); }

/* Выбор роли */
.picker { min-height: 100vh; padding: 28px 16px; background: linear-gradient(170deg, #7000ff 0%, #4a00c4 60%, #2c0080 100%); color: #fff; }
.persona { display: flex; gap: 14px; align-items: center; background: #fff; color: var(--ink); border-radius: 22px; padding: 16px; margin-top: 12px; cursor: pointer; border: 0; width: 100%; text-align: left; font: inherit; }
.persona .av { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 800 20px var(--head); color: #fff; flex: none; }
.persona b { display: block; font: 800 16px var(--body); }

.empty { text-align: center; padding: 24px 12px; color: var(--ink-3); }
.empty svg { width: 110px; display: block; margin: 0 auto 8px; }
.seg { display: flex; background: var(--lavender-100); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px; font: 700 13px var(--body); color: var(--violet-800); cursor: pointer; }
.seg button.on { background: #fff; box-shadow: var(--shadow); }
.filters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.filters select { padding: 9px 28px 9px 10px; font-size: 13px; border-radius: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); font-weight: 700; }
.kv dd { margin: 0; }
ol.clean, ul.clean { margin: 0; padding-left: 20px; }
ol.clean li + li, ul.clean li + li { margin-top: 8px; }
.confirm-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.confirm-row:last-child { border-bottom: 0; }
.confirm-row .st { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; flex: none; }
.st.ok { background: #dcfae6; color: #05603a; } .st.no { background: #eeeaf6; color: var(--ink-3); } .st.stale { background: #ffe9e0; color: #9a2c07; }

#toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); }
@media (min-width: 420px) { h1 { font-size: 26px; } }

#modal { position: fixed; inset: 0; z-index: 60; background: rgba(29, 18, 53, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + var(--safe-b)); }
#modal .sheet { background: var(--card); border-radius: 24px; padding: 20px; width: 100%; max-width: 520px; box-shadow: 0 20px 50px rgba(29, 18, 53, .3); }
#modal .sheet p { font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.btn:focus-visible, .linkbtn:focus-visible, .iconbtn:focus-visible, .tile:focus-visible, .task:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; }
.topbar { top: env(safe-area-inset-top, 0px); }

/* Таблицы документа — как в исходнике */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-top: 12px; }
table.doc { width: 100%; border-collapse: collapse; border-style: hidden; font-size: 14px; line-height: 1.45; }
table.doc th, table.doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.doc th { background: var(--lavender-100); color: var(--violet-900); font-weight: 800; font-size: 13px; }
table.doc.wide { min-width: 680px; }
table.doc.zones td:first-child { font-weight: 700; min-width: 170px; }
table.doc tr.editing td { background: #fff9c2; }
.row-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-weight: 500; }
.doc-flow > * + * { margin-top: 12px; }
.doc-h { font-size: 16px; }
.doc-item + .doc-item { margin-top: 10px; }
ol.doc-ol { margin: 0; padding-left: 22px; }
ol.doc-ol > li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.crit-kv { margin-top: 8px; font-size: 13px; }
.slide .panel .tbl-wrap { margin-top: 0; }
.slide .panel table.doc { font-size: 13px; }

.hint.swipe { margin: 8px 0 -4px; }
@media (min-width: 720px) { .hint.swipe { display: none; } }

/* План развития — таблица зон роста */
.plan-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 12px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
table.plan { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1040px; font-size: 14px; line-height: 1.45; }
table.plan thead th {
  background: var(--violet-600); color: #fff; text-align: left; padding: 14px 16px;
  font: 800 13px/1.3 var(--body); letter-spacing: .01em; white-space: nowrap;
}
table.plan thead th:first-child { border-top-left-radius: 22px; }
table.plan thead th:last-child { border-top-right-radius: 22px; background: var(--violet-800); }
table.plan .sticky { position: sticky; left: 0; z-index: 1; }
table.plan thead th.sticky { z-index: 3; }
table.plan tbody th.zone-name {
  background: var(--lavender-100); text-align: left; vertical-align: top; width: 230px; min-width: 210px;
  padding: 16px; box-shadow: inset -1px 0 0 var(--lavender-200);
}
table.plan .zt { font: 800 15px/1.3 var(--head); color: var(--violet-900); white-space: pre-wrap; }
table.plan tbody td { vertical-align: top; padding: 16px; border-top: 1px solid var(--line); width: 19%; }
table.plan tbody th { border-top: 1px solid var(--lavender-200); }
table.plan tbody tr:first-child td, table.plan tbody tr:first-child th { border-top: 0; }
table.plan td.tasks-cell { background: #fbf9ff; width: 22%; min-width: 230px; }
ul.bul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.bul li { position: relative; padding-left: 16px; white-space: pre-wrap; }
ul.bul li::before { content: ''; position: absolute; left: 2px; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
ul.bul.target li::before { background: var(--green); border-radius: 2px; transform: rotate(45deg); }
.ln { white-space: pre-wrap; }
.ln + .ln, .ln + ul, ul + .ln { margin-top: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { background: #ffe9e0; color: #8a2a0a; border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 13px; white-space: pre-wrap; }
.tcount { font: 800 11px var(--body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.chips { display: grid; gap: 6px; }
.tchip { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--lavender-200); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13px; line-height: 1.3; }
.tchip:hover { border-color: var(--lavender); }
.tchip i { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; background: #c9c2db; }
.tchip.st-in_progress i { background: var(--violet); }
.tchip.st-done i { background: var(--green); }
.tchip.st-done span { text-decoration: line-through; text-decoration-color: rgba(18, 183, 106, .5); }
.tchip.arch { opacity: .55; }
.tchip em { font-style: normal; font-weight: 600; }
select.pick { margin-top: 10px; font-size: 13px; padding: 9px 30px 9px 12px; border-style: dashed; border-color: var(--lavender); color: var(--violet-800); font-weight: 700; background-color: #fff; }
.tasks-cell .linkbtn.small { font-size: 13px; padding-top: 8px; }
table.plan tr.editing th, table.plan tr.editing td { background: #fffbe6; }
table.plan tr.editing textarea { min-height: 120px; font-size: 13px; padding: 9px 10px; }
.pick-list { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px 8px; background: #fff; }
.pick-list .grp { font: 800 11px var(--body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 4px; }
.pick-list label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 5px 0; cursor: pointer; }
.pick-list input { accent-color: var(--violet); width: 16px; height: 16px; margin-top: 1px; flex: none; }
.new-task { display: grid; gap: 6px; margin-top: 10px; }
.new-task input, .new-task textarea { font-size: 13px; padding: 9px 10px; min-height: 0; }
tr.conflict-row td { background: #fff4ef; padding: 12px 16px; }
@media (min-width: 1080px) { .hint.swipe { display: none; } }

/* элементы не прячутся под шапку и нижнюю панель при прокрутке и фокусе */
.page button, .page a, .page select, .page input, .page textarea { scroll-margin: 84px 0 104px; }
table.plan .row-tools .btn.soft { background: #fff; box-shadow: 0 1px 0 var(--lavender-200); }
@media (max-width: 600px) {
  table.plan { min-width: 900px; font-size: 13px; }
  table.plan tbody th.zone-name { width: 150px; min-width: 150px; padding: 12px; }
  table.plan .zt { font-size: 13px; }
  table.plan tbody td { padding: 12px; }
  table.plan .row-tools { flex-direction: column; align-items: stretch; }
  table.plan .row-tools .btn { width: 100%; }
}

#app.wide { max-width: 1320px; }
#app.wide .page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
#app.wide .page > .row, #app.wide .page > div:not(.plan-wrap), #app.wide .page > .card, #app.wide .page > .section-title, #app.wide .page > a.task, #app.wide .page > .btn, #app.wide .page > .doc-p, #app.wide .page > .hint, #app.wide .page > .empty { max-width: 760px; }
.tchip { padding: 6px 9px; font-size: 12.5px; }
.chips { gap: 5px; }

.tasks-cell .comp-add { width: 100%; justify-content: flex-start; text-align: left; margin-bottom: 6px; white-space: normal; }

/* Этапы и согласование */
.stage-chips { display: grid; gap: 6px; margin-top: 14px; }
.stage-chip { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; font-size: 13px; }
.stage-chip b { font-weight: 800; }
.stage-chip span { white-space: nowrap; opacity: .9; font-weight: 700; }
.stage-chip.ok { background: rgba(18, 183, 106, .32); }
.stage-panel h2 { font-size: 16px; }
.entry.flat { box-shadow: none; border: 1px solid var(--line); }
.entry.changes { border-color: #ffc9b5; background: #fff8f5; }
.topbar h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 16px; line-height: 1.2; }

.avatar.director { background: #0ba678; }
.avatar { font-size: 10px; letter-spacing: -.02em; }
.stage-chip.final { background: rgba(255, 230, 0, .22); }
.stage-chip.final.ok { background: rgba(18, 183, 106, .45); }

.target-cell .cell-edit { margin-top: 10px; width: 100%; white-space: normal; text-align: left; justify-content: flex-start; }
