@font-face {
  font-family: Inter;
  src: url("/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
:root {
  --paper: #F3F1EC;
  --card: #FFFDFB;
  --ink: #2C2A26;
  --muted: #6F6A63;
  --line: #E3DED4;
  --sage: #3F5C57;
  --sage-soft: #E6EFEA;
  --alert: #D0232B;
  --alert-soft: #FBECEA;
  --sand: #EFE8DC;
  --mark: #A33B3F;
  --danger-bg: #F8EBE8;
  --danger: #8A3E36;
  --ok-bg: #E7F0E4;
  --ok: #3E6244;
  --shadow: 0 10px 30px rgba(44, 42, 38, 0.05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  font: 16px/1.5 Inter, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-variant-emoji: normal;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, .brand {
  font-family: Manrope, Inter, sans-serif;
  font-weight: 650;
  letter-spacing: -0.02em;
}
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.top {
  flex: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 20px;
  background: rgba(255, 253, 251, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand img { width: 128px; height: auto; display: block; }
.nav { display: flex; align-items: center; gap: 8px; color: var(--muted); flex-wrap: wrap; }
.nav-chat { display: inline-flex; align-items: center; gap: 6px; }
.nav-badge, .unread-n {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--alert); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1; font-style: normal;
}
.nav-badge[hidden] { display: none; }
.nav-chat.has-unread { border-color: var(--alert); background: var(--alert-soft); color: var(--alert); font-weight: 700; }
@keyframes unread-pulse { 50% { transform: scale(1.12); } }
.nav-badge.ping { animation: unread-pulse 0.9s ease 3; }
.nav a.on { background: var(--sage); color: #F7FBF8; border-color: var(--sage); }
.nav a, .text-btn {
  text-decoration: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink);
}
.account { position: relative; justify-self: end; }
button.account-open {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(320px, 70vw);
  margin: 0;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.account-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--sand);
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
  font-weight: 650;
  font-size: 18px;
}
.account-text { display: grid; min-width: 0; text-align: left; line-height: 1.2; }
.account-name, .account-job {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-name { font-family: Manrope, Inter, sans-serif; font-weight: 650; font-size: 14px; }
.account-job { color: var(--muted); font-size: 12px; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 260px;
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.account-facts {
  display: grid;
  gap: 8px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.account-facts p { display: grid; gap: 1px; margin: 0; }
.account-facts span { color: var(--muted); font-size: 12px; }
.account-facts b { font-weight: 650; font-size: 15px; }
.account-facts b.copy { font-variant-numeric: tabular-nums; user-select: all; }
.account-menu[hidden] { display: none !important; }
.account-menu a {
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
  color: var(--ink);
}
.account-menu a:hover, button.account-open[aria-expanded="true"] { background: var(--sage-soft); }
.facts { display: grid; gap: 12px; margin: 4px 0 0; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; }
.facts dd.copy { font-variant-numeric: tabular-nums; user-select: all; }
.portrait-view {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--sand);
  color: var(--ink);
  font-family: Manrope, Inter, sans-serif;
  font-weight: 650;
  font-size: 28px;
  flex: none;
}
.portrait-view img { width: 96px; height: 96px; object-fit: cover; display: block; }
@media (min-width: 720px) {
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand account"
      "nav nav";
    gap: 8px 10px;
    padding: 8px 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .brand { grid-area: brand; }
  .brand img { width: 112px; }
  .nav {
    grid-area: nav;
    gap: 6px;
    flex-wrap: wrap;
  }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .account { grid-area: account; max-width: 58vw; min-width: 0; }
  button.account-open {
    max-width: 100%;
    gap: 8px;
    padding: 2px 10px 2px 2px;
  }
  .account-photo { width: 44px; height: 44px; font-size: 15px; }
  .account-job { display: none; }
  .account-menu {
    z-index: 3;
    width: min(280px, calc(100vw - 24px));
    min-width: 0;
  }
}
@media (max-width: 420px) {
  .nav a { padding: 6px 8px; font-size: 13px; }
}
main {
  width: calc(100% - 16px);
  margin: 8px auto;
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
main.wide, main.desk { overflow: hidden; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
textarea { padding: 10px 12px; min-height: 96px; border-radius: 12px; }
input.main, textarea.main {
  padding: 10px 12px;
  font-family: Manrope, Inter, sans-serif;
  font-weight: 650;
  font-size: 1.15rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #D5DDD8;
  border-color: #B7C6C0;
}
input.js-phone {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: #A39E96;
  background: #F7F5F1;
}
input.js-phone::placeholder { color: #B5AFA6; font-weight: 400; }
input.js-phone.is-set {
  color: var(--ink);
  font-weight: 650;
  background: #fff;
  border-color: #C8C2B6;
}
.sheet .fields input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]),
.sheet .fields select,
.sheet > label:not(.check) textarea {
  background: #F7F5F1;
  color: #8E887F;
  font-weight: 400;
}
.sheet .fields input::placeholder,
.sheet > label:not(.check) textarea::placeholder { color: #B5AFA6; font-weight: 400; }
.sheet .fields input.is-set:not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="range"]),
.sheet .fields select.is-set,
.sheet > label:not(.check) textarea.is-set {
  color: var(--ink);
  font-weight: 650;
  background: #fff;
  border-color: #C8C2B6;
}
.sheet .field .picker-line {
  min-height: 36px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #F7F5F1;
}
.sheet .field.is-set .picker-line {
  background: #fff;
  border-color: #C8C2B6;
}
button, .btn, a.button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--sage);
  color: #F7FBF8;
  cursor: pointer;
}
button.quiet, .nav a { background: transparent; color: var(--ink); }
button.danger { background: transparent; color: var(--alert); border: 1px solid #E7C4BE; }
button.danger:hover { background: var(--alert-soft); }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-head h1 { margin: 0; }
.settings-head form { margin: 0; flex: none; }
.muted { color: var(--muted); font-size: 13px; }
.error, .ok { padding: 10px 12px; border-radius: 12px; }
.error { background: var(--danger-bg); color: var(--danger); }
.ok { background: var(--ok-bg); color: var(--ok); }
.row { display: flex; gap: 10px; align-items: center; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--ink); }
.check input { width: auto; }
.grid { display: grid; gap: 14px; }
.workspace { display: grid; gap: 14px; }
.room, .person {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.room:first-of-type, .person:first-of-type { border-top: 0; }
.person form, .person button { margin: 0; }
.talk {
  height: calc(100vh - 108px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.talk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--card);
}
.talk-head h1 { margin: 0; font-size: 1.15rem; }
.back { color: var(--muted); text-decoration: none; }
.thread { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: #F7F5F1; }
.bubble { max-width: min(78%, 460px); margin: 0 0 12px; }
.bubble p, .bubble .voice-script { -webkit-user-select: text; user-select: text; cursor: text; }
body.st-app .bubble { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.st-app .bubble p, body.st-app .bubble .voice-script { -webkit-user-select: none; user-select: none; cursor: auto; -webkit-touch-callout: none; }
.bubble.mine { margin-left: auto; }
.bubble p {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.bubble.mine p { background: var(--sage-soft); border-color: transparent; }
.ticks {
  display: inline-block; margin-left: 2px; font-style: normal; font-weight: 700;
  color: #8A847A;
}
.ticks[data-state="wait"] {
  width: 0.72em; height: 0.72em; border: 1.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; vertical-align: -0.08em;
}
.ticks[data-state="got"], .ticks[data-state="read"] { letter-spacing: -0.2em; }
.ticks[data-state="read"] { color: var(--sage); }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.composer textarea { min-height: 52px; resize: vertical; }
.login {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}
.login .card { width: min(420px, 100%); }
.login input { scroll-margin: 72px 0 28px; }
body.st-app:has(.login) {
  height: calc(100dvh - var(--kb, 0px));
  max-height: calc(100dvh - var(--kb, 0px));
}
html.kb-open body.st-app .login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}
html.kb-open body.st-app main:has(.login) { overflow: auto; }
.app-get {
  display: grid; gap: 12px; margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--sand);
}
.app-get.dual {
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.app-get.dual .app-col + .app-col {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  margin-left: 12px;
}
.app-col {
  display: grid;
  gap: 4px;
  justify-items: start;
  align-content: start;
}
.app-col .app-icon {
  color: var(--sage);
  display: inline-flex;
  line-height: 0;
}
.app-col strong { font-size: 14px; color: var(--ink); }
.app-get a { color: var(--sage); font-weight: 650; text-decoration: none; }
.app-get .app-ios {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sage);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
@media (max-width: 420px) {
  .app-get.dual { grid-template-columns: 1fr; }
  .app-get.dual .app-col + .app-col {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    margin-left: 0;
    padding-top: 12px;
    margin-top: 4px;
  }
}
.client-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.client-ico {
  display: inline-flex;
  color: var(--muted);
  line-height: 0;
  flex: none;
}
.client-ico svg { display: block; width: 16px; height: 16px; }
.client-ico.android { color: #3DDC84; }
.client-ico.ios { color: #555; }
.client-ico.browser { color: var(--sage); }
.ios-sheet {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(44, 42, 38, 0.45);
}
.ios-sheet[hidden] { display: none; }
.ios-card {
  width: min(420px, 100%);
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(44, 42, 38, 0.18);
}
.ios-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.ios-card ol { margin: 0 0 12px; padding-left: 1.2em; display: grid; gap: 6px; }
.ios-card .ios-close { width: 100%; }
@media (min-width: 860px) {
  .workspace { grid-template-columns: 320px 1fr; align-items: start; }
}
.split { display: grid; gap: 14px; }
@media (min-width: 860px) {
  .split { grid-template-columns: 280px 1fr; align-items: start; }
  .split.work { grid-template-columns: minmax(0, 1fr) 320px; }
}

a.button { display: inline-block; text-decoration: none; }
.back { margin: 0 0 8px; }
.back a { color: var(--sage); }
a.roster { justify-content: flex-start; gap: 12px; color: inherit; text-decoration: none; }
a.roster strong, a.roster .muted { display: block; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sand); color: var(--ink);
  font-family: Manrope, Inter, sans-serif; font-weight: 650;
  object-fit: cover;
}
.sheet { display: grid; gap: 10px; }
form.card:not(.filters) { display: grid; gap: 8px; }
form.card:not(.filters) > label,
.sheet > label,
.fields > label { margin: 0; }
.fields .field { display: grid; gap: 4px; align-content: start; }
.fields .field.wide { grid-column: 1 / -1; }
.fields .field > a, .fields label > a { justify-self: start; font-size: 13px; }
.sheet > .save-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  justify-content: flex-end;
  margin: -16px -16px 0;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.sheet > .save-bar button { margin: 0; }
@media (max-width: 760px) {
  .sheet > .save-bar button { width: 100%; }
}
.head { display: flex; gap: 16px; align-items: flex-start; }
.head > div:last-child { min-width: 0; padding-top: 8px; }
.head h1 { margin: 0 0 4px; }
button.portrait {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
}
.portrait span, .portrait img {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sand); color: var(--ink);
  font-family: Manrope, Inter, sans-serif; font-weight: 650;
  font-size: 28px;
  object-fit: cover;
}
.portrait img[hidden], .portrait span[hidden], .crop[hidden], #crop-again[hidden], #crop-error[hidden] {
  display: none !important;
}
.portrait-pick { flex: 0 0 96px; width: 96px; }
.portrait-hint { margin: 6px 0 0; text-align: center; }
.crop {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #F7F5F1;
}
.crop-stage {
  width: min(320px, 100%);
  margin: 0 auto;
  touch-action: none;
}
.crop-stage canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border-radius: 16px;
  cursor: grab;
  touch-action: none;
}
.crop-zoom { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crop-zoom input { flex: 1; width: auto; padding: 0; accent-color: var(--sage); }
.crop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fields { display: grid; gap: 8px 10px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.person-fields { grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) {
  .person-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .person-fields label.span2 { grid-column: span 2; }
}
.contact-block { display: grid; gap: 8px; align-content: start; min-width: 0; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: end; }
.contact-row label { margin: 0; min-width: 0; }
.contact-row .picker-add,
.contact-row .contact-drop {
  width: 32px; height: 32px; margin: 0; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff;
}
.contact-row .contact-drop { color: var(--muted); font-size: 18px; line-height: 1; }
.contact-row .contact-drop:hover { background: var(--sage-soft); color: var(--ink); }
.directory td.phone span, .directory td.mails span { display: block; }
.fields label:not(.check), .sheet > label:not(.check) { display: grid; gap: 4px; }
.fields label.wide, .sheet > label.main { grid-column: 1 / -1; }
.fields input, .fields select { padding: 6px 8px; }
label.slim, .sheet > label.slim {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  margin: 0;
}
label.slim input, label.slim select { width: auto; min-width: 160px; max-width: 280px; padding: 6px 8px; }
.people { display: grid; gap: 8px; }
.people-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.people-row > span { color: var(--muted); font-size: 13px; min-width: 7.5em; }
.people-row .picker { flex: 1 1 auto; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 8px; align-items: center; }
.pair select { padding: 6px 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.rights { border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px 4px; margin: 0; }
.rights legend { padding: 0 6px; font-family: Manrope, Inter, sans-serif; }
.plain { padding-left: 18px; }
.login-note { max-width: 460px; }

.talk { position: relative; }
.bubble.has-media { max-width: min(88%, 520px); }
.bubble p { font-variant-emoji: normal; }
.composer { position: relative; flex-direction: column; align-items: stretch; flex-shrink: 0; }
.composer-row { display: flex; gap: 6px; align-items: flex-end; }
.composer-row textarea {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 42px;
  max-height: 160px;
  resize: none;
  font-variant-emoji: normal;
}
.composer .icon-btn, .composer .send {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
}
.composer .icon-btn {
  background: transparent;
  color: var(--sage);
  border: 1px solid var(--line);
}
.composer .send { background: var(--sage); color: #F7FBF8; }
.composer .send:disabled { opacity: 0.55; }
.composer-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.composer-field textarea { order: 1; }
.attach-wrap { position: relative; flex: none; }
.voice-field { display: contents; }
html.tg-chat .talk { background: #F7F5F1; }
html.tg-chat .composer {
  background: #F7F5F1;
  border-top: 0;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
html.tg-chat .composer-row { gap: 8px; }
html.tg-chat .composer-field {
  gap: 0;
  align-items: flex-end;
  min-height: 48px;
  padding: 4px 2px 4px 0;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 1px 1px rgba(44, 42, 38, 0.06);
}
html.tg-chat .composer-field textarea { order: 0; }
html.tg-chat .composer-field > .icon-btn,
html.tg-chat .composer-field .attach-wrap { flex: none; }
html.tg-chat .composer-field .icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #8A847A;
}
html.tg-chat .composer-field textarea {
  border: 0;
  background: transparent;
  border-radius: 0;
  min-height: 40px;
  padding: 8px 4px;
  line-height: 22px;
}
html.tg-chat .composer-field textarea:focus {
  outline: none;
  border-color: transparent;
}
html.tg-chat .composer-field textarea::placeholder { color: #A39E96; }
html.tg-chat .composer .send {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
html.tg-chat .composer-field .pop { left: auto; right: 0; }
html.tg-chat .voice-bar {
  gap: 8px;
  align-items: flex-end;
  min-height: 0;
  background: transparent;
}
html.tg-chat .voice-field {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 48px;
  padding: 0 8px 0 2px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 1px 1px rgba(44, 42, 38, 0.06);
}
html.tg-chat .voice-field .icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #8A847A;
}
.file-pick {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0.02;
  overflow: hidden;
}
.pop {
  position: absolute;
  left: 0;
  bottom: 48px;
  z-index: 9;
  min-width: 220px;
  display: grid;
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.pop button, .emoji-panel button, .lightbox button, .chip button {
  background: transparent;
  color: var(--ink);
}
.pop button {
  width: 100%;
  text-align: left;
  border-radius: 10px;
}
.pop button:hover, .emoji-cats button.on, .emo:hover { background: var(--sage-soft); }
.pop .muted { margin: 4px 8px 6px; }
.only-touch { display: none; }
@media (pointer: coarse) { .only-touch { display: block; } }
.emoji-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(320px, 46vh);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.emoji-cats { display: flex; gap: 4px; overflow: auto; }
.emoji-cats button { width: auto; border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 2px;
  overflow: auto;
  max-height: 200px;
}
.emo {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 24px;
  line-height: 1.2;
  padding: 4px 0;
  border-radius: 8px;
  width: auto;
}
.pending { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.chip img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; }
.chip span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.chip button { width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 18px; }
.album { display: grid; gap: 3px; margin-top: 6px; border-radius: 16px; overflow: hidden; }
.album-2, .album-3, .album-4 { grid-template-columns: 1fr 1fr; }
.album-3 .shot:first-child { grid-column: 1 / -1; }
.shot { padding: 0; border: 0; background: #ece8e1; cursor: zoom-in; border-radius: 0; display: block; }
.shot img { width: 100%; height: 150px; object-fit: cover; display: block; }
.album-1 .shot img { height: auto; max-height: 420px; object-fit: contain; }
.album-3 .shot:first-child img { height: 190px; }
.clip { width: 100%; margin-top: 6px; border-radius: 14px; background: #1c1a17; }
.voice { display: grid; gap: 6px; margin-top: 6px; min-width: min(100%, 240px); }
.voice-msg { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.voice-play {
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; flex: none; background: var(--sage); color: #F7FBF8;
}
.voice-bars {
  flex: 1; display: flex; align-items: center; gap: 2px; height: 32px; min-width: 0;
  cursor: pointer; touch-action: pan-y; user-select: none;
  padding: 8px 0; margin: -8px 0; box-sizing: content-box;
}
.voice-bars:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 6px; }
.voice-bars i, .voice-wave i {
  flex: 1 1 0; min-width: 2px; max-width: 4px; border-radius: 2px;
  background: var(--sage); opacity: 0.35; height: 4px;
}
.voice-bars i.on { opacity: 1; }
.voice-len, .voice-rate {
  flex: none; background: transparent; color: var(--sage);
  padding: 0; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.voice-rate { min-width: 34px; }
.voice audio { display: none; }
.voice-script { margin: 0; white-space: pre-wrap; }
.voice-bar { display: flex; gap: 8px; align-items: center; min-height: 42px; }
.voice-bar .icon-btn { background: transparent; color: var(--sage); border: 1px solid var(--line); }
.voice-wave { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 2px; height: 32px; min-width: 0; overflow: hidden; }
.voice-wave i { flex: none; width: 3px; max-width: 3px; opacity: 1; }
#voice-time { min-width: 38px; font-variant-numeric: tabular-nums; font-size: 14px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; animation: rec-blink 1.1s steps(2) infinite; }
@keyframes rec-blink { 50% { opacity: 0.2; } }
.file-link { display: inline-block; margin-top: 4px; color: var(--sage); font-size: 13px; }
.bubble a.msg-link { color: #2456a6; text-decoration: underline; word-break: break-word; cursor: pointer; }
.bubble.mine a.msg-link { color: #1d4e46; }
.seen { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; line-height: 1.25; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .meta .seen { display: block; }
.seen.on, .talk-title p.peer-seen.on { color: #3E6244; font-weight: 650; }
.talk-title p.peer-seen { margin: 0; line-height: 1.2; }
.doc {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}
.doc-ico {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sage);
  color: #F7FBF8;
  font-family: Manrope, Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
}
.doc-meta { display: grid; min-width: 0; }
.doc-meta strong, .doc-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta span { color: var(--muted); font-size: 12px; }
.drop-hint {
  position: absolute;
  inset: 64px 12px 86px;
  z-index: 4;
  display: grid;
  place-items: center;
  margin: 0;
  border: 2px dashed var(--sage);
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.94);
  color: var(--sage);
  font-family: Manrope, Inter, sans-serif;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  background: rgba(28, 26, 23, 0.9);
}
.lightbox img {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  max-width: min(92vw, 1100px);
  max-height: 84vh;
}
.lb-bar { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding: 12px; }
.lb-bar a, .lb-bar button {
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 12px;
}
#lb-prev, #lb-next {
  width: 44px;
  height: 44px;
  margin: 0 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 32px;
  line-height: 1;
}
#lb-prev { grid-column: 1; grid-row: 2; }
#lb-next { grid-column: 3; grid-row: 2; }
#compose-error { margin: 0; }
@media (max-width: 640px) {
  .emoji-cats button { padding: 6px 8px; }
  .shot img, .album-3 .shot:first-child img { height: 120px; }
  .album-1 .shot img { height: auto; max-height: 320px; }
}
.views, .pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.views a, .pills a {
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.views a.on, .pills a.on { background: var(--sage); color: #F7FBF8; border-color: var(--sage); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; align-items: center; }
.filters input, .filters select, .pills select { width: auto; min-width: 140px; flex: 1 1 160px; max-width: 240px; padding: 6px 8px; }
.ticket {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 8px;
  text-decoration: none;
  color: inherit;
}
.ticket[data-status="draft"] { background: #F6F1E8; border-color: #E4D8C4; }
.ticket[data-status="open"] { background: #EAF1F4; border-color: #C9D8E0; }
.ticket[data-status="in_progress"] { background: #E7F0EC; border-color: #C5D9D2; }
.ticket[data-status="review"] { background: #F8F0E4; border-color: #E6D3B4; }
.ticket[data-status="done"] { background: #E8F2E6; border-color: #C9DFC6; }
.ticket[data-status="blocked"] { background: #FBECEA; border-color: #E7C4BE; }
.ticket[data-status="on_hold"] { background: #F3EEE8; border-color: #DDD4C8; }
.ticket[data-status="cancelled"] { background: #F6F4F1; border-color: #E3DED4; color: var(--muted); }
.ticket select { background: #fff; color: var(--ink); }
.ticket.late { border-color: #E7C4BE; box-shadow: inset 3px 0 0 var(--alert); }
.late-tag { color: var(--danger); font-size: 12px; }
.board { display: flex; gap: 10px; overflow-x: auto; align-items: stretch; flex: 1; min-height: 0; padding-bottom: 8px; }
.column { position: relative; flex: 0 0 270px; min-width: 0; background: #EFEBE4; border-radius: 16px; padding: 10px; min-height: 120px; overflow: auto; }
.column.has-color { box-shadow: inset 0 4px 0 var(--lane, var(--sage)); }
.column .drop-line, .cal .drop-line { position: absolute; left: 8px; right: 8px; height: 0; min-height: 0; padding: 0; margin: 0; background: transparent; display: block; overflow: visible; flex: none; border: 0; border-top: 3px solid var(--sage); border-radius: 2px; pointer-events: none; z-index: 3; box-shadow: 0 0 0 4px rgba(63, 92, 87, .18); }
.column[data-status="draft"] { box-shadow: inset 0 3px 0 #C4B39A; }
.column[data-status="open"] { box-shadow: inset 0 3px 0 #6E97AB; }
.column[data-status="in_progress"] { box-shadow: inset 0 3px 0 var(--sage); }
.column[data-status="review"] { box-shadow: inset 0 3px 0 #C4A36A; }
.column[data-status="done"] { box-shadow: inset 0 3px 0 #6E9474; }
.column[data-status="blocked"] { box-shadow: inset 0 3px 0 #C46A62; }
.column[data-status="on_hold"] { box-shadow: inset 0 3px 0 #A39890; }
.column[data-status="cancelled"] { box-shadow: inset 0 3px 0 #D5D0C8; }
.column .ticket, .column .ticket a, .column .ticket .muted { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.column h2 { font-size: 1rem; margin: 0 0 8px; }
.column .ticket { cursor: grab; }
.column .ticket.is-drag { opacity: .45; }
.column .ticket a { -webkit-user-drag: none; }
.board.is-sorting .column:not(.can-drop) { opacity: .55; }
.column.is-over { outline: 2px solid var(--sage); outline-offset: -2px; }
.column form { display: grid; gap: 6px; margin-top: 6px; }
.gantt-row { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.bar-track { position: relative; height: 18px; background: var(--sand); border-radius: 8px; }
.bar { position: absolute; top: 2px; height: 14px; background: var(--sage); border-radius: 7px; }
.gantt-note { margin: 0 0 8px; }
.gantt-range { margin: 0 0 8px; }
.gantt-sheet {
  --side: 280px;
  overflow: auto;
  max-height: min(70vh, 760px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.gantt-line {
  display: grid;
  grid-template-columns: var(--side) calc(var(--day) * var(--span));
  min-width: calc(var(--side) + var(--day) * var(--span));
}
.gantt-side {
  position: sticky;
  left: 0;
  z-index: 6;
  background: var(--card);
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 8px 12px;
  min-width: 0;
}
.gantt-scale-row { position: sticky; top: 0; z-index: 4; background: var(--card); }
.gantt-scale-row .gantt-side { z-index: 5; border-top: 0; }
.gantt-side a { color: inherit; font-weight: 650; text-decoration: none; }
.gantt-side a:hover { color: var(--sage); }
.gantt-meta, .gantt-when { display: block; font-size: 12.5px; line-height: 1.35; }
.gantt-meta { color: var(--muted); }
.gantt-when { margin-top: 2px; }
.gantt-when.late { color: var(--alert); }
.gantt-lane { position: relative; z-index: 1; min-height: 58px; border-top: 1px solid var(--line); }
.gantt-scale-row .gantt-lane { min-height: 44px; border-top: 0; }
.gantt-months, .gantt-ticks { position: relative; height: 18px; }
.gantt-months span, .gantt-ticks span {
  position: absolute; top: 0; overflow: hidden; white-space: nowrap;
  color: var(--muted); font-size: 11px;
}
.gantt-months span { color: var(--ink); font-weight: 650; }
.gantt-plot { position: relative; }
.gantt-weekend {
  position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none;
  background: rgba(44, 42, 38, 0.045);
}
.gantt-today, .gantt-today-mark {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--alert); pointer-events: none;
}
.gantt-today { z-index: 1; }
.gantt-today-mark { z-index: 2; }
.gantt-today-mark::after {
  content: "сегодня"; position: absolute; top: 0; right: 6px; left: auto;
  color: var(--alert); background: var(--card); padding: 0 4px; border-radius: 4px;
  font-size: 11px; font-weight: 650; white-space: nowrap;
}
.gantt-line { position: relative; z-index: 2; }
.gantt-scale-row { z-index: 4; }
.gantt-bar {
  position: absolute; top: 16px; height: 22px; z-index: 2;
  border-radius: 7px; color: #fff; font-size: 12px; font-weight: 650;
  line-height: 22px; padding: 0 8px; overflow: hidden; white-space: nowrap; text-decoration: none;
}
.gantt-bar.s-draft { background: #C4B39A; color: var(--ink); }
.gantt-bar.s-open { background: #6E97AB; }
.gantt-bar.s-in_progress { background: var(--sage); }
.gantt-bar.s-review { background: #C4A36A; }
.gantt-bar.s-done { background: #6E9474; }
.gantt-bar.s-blocked { background: #C46A62; }
.gantt-bar.s-on_hold { background: #A39890; }
.gantt-bar.s-cancelled { background: #D5D0C8; color: var(--muted); }
.gantt-bar.late { box-shadow: inset 0 0 0 2px var(--alert); }
.gantt-out {
  position: absolute; top: 18px; z-index: 2;
  color: var(--muted); font-size: 12px; white-space: nowrap;
}
.gantt-mile {
  position: absolute; top: 18px; z-index: 3; width: 12px; height: 12px;
  background: var(--ink); transform: rotate(45deg);
}
.cal, .cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { color: var(--muted); font-size: 12px; text-align: center; }
.cal div { background: var(--card); min-height: 78px; border-radius: 10px; padding: 4px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal a { color: var(--sage); text-decoration: none; }
.cal .today { outline: 2px solid var(--sage); }
.task-shot { display: block; max-width: min(100%, 420px); border-radius: 12px; margin: 8px 0; }
h1 input { font: inherit; font-family: Manrope, Inter, sans-serif; font-weight: 650; padding: 6px 10px; }
.task-page, .task-notes, .stack { display: grid; gap: 14px; align-items: start; }
.task-page > *, .task-notes > *, .stack > *, .fields > * { min-width: 0; }
.stack form { display: grid; gap: 8px; }
.stack form .check { margin: 0; }
.sheet input, .sheet select, .sheet textarea, .stack input, .stack select, .stack textarea { min-width: 0; max-width: 100%; }
@media (min-width: 960px) {
  .task-page { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .task-notes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
main.desk { width: calc(100% - 16px); margin: 8px auto; display: flex; flex-direction: column; }
.messenger {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.messenger .talk { height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.rail { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.rail-tools { display: flex; gap: 8px; align-items: center; padding: 10px 10px 0; }
.rail-tools input { margin: 0; }
.plus-wrap { position: relative; flex: none; }
button.plus { width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 26px; line-height: 1; }
.plus-wrap .pop { left: auto; right: 0; bottom: auto; top: 46px; }
.tabs { display: flex; gap: 4px; padding: 8px 10px; }
.tabs button { background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 8px; font-size: 13px; }
.tabs button.on { background: var(--sage-soft); color: var(--sage); }
.rail-list { overflow: auto; flex: 1; }
.rail-empty { margin: 0; padding: 16px; }
.chat-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; text-decoration: none; color: inherit; }
a.chat-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: center;
}
a.chat-row > .face { grid-column: 1; }
a.chat-row > .meta { grid-column: 2; overflow: hidden; }
a.chat-row > .when { grid-column: 3; position: relative; z-index: 1; }
.chat-row:hover { background: #F6F3EE; }
.chat-row.on { background: var(--sage-soft); }
.chat-row .meta { flex: 1; min-width: 0; }
.chat-row .meta strong, .chat-row .meta .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .name-line { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.chat-row .name-line strong { min-width: 0; }
.chat-row .meta strong { font-weight: 550; }
.kind-tag { display: none; flex: none; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 999px; font-weight: 650; }
.rail.show-kinds .kind-tag { display: inline-block; }
.kind-tag.channel { background: #E4EEF2; color: #3A5662; }
.kind-tag.group { background: var(--sage-soft); color: var(--sage); }
.kind-tag.direct { background: var(--sand); color: #6A5344; }
.rail.show-kinds .chat-row[data-kind="channel"] .face { border-radius: 12px; }
.rail.show-kinds .chat-row[data-kind="group"] .face { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--sage); }
.rail.show-kinds .chat-row[data-kind="direct"] .face { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #C4B6A4; }
form.chat-row { width: 100%; margin: 0; padding: 0; background: transparent; }
form.chat-row .person-open {
  display: flex; gap: 10px; align-items: center; width: 100%;
  margin: 0; padding: 8px 12px; border: 0; border-radius: 0;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
form.chat-row:hover .person-open { background: #F6F3EE; }
.chat-row.fresh { box-shadow: inset 3px 0 0 var(--alert); background: var(--alert-soft); }
.chat-row.fresh .meta strong { font-weight: 700; }
.when { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; min-width: 28px; color: var(--muted); font-size: 12px; text-align: right; }
.chat-row.fresh .when-time { color: var(--alert); font-weight: 650; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: var(--sage); }
.chat-toasts {
  position: fixed; z-index: 40; right: 16px; bottom: 16px;
  display: grid; gap: 8px; width: min(380px, calc(100vw - 24px));
}
body.st-app .push-connect,
body.st-app .chat-toasts { display: none !important; }
.chat-toast {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  padding: 12px 12px 10px; background: #FFFDFB; color: var(--ink);
  border: 1px solid var(--alert); border-radius: 16px; box-shadow: var(--shadow);
}
.chat-toast strong { font-family: Manrope, Inter, sans-serif; }
.chat-toast p { margin: 0; grid-column: 1; color: var(--ink); }
.chat-toast .toast-open { grid-column: 1; justify-self: start; margin-top: 6px; padding: 6px 12px; }
.chat-toast .toast-x {
  grid-row: 1; grid-column: 2; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
}
.face, button.face {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none;
  display: grid; place-items: center; padding: 0; border: 0;
  background: var(--sage-soft); color: var(--sage);
  font-family: Manrope, Inter, sans-serif; font-weight: 650; font-size: 16px; line-height: 1;
}
button.face { cursor: pointer; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.sm { width: 32px; height: 32px; font-size: 12px; }
.stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.stage > .card { border: 0; box-shadow: none; border-radius: 0; flex: 1; overflow: auto; }
.stage.quiet { display: grid; place-items: center; text-align: center; padding: 24px; }
.stage.quiet p { margin: 0 0 6px; }
a.only-narrow { display: none; width: 32px; height: 32px; place-items: center; font-size: 22px; line-height: 1; text-decoration: none; color: var(--sage); }
.icon-row { display: flex; gap: 12px; align-items: center; margin: 4px 0 8px; }
.icon-row .muted { margin: 0; }
dialog.sheet-dialog, dialog#icon-crop {
  width: min(440px, calc(100% - 24px));
  max-height: min(86vh, 720px);
  border: 0; border-radius: 18px; padding: 16px;
  background: var(--card); color: var(--ink);
}
dialog.sheet-dialog::backdrop, dialog#icon-crop::backdrop { background: rgba(44, 42, 38, 0.35); }
.person-hit { border-top: 1px solid var(--line); }
.person-hit button {
  width: 100%; display: flex; gap: 10px; align-items: center; text-align: left;
  background: transparent; color: var(--ink); padding: 7px 2px; border-radius: 0;
}
.person-hit button:hover { background: var(--sand); }
.people-scroll .check { align-items: center; margin: 0; padding: 6px 0; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  body:has(main.desk) {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body:has(main.desk) header.top { flex: none; }
  main.desk {
    width: calc(100% - 12px);
    flex: 1;
    min-height: 0;
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
  }
  .messenger { grid-template-columns: 1fr; height: auto; flex: 1; min-height: 0; }
  .messenger:not(.open) .stage { display: none; }
  .messenger.open .rail { display: none; }
  a.only-narrow { display: grid; }
  body.st-app:has(main.desk) {
    height: 100%;
    max-height: 100%;
  }
  body.st-app:has(.messenger.open) header.top { display: none; }
  body.st-app:has(.messenger.open) main.desk {
    width: 100%;
    margin: 0;
  }
  .talk, .messenger .talk { min-height: 0; height: 100%; }
  body.st-app .messenger.open {
    min-height: 0;
    max-height: calc(100% - var(--kb, 0px));
  }
  a.back.only-narrow { width: auto; min-width: 32px; grid-auto-flow: column; padding: 0 6px; gap: 4px; }
}
.icon-link {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--sage); text-decoration: none; background: #fff;
}
.icon-link:hover { background: var(--sage-soft); }
.talk-head .back { margin: 0; flex: none; }
.talk-title { flex: 1; min-width: 0; }
.talk-title .muted { margin: 0; line-height: 1.2; }
.talk-title h1 { margin: 0; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.talk-head .talk-tools .icon-link { margin-left: 0; }
button.icon-link { padding: 0; cursor: pointer; font: inherit; }
.typing-line { margin: 2px 0 0; color: var(--sage); font-size: 0.86rem; min-height: 0; }
.typing-line[hidden] { display: none; }
.pin-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-bottom: 1px solid var(--line); background: #fff; flex: none;
}
.pin-bar[hidden] { display: none; }
.pin-bar #pin-jump {
  flex: 1; min-width: 0; display: grid; text-align: left;
  background: transparent; color: inherit; border: 0; border-left: 3px solid var(--sage);
  border-radius: 0; padding: 2px 0 2px 10px; cursor: pointer;
}
.pin-bar strong { color: var(--sage); font-size: 0.86rem; }
.pin-bar span { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find-box { padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; flex: none; }
.find-box[hidden] { display: none; }
.find-box input { width: 100%; }
.find-hit {
  display: grid; width: 100%; text-align: left; background: transparent; color: inherit;
  border: 0; border-radius: 10px; padding: 6px 8px; cursor: pointer;
}
.find-hit:hover { background: var(--sage-soft); }
.find-hit strong { color: var(--sage); font-size: 0.86rem; }
.find-hit span { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.react, .react-pick button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 2px 8px; cursor: pointer; font: inherit; line-height: 1.4;
}
.react.mine { background: var(--sage-soft); border-color: var(--sage); }
.react-pick { display: flex; gap: 4px; padding: 4px 4px 8px; }
.msg-menu button.danger, #del-sheet button.danger { color: var(--alert); }
.quote.gone { cursor: default; color: var(--muted); font-size: 0.86rem; }
.composer-lock { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.fold { margin-top: 10px; }
.fold summary { cursor: pointer; color: var(--sage); font-size: 14px; }
.fold summary:hover { text-decoration: underline; }
.people-scroll { max-height: 280px; overflow: auto; margin-top: 8px; }
.member-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.member-line .check { margin: 0; min-width: 0; }
.member-line select { width: auto; min-width: 128px; padding: 6px 8px; }
.member-line .check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.ghost, a.ghost {
  background: transparent;
  color: var(--sage);
  border: 1px solid var(--line);
  padding: 6px 12px;
  text-decoration: none;
}
.hint { margin: 0 0 8px; }
body:has(main.wide) {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body:has(main.wide) header.top { flex: none; }
main.wide {
  width: calc(100% - 12px);
  margin: 6px auto;
  flex: 1;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}
main.wide > .error, main.wide > .ok { flex: none; margin: 0 0 6px; }
.directory {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 8px 8px 0;
  overflow: hidden;
}
.dir-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: nowrap; }
.dir-bar h1 { margin: 0; font-size: 1.05rem; white-space: nowrap; }
.dir-bar input[type="search"] { width: auto; flex: 1 1 140px; min-width: 120px; max-width: 240px; padding: 6px 10px; }
.dir-bar select { width: auto; max-width: 160px; padding: 6px 8px; }
.dir-bar .button, .dir-bar button { padding: 6px 10px; white-space: nowrap; }
.dir-count { margin: 0; white-space: nowrap; margin-left: auto; }
.dir-scroll { flex: 1; min-height: 0; overflow: auto; margin: 0 -8px; }
.directory table { width: 100%; min-width: 1280px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.directory th, .directory td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.directory th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #FFFDFB;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}
.directory th[aria-sort="ascending"]::after { content: " ↑"; }
.directory th[aria-sort="descending"]::after { content: " ↓"; }
.directory td.dir-clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.directory tr.hit { cursor: pointer; }
.directory tr.hit:hover td { background: #F6F3EE; }
.directory td.who, .directory th.who { position: sticky; left: 0; background: #FFFDFB; z-index: 1; max-width: 280px; }
.directory th.who { z-index: 2; }
.directory tr.hit:hover td.who { background: #F6F3EE; }
.who-line { display: flex; gap: 8px; align-items: center; min-width: 140px; }
.who-line span { min-width: 0; }
.who-line strong, .who-line .muted { display: block; overflow: hidden; text-overflow: ellipsis; }
.avatar.tiny { width: 26px; height: 26px; font-size: 11px; flex: none; }
.live {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #C4BEB4;
  vertical-align: 1px;
}
.live.on { background: var(--ok); }
.live.stop { background: var(--danger); }
.directory button.access {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.45;
  background: var(--ok-bg);
  color: var(--ok);
}
.directory button.access.off { background: var(--danger-bg); color: var(--danger); }
.directory button.access:disabled { opacity: 0.72; cursor: default; }
.dir-note { margin: 0; padding: 8px 12px; }
.directory td.phone { font-variant-numeric: tabular-nums; user-select: text; }
.directory .stack { display: block; overflow: hidden; text-overflow: ellipsis; }
.dir-empty { margin: 0; padding: 18px; }
dialog.productions { width: min(420px, calc(100% - 24px)); }
dialog.catalog { width: min(960px, calc(100% - 24px)); }
.catalog-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.catalog-cols h3 { margin: 0 0 8px; font-size: 1rem; }
.catalog-cols li form { display: flex; gap: 8px; align-items: center; }
.catalog-cols li input { flex: 1; }
.catalog-cols li button.quiet { width: auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 700px) { .catalog-cols { grid-template-columns: 1fr; } }
dialog.productions .dir-bar form { margin-left: auto; }
dialog.productions h2 { margin: 0; font-size: 1.05rem; }
.productions { margin: 0; }
.productions summary { cursor: pointer; font-family: Manrope, Inter, sans-serif; font-weight: 650; }
.productions[open] summary { margin-bottom: 8px; }
.productions .row { align-items: stretch; }
.productions input { flex: 1; }
.productions ul { margin: 8px 0 0; padding: 0; list-style: none; }
.productions li { padding: 6px 0; border-top: 1px solid var(--line); }
a.who-line { text-decoration: none; color: inherit; }
@media (max-width: 900px) {
  .dir-bar { flex-wrap: wrap; }
  .dir-count { margin-left: 0; }
}
@media (max-width: 860px) {
  main.wide { width: calc(100% - 8px); }
}
.group-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 16px 0 8px; font-size: 1.05rem; }
.group-title a { text-decoration: none; }
.project-grid { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 800px) { .project-grid { grid-template-columns: 1fr 1fr; } }
.project-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; text-decoration: none; color: inherit;
}
.project-card:hover { border-color: #B7C6C0; }
.person-banner { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; font-size: 12px; line-height: 1.4;
  padding: 1px 8px; border-radius: 999px;
  background: var(--sage-soft); color: var(--sage);
}
.picker { position: relative; min-width: 0; }
.filters .picker { flex: 0 0 auto; min-width: 0; max-width: none; }
.picker-fallback { margin: 0 0 6px; }
.picker-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.picker-chips:empty { display: none; }
.picker-add-wrap { position: relative; flex: none; }
.picker-add {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #fff; color: var(--sage); border: 1px solid var(--line);
}
.picker-add:hover, .picker-add[aria-expanded="true"] { background: var(--sage-soft); }
.picker-pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  width: min(420px, calc(100vw - 24px));
  display: grid; gap: 6px; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
}
.picker-pop[hidden] { display: none !important; }
.picker-pop input {
  width: 100%; max-width: none; min-width: 0; flex: none; box-sizing: border-box;
  margin: 0; padding: 8px 12px; font-size: 15px;
}
.picker-pop .picker-me { width: auto; justify-self: start; padding: 4px 10px; margin: 0; }
.pick-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 3px 6px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.pick-chip.on { border-color: var(--sage); background: var(--sage-soft); }
.pick-chip a, .pick-chip > span { font-size: 14px; text-decoration: none; color: inherit; }
.pick-chip select { width: auto; padding: 4px 8px; border-radius: 999px; }
.pick-chip button {
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 16px; line-height: 1;
}
.picker-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.picker-row input { margin: 0; }
.picker-me { flex: none; padding: 8px 12px; }
.picker-menu {
  position: static; z-index: 30; left: auto; right: auto; top: auto;
  max-height: min(320px, 46vh); overflow: auto;
  background: transparent; border: 0; border-radius: 0;
  box-shadow: none; padding: 0;
}
input[data-filter] { max-width: 280px; padding: 6px 10px; }
.picker-menu button {
  width: 100%; display: flex; gap: 8px; align-items: center; text-align: left;
  background: transparent; color: var(--ink); border-radius: 10px; padding: 6px 8px;
}
.picker-menu button strong, .picker-menu button .muted { display: block; }
.picker-menu button.on, .picker-menu button:hover { background: var(--sand); }
.picker-hint { margin: 0; padding: 8px; color: var(--muted); font-size: 13px; }
details.card > summary { cursor: pointer; font-family: Manrope, Inter, sans-serif; font-weight: 650; }
details.card[open] > summary { margin-bottom: 8px; }

.project-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-head h1 { margin: 0; flex: 1; min-width: 0; }
.project-head h1 input { width: 100%; }
.group-title .name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.back a { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }

.push-connect {
  position: sticky; top: 0; z-index: 40;
  margin: 12px; padding: 16px 18px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.push-connect h2 { margin: 0 0 6px; font-size: 18px; }
.push-connect p { margin: 0 0 12px; color: var(--muted); }
.push-steps { display: flex; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.push-steps li {
  padding: 4px 10px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 13px;
}
.push-steps li.is-active { color: var(--ink); font-weight: 700; }
.push-steps li.is-done { background: var(--sage-soft); color: var(--sage); }
.push-steps li.is-error { background: var(--danger-bg); color: var(--danger); }
.push-actions { display: flex; gap: 8px; }
.push-go {
  background: var(--sage); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 650;
}
.push-later {
  background: transparent; color: var(--muted); border: 0; border-radius: 999px; padding: 8px 12px;
}
main.wide > .views { flex: none; margin-bottom: 8px; }
.directory.tasks { padding: 12px 14px 0; }
.directory.tasks .dir-bar { gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.directory.tasks .pills { margin: 0; gap: 4px; }
.directory.tasks .pills button {
  font: inherit; color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px;
}
.directory.tasks .pills button.on { background: var(--sage); color: #F7FBF8; border-color: var(--sage); }
.directory.tasks table { min-width: 0; table-layout: fixed; font-size: 14px; }
.directory.tasks col.c-status { width: 168px; }
.directory.tasks col.c-who { width: 180px; }
.directory.tasks col.c-due { width: 112px; }
.directory.tasks th, .directory.tasks td {
  white-space: normal; padding: 11px 10px; vertical-align: middle; line-height: 1.35;
}
.directory.tasks th { background: #F7F4EF; font-size: 12px; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.directory.tasks th[aria-sort="ascending"],
.directory.tasks th[aria-sort="descending"] { color: var(--sage); }
.directory.tasks td.who, .directory.tasks th.who { position: static; max-width: none; background: transparent; }
.directory.tasks th.who { background: #F7F4EF; }
.directory.tasks tr.hit:nth-child(even) td { background: #FBF9F6; }
.directory.tasks tr.hit:hover td, .directory.tasks tr.hit:hover td.who { background: #F3F0EA; }
.directory.tasks .who-line { display: block; min-width: 0; }
.directory.tasks .who-line strong,
.directory.tasks .who-line .muted {
  overflow: visible; text-overflow: unset; white-space: normal;
}
.directory.tasks .who-line strong {
  display: block; font-weight: 650; font-size: 15px; line-height: 1.3;
}
.directory.tasks .who-line .muted { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; }
.directory col.c-drop { width: 44px; }
.directory th.c-drop, .directory td.c-drop { width: 44px; padding: 4px; text-align: center; }
.directory form.drop-form { display: inline; margin: 0; }
.directory button.drop {
  width: 32px; height: 32px; padding: 0; display: inline-flex;
  align-items: center; justify-content: center;
  background: transparent; color: #8A847C; border: 0; border-radius: 8px;
}
.directory button.drop:hover { background: #F8E8E6; color: var(--alert); }
.directory.tasks td.num, .directory.tasks th.num { text-align: center; font-variant-numeric: tabular-nums; }
.directory.tasks tr.late td.who { box-shadow: inset 3px 0 0 var(--alert); }
.directory.tasks tr.late td.who strong,
.directory.project-work tr.late td.who strong { color: var(--alert); }
.directory.tasks tr.late,
.directory.project-work tr.late { background: var(--alert-soft); }
.ticket.late strong { color: var(--alert); }
.gantt-line.late .gantt-side a { color: var(--alert); }
.gantt-line.late .gantt-side a:hover { color: #A81C22; }
.gantt-bar.late { background: var(--alert) !important; color: #fff; box-shadow: none; }

.directory.tasks tr.done td { color: var(--muted); }
.directory.tasks tr.done .alert-n { color: var(--alert); }
.directory.tasks #task-empty td { color: var(--muted); }
.directory.projects { padding: 12px 14px 0; }
.directory.projects .dir-bar { gap: 10px; margin-bottom: 10px; }
.directory.projects .dir-bar input[type="search"] { max-width: 280px; border-radius: 999px; }
.directory.projects .pills { margin: 0; flex: none; gap: 4px; }
.directory.projects .pills a { padding: 5px 12px; font-size: 13px; }
.directory.projects table { min-width: 0; table-layout: fixed; font-size: 14px; }
.directory.projects col.c-late { width: 96px; }
.directory.projects col.c-open { width: 76px; }
.directory.projects col.c-prog { width: 128px; }
.directory.projects col.c-due { width: 112px; }
.directory.projects col.c-owner { width: 132px; }
.directory.projects col.c-client { width: 148px; }
.directory.projects col.c-team { width: 84px; }
.directory.projects th, .directory.projects td {
  white-space: normal; padding: 11px 10px; vertical-align: middle; line-height: 1.35;
}
.directory.projects th {
  background: #F7F4EF; font-size: 12px; line-height: 1.25; padding-top: 8px; padding-bottom: 8px;
}
.directory.projects th[aria-sort="ascending"],
.directory.projects th[aria-sort="descending"] { color: var(--sage); }
.directory.projects td.who, .directory.projects th.who {
  position: static; max-width: none; background: transparent;
}
.directory.projects th.who { background: #F7F4EF; }
.directory.projects tr.hit:nth-child(even) td { background: #FBF9F6; }
.directory.projects tr.hit:hover td,
.directory.projects tr.hit:hover td.who { background: #F3F0EA; }
.directory.projects .face.sm { width: 36px; height: 36px; font-size: 14px; }
.directory.projects .who-line { align-items: flex-start; gap: 10px; }
.directory.projects .who-line .face { margin-top: 1px; }
.directory.projects .who-line strong {
  display: block; overflow: visible; text-overflow: unset; white-space: normal;
  font-family: Manrope, Inter, sans-serif; font-weight: 650; letter-spacing: -0.02em;
  font-size: 15px; line-height: 1.3;
}
.directory.projects .who-line .muted {
  display: block; margin-top: 2px; overflow: visible; text-overflow: unset; white-space: normal;
  font-size: 12.5px; line-height: 1.35;
}
.directory.projects .place-client,
.directory.projects .place-owner,
.directory.projects .who-line .muted.owner-only { display: none; }
.directory.projects td.num, .directory.projects th.num { text-align: center; font-variant-numeric: tabular-nums; }
.directory.projects .late-pill {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: var(--alert-soft); color: var(--alert);
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.directory.projects .due-late { color: var(--alert); font-weight: 650; }
.directory.projects .alert-n, .dir-count .alert-n { color: var(--alert); font-weight: 650; }
.directory.projects tr.late td.who { box-shadow: inset 3px 0 0 var(--alert); }
.directory.projects td.prog .prog-line { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.directory.projects td.prog span { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.directory.projects td.prog i {
  display: block; height: 6px; border-radius: 999px; background: var(--sand); overflow: hidden;
}
.directory.projects td.prog i b {
  display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--sage);
}
@media (max-width: 1180px) {
  .directory.projects col.c-owner, .directory.projects col.c-client, .directory.projects col.c-team,
  .directory.projects th.c-owner, .directory.projects td.c-owner,
  .directory.projects th.c-client, .directory.projects td.c-client,
  .directory.projects th.c-team, .directory.projects td.c-team { display: none; }
  .directory.projects col.c-late { width: 84px; }
  .directory.projects col.c-open { width: 68px; }
  .directory.projects col.c-prog { width: 108px; }
  .directory.projects col.c-due { width: 104px; }
  .directory.projects .place-client,
  .directory.projects .place-owner { display: inline; }
  .directory.projects .who-line .muted.owner-only { display: block; }
}
dialog.project-new { width: min(640px, calc(100% - 24px)); max-height: min(92vh, 860px); }
dialog.project-new h2 { margin: 0; font-size: 1.05rem; }
dialog.project-new .dir-bar form { margin-left: auto; }
dialog.project-new .picker-pop { top: auto; bottom: calc(100% + 6px); }

main.wide > .project-desk { flex: 1; min-height: 0; }
.project-desk {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
}
.proj-sheet { position: relative; z-index: 5; display: grid; gap: 6px; padding: 8px 10px 0; }
.proj-sheet.is-brief { gap: 2px; }
.proj-sheet.is-brief .proj-facts { display: none; }
.proj-sheet:not(.is-brief) .proj-brief,
.proj-sheet:not(.is-brief) .proj-brief-note { display: none; }
.proj-brief {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; margin: 0;
  min-width: 0; font-size: 13px; line-height: 1.35;
}
.proj-brief span + span::before { content: " · "; color: var(--muted); }
.proj-brief-note {
  margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proj-bar {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
}
.proj-head { display: flex; align-items: center; min-width: 0; }
.proj-head .proj-title { width: 100%; flex: 1 1 auto; }
.proj-bar .back { margin: 0; }
.proj-bar .back a { font-size: 13px; white-space: nowrap; }
.proj-sheet .face, .proj-sheet button.face { width: 32px; height: 32px; font-size: 13px; }
.proj-title {
  width: 100%; min-width: 0; margin: 0;
  padding: 2px 8px; border: 1px solid transparent; background: transparent;
  font-family: Manrope, Inter, sans-serif; font-weight: 650; font-size: 1.05rem;
}
.proj-title:hover, .proj-title:focus { border-color: var(--line); background: #fff; }
.proj-stat { margin: 0; white-space: nowrap; font-size: 13px; }
.proj-actions { display: flex; align-items: center; gap: 8px; }
.proj-actions > a { font-size: 13px; white-space: nowrap; }
.proj-actions > button { width: auto; padding: 4px 12px; white-space: nowrap; }
.proj-actions > button.quiet {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
}
.proj-actions > button.quiet.on { background: var(--sage-soft); border-color: var(--sage); }
.project-desk .alert-n { color: var(--alert); font-weight: 650; }
.proj-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 10px; align-items: center;
}
.proj-facts .fact { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.proj-facts .fact > span { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.proj-facts .check { margin: 0; color: var(--ink); font-size: 13px; white-space: nowrap; }
.proj-facts .fact > input,
.proj-facts .fact > select,
.proj-facts .fact > textarea {
  width: 1%; min-width: 0; flex: 1 1 auto; max-width: 100%; padding: 4px 8px; font-size: 13px;
}
.proj-facts .picker-pop input {
  width: 100%; max-width: none; flex: none; padding: 8px 12px; font-size: 15px;
}
.proj-facts .fact-note { grid-column: 1 / -1; }
.proj-facts .fact-note textarea {
  min-height: 28px; max-height: 72px; resize: vertical;
}
.proj-facts .fact-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.proj-facts .fact-side select { width: 1%; min-width: 0; flex: 1 1 120px; }
.proj-facts .picker { flex: 1 1 auto; min-width: 0; }
.proj-facts .picker-line { min-height: 28px; }
.proj-facts .picker-add { width: 28px; height: 28px; }
.proj-sheet .picker-fallback { display: none; }
.task-tools {
  position: relative; z-index: 4; display: grid; gap: 6px;
  padding: 4px 10px 6px;
}
a.new-task {
  display: inline-flex; align-items: center; width: auto;
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 650;
  text-decoration: none; white-space: nowrap;
}
.task-tools form.task-quick { margin-bottom: 0; }
form.task-quick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 36px; margin: 0 0 8px; padding: 2px 4px 2px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0;
}
form.task-quick:focus-within { border-color: #B7C6C0; box-shadow: 0 0 0 2px #D5DDD8; }
form.task-quick > input,
form.task-quick > select { width: auto; margin: 0; }
form.task-quick > input[name="title"] {
  flex: 1 1 160px; width: 1%; min-width: 0;
  border: 0; background: transparent; border-radius: 0;
  padding: 6px 4px; font-size: 14px; font-weight: 550;
}
form.task-quick > input[name="title"]:focus { outline: none; border: 0; }
form.task-quick > select {
  flex: 0 1 180px; max-width: 200px; padding: 4px 8px; font-size: 13px; border-radius: 8px;
}
form.task-quick > input[type="date"] {
  flex: 0 0 auto; width: auto; max-width: 148px; padding: 4px 6px; font-size: 13px;
}
form.task-quick > button {
  width: auto; flex: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; white-space: nowrap;
}
form.task-quick .picker { flex: none; min-width: 0; }
form.task-quick .picker-line { min-height: 28px; }
form.task-quick .picker-add { width: 28px; height: 28px; }
form.task-quick .picker-fallback { display: none; }
form.task-quick .picker-pop input { width: 100%; }
form.task-quick .check { margin: 0; width: auto; flex: none; font-size: 13px; white-space: nowrap; }
.work-list { min-width: 0; }
.tpl-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.tpl-row form { display: inline; margin: 0; }
.tpl-row button.quiet {
  width: auto; padding: 3px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
}
.tpl-row a.quiet-link {
  font-size: 13px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.tool-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.proj-modes { margin: 0; gap: 4px; }
.proj-modes button {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px;
}
html[data-proj-mode="list"] .proj-modes [data-mode="list"],
html[data-proj-mode="board"] .proj-modes [data-mode="board"],
html[data-proj-mode="calendar"] .proj-modes [data-mode="calendar"],
html[data-proj-mode="gantt"] .proj-modes [data-mode="gantt"],
html[data-proj-mode="load"] .proj-modes [data-mode="load"],
.proj-modes button.on { background: var(--sage); color: #F7FBF8; border-color: var(--sage); }
.task-tools .pills { margin: 0; gap: 4px; }
.task-tools .pills button {
  font: inherit; color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px;
}
.task-tools .pills button.on { background: var(--sage); color: #F7FBF8; border-color: var(--sage); }
.task-tools input[type="search"] { width: 160px; max-width: 100%; padding: 4px 8px; }
.project-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.project-pane > [data-pane] { display: none !important; }
html:not([data-proj-mode]) .project-pane > [data-pane="list"],
html[data-proj-mode="list"] .project-pane > [data-pane="list"] { display: flex !important; flex: 1; min-height: 0; }
html[data-proj-mode="board"] .project-pane > [data-pane="board"] { display: flex !important; flex: 1; min-height: 0; }
html[data-proj-mode="calendar"] .project-pane > [data-pane="calendar"],
html[data-proj-mode="gantt"] .project-pane > [data-pane="gantt"] { display: block !important; flex: 1; min-height: 0; overflow: auto; }
html[data-proj-mode="load"] .project-pane > [data-pane="load"] { display: flex !important; flex: 1; min-height: 0; }
.project-pane .board { overflow: auto; padding: 4px 10px 12px; align-items: flex-start; }
.project-pane .cal-wrap, .project-pane .gantt-wrap { padding: 4px 10px 14px; }
.cal-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.cal-nav a { text-decoration: none; }
.project-pane .cal-sheet {
  border: 1px solid #B7AFA3; border-radius: 12px; overflow: hidden; background: #B7AFA3;
}
.project-pane .cal-sheet .cal,
.project-pane .cal-sheet .cal-head { gap: 1px; border: 0; border-radius: 0; background: transparent; }
.project-pane .cal-sheet .cal-head span {
  background: #E7E1D6; color: var(--ink); font-weight: 650; text-align: center; padding: 6px 2px;
}
.project-pane .cal-sheet .cal-day {
  position: relative; background: var(--card); border-radius: 0; min-height: 84px; padding: 5px; min-width: 0; overflow: hidden; gap: 4px;
}
.project-pane .cal-sheet .cal-day.weekend { background: #F8F3EA; }
.project-pane .cal-sheet .cal-day.out { background: #F3EEE6; }
.project-pane .cal-sheet .cal-day.out > strong { color: #A39C93; font-weight: 500; }
.project-pane .cal-sheet .cal-day.today { box-shadow: inset 0 0 0 2px var(--sage); }
.project-pane .cal a.cal-job {
  display: grid; gap: 1px; margin: 0; padding: 4px 6px; min-width: 0; max-width: 100%;
  background: var(--sage-soft); border-left: 3px solid var(--sage); border-radius: 6px;
  color: var(--ink); text-decoration: none; line-height: 1.25;
}
.project-pane .cal a.cal-job b,
.project-pane .cal a.cal-job span { display: block; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.project-pane .cal a.cal-job b { font-size: 12px; font-weight: 650; }
.project-pane .cal a.cal-job span { font-size: 11px; color: var(--muted); font-weight: 500; }
.project-pane .cal a.cal-job.late { background: var(--alert-soft); border-left-color: var(--alert); }
.project-pane .cal a.cal-job.late b { color: var(--alert); }
.project-pane .cal a.cal-job[draggable="true"] { cursor: grab; }
.project-pane .cal a.cal-job.is-drag { opacity: .45; }
.project-pane .cal-day.is-over { outline: 2px solid var(--sage); outline-offset: -2px; }
.project-pane .ticket-status { width: 100%; margin-top: 4px; padding: 3px 6px; font-size: 12px; }
.project-pane .ticket a { color: inherit; text-decoration: none; }
.project-pane .gantt-row { grid-template-columns: minmax(160px, 280px) minmax(0, 1fr); }
.project-pane .gantt-note { grid-column: 1 / -1; margin: 0; }
.gantt-name { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.gantt-name a { color: inherit; text-decoration: none; font-weight: 650; }
.gantt-name span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory.tasks .task-phone { display: none; }
.tasks-desk .directory.tasks {
  padding: 0; border: 0; box-shadow: none; border-radius: 0; background: transparent;
}
@media (max-width: 720px) {
  .directory.tasks col.c-status, .directory.tasks col.c-who,
  .directory.tasks th.c-status, .directory.tasks td.c-status,
  .directory.tasks th.c-who, .directory.tasks td.c-who { display: none; }
  .directory.tasks col.c-due { width: 92px; }
  .directory.tasks .task-phone { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
  .board { scroll-snap-type: x mandatory; }
  .column { flex-basis: 100%; scroll-snap-align: start; }
  .project-pane .cal-head { display: none; }
  .project-pane .cal { display: flex; flex-direction: column; gap: 6px; }
  .project-pane .cal-sheet .cal-day { display: none; min-height: 0; }
  .project-pane .cal-sheet .cal-day:has(a.cal-job:not([hidden])),
  .project-pane .cal.is-sorting .cal-day {
    display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 12px;
  }
  .project-pane .cal a.cal-job b,
  .project-pane .cal a.cal-job span { hyphens: manual; }
  .project-pane .gantt-row { grid-template-columns: minmax(0, 1fr); }
  .gantt-sheet { --side: 160px; max-height: none; }
  .project-pane .gantt-name a,
  .project-pane .gantt-name span { white-space: normal; overflow: visible; text-overflow: unset; }
}
.tasks-desk .dir-scroll { margin: 0; }
.tasks-desk .load-pane { padding: 4px 10px 14px; }
.tasks-desk .load-pane th { cursor: default; }
.tasks-desk .load-pane th[aria-sort="ascending"]::after,
.tasks-desk .load-pane th[aria-sort="descending"]::after { content: none; }
.pane-empty { margin: 8px 0; }
@media (max-width: 720px) {
  .proj-bar { grid-template-columns: auto minmax(0, 1fr); }
  .proj-head { grid-column: 1 / -1; }
  .proj-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.who-clear {
  font-size: 13px; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink);
}
.directory.project-work {
  flex: 1; height: auto; overflow: hidden; min-height: 0;
  border: 0; box-shadow: none; border-radius: 0; background: transparent; padding: 0;
}
.directory.project-work .dir-scroll { max-height: none; flex: 1; min-height: 0; overflow: auto; }
.directory.project-work table { min-width: 560px; }
.directory.project-work td.who strong {
  display: inline; font-weight: 650;
}
.directory.project-work td.who { max-width: 460px; overflow: hidden; text-overflow: ellipsis; }
.directory.project-work tr.late td.who { box-shadow: inset 3px 0 0 var(--alert); }
.directory.project-work tr.done td { color: var(--muted); }
.directory.project-work tr.done td .alert-n { color: var(--alert); }
.directory.project-work #task-empty td { color: var(--muted); padding: 14px 12px; }
.reply-bar {
  display: flex; gap: 8px; align-items: center;
  margin: 0 0 8px; padding: 6px 8px 6px 10px;
  border-left: 3px solid var(--sage); border-radius: 10px; background: var(--sand);
}
.reply-bar[hidden] { display: none; }
.reply-copy { display: grid; min-width: 0; flex: 1; }
.reply-copy strong { color: var(--sage); font-size: 0.86rem; }
.reply-copy span { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fwd, .quote {
  display: grid; margin: 6px 0 0; padding: 6px 10px;
  border: 0; border-left: 3px solid var(--sage); border-radius: 10px;
  background: rgba(63, 92, 87, 0.08); text-align: left; width: 100%; color: inherit;
}
.fwd { color: var(--sage); font-size: 0.86rem; font-weight: 650; }
.quote { cursor: pointer; }
.quote strong { color: var(--sage); font-size: 0.86rem; }
.quote span { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble.flash { animation: flashq 1.4s ease; border-radius: 16px; }
@keyframes flashq { 0% { background: var(--sage-soft); } 100% { background: transparent; } }
.msg-menu { position: fixed; left: 0; top: 0; right: auto; bottom: auto; z-index: 60; min-width: 180px; }
#fwd-sheet {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(44, 42, 38, 0.35);
  display: grid; align-items: end; justify-items: center; padding: 12px;
}
#fwd-sheet[hidden], #del-sheet[hidden] { display: none !important; }
#del-sheet {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(44, 42, 38, 0.35);
  display: grid; align-items: end; justify-items: center; padding: 12px;
}
#del-sheet .sheet-card { display: grid; gap: 8px; }
#del-sheet .sheet-card > button { width: 100%; text-align: left; }
.sheet-card {
  width: min(440px, 100%); max-height: min(78vh, 640px); overflow: auto;
  background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-card input[type="search"], .fwd-comment textarea { width: 100%; }
.fwd-comment { display: grid; gap: 4px; color: var(--muted); font-size: 0.86rem; }
.sheet-list { display: grid; gap: 2px; margin: 8px 0; }
.sheet-list button {
  display: grid; width: 100%; text-align: left; background: transparent; color: var(--ink);
  border-radius: 10px; padding: 8px 10px;
}
.sheet-list button small { color: var(--muted); }
.sheet-list button:hover { background: var(--sage-soft); }
.link-down {
  position: fixed;
  z-index: 80;
  left: 16px;
  right: 16px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #F3F1EC;
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: Manrope, Inter, sans-serif;
  font-weight: 650;
  text-align: center;
  pointer-events: none;
}
.preset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  flex: none;
}
.preset-bar > .muted { margin: 0 2px 0 0; }
.preset-bar button.preset {
  background: #E6E3DC;
  color: #6F6A63;
  border: 1px solid #D4D0C8;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
}
.preset-bar button.preset.on {
  background: var(--sage);
  color: #F7FBF8;
  border-color: var(--sage);
}
.preset-bar .picker-add { width: 32px; height: 32px; padding: 0; }
.sheet .preset-bar { margin-top: 4px; }
dialog.preset-dialog { width: min(640px, calc(100% - 24px)); }
dialog.preset-dialog h2 { margin: 0; font-size: 1.05rem; }
dialog.preset-dialog .dir-bar { margin-bottom: 4px; }
dialog.preset-dialog .preset-rights { max-height: min(52vh, 480px); overflow: auto; margin-top: 8px; }
dialog.preset-dialog .rights { margin-top: 10px; }
dialog.preset-dialog .preset-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
dialog.preset-dialog .preset-actions button { width: auto; }
dialog.preset-dialog #preset-drop { margin: 8px 0 0; }
dialog.preset-dialog #preset-drop button {
  width: auto;
  padding: 6px 12px;
  color: var(--danger);
}
main.wide > .tender-tools { flex: none; margin-bottom: 8px; }
.tender-tools details { margin: 8px 0; }
.tender-sample { white-space: pre-wrap; font-size: 12px; background: var(--sand); padding: 8px; border-radius: 8px; overflow: auto; }
.verdict { font-weight: 650; }
.verdict.play { color: var(--ok); }
.verdict.skip { color: var(--alert); }
.verdict.unclear { color: #8A5A12; }
.late-date { color: var(--alert); font-weight: 650; }
.directory.tenders table { min-width: 880px; }
.directory.platforms table { min-width: 980px; }
.directory.platforms td { white-space: nowrap; }
.directory.platforms td.clip { white-space: normal; max-width: 320px; word-break: break-all; }
.directory.cranes .dir-bar { flex-wrap: wrap; }
.directory.cranes .pills { margin: 0; }
.directory.cranes .dir-bar form { flex: 1 1 220px; min-width: 180px; }
.directory.cranes .dir-bar input[type="search"] { max-width: none; width: 100%; }
.directory.cranes table { min-width: 0; width: 100%; }
.directory.cranes td.wrap { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.crane-sections { display: grid; gap: 12px; }
.crane-sections .card { margin: 0; }
.crane-sections h2 { margin: 0 0 4px; font-size: 1.05rem; }
.crane-value { font-weight: 650; }
.crane-note { white-space: pre-wrap; margin: 0; }
.crane-sheet textarea { width: 100%; min-height: 160px; }
.dir-bar h1 { margin: 0; font-size: 1.25rem; }
.tag { font-weight: 650; }
.tag.rented { color: var(--ok); }
@media (min-width: 1100px) {
  .crane-sections { grid-template-columns: 1fr 1fr; }
  .crane-sections section:last-child { grid-column: 1 / -1; }
}
.directory.tenders td.clip { white-space: normal; max-width: 420px; }
.directory.tenders td.clip .muted, .directory.tenders td.clip strong { display: block; }
.tender-body { white-space: pre-wrap; margin: 0 0 12px; }
.tender-verdict { margin-bottom: 12px; }
.filters > button, .section-head > button { flex: none; width: auto; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.section-head button { margin-left: auto; padding: 6px 10px; }
dialog.make { width: min(640px, calc(100% - 24px)); }
dialog.make h2 { margin: 0; font-size: 1.05rem; }
dialog.make .dir-bar form { margin-left: auto; }
dialog.make form.sheet { display: grid; gap: 8px; }
dialog.make .picker-pop { top: auto; bottom: calc(100% + 6px); }
.funnel-hint { max-width: 68ch; margin: 0 0 12px; }
.funnel-note { margin: 0 0 12px; }
.funnel-row { display: flex; align-items: flex-start; gap: 10px; }
.funnel-lane { position: relative; flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding: 2px 2px 18px; }
.lane { position: relative; flex: 0 0 250px; display: flex; flex-direction: column; min-height: 148px; background: #EFEBE4; border-radius: 16px; box-shadow: inset 0 6px 0 var(--lane, var(--sage)); }
.lane.is-drag { z-index: 4; opacity: .96; box-shadow: inset 0 6px 0 var(--lane, var(--sage)), 0 14px 28px rgba(44, 42, 38, .18); }
.lane-head { display: flex; align-items: flex-start; gap: 4px; padding: 14px 8px 0 6px; cursor: grab; user-select: none; touch-action: none; }
.lane.is-drag .lane-head { cursor: grabbing; }
.lane-grip, .lane-gear { width: 28px; height: 28px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.lane-gear { width: 32px; height: 32px; border-radius: 10px; background: #fff; color: #3F5C57; border: 1px solid #D9D3C8; box-shadow: 0 1px 0 rgba(44, 42, 38, .04); }
.lane-gear svg { display: block; }
.lane-gear:hover, .lane-grip:hover { background: var(--sage-soft); color: var(--sage); border-color: #B7C7C3; }
.lane-title { flex: 1; min-width: 0; margin: 3px 0 0; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.lane-count { margin-left: 4px; font-weight: 500; }
.lane-meta { margin: 6px 12px 0; }
.lane-rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 12px 0; }
.lane-rules[hidden] { display: none; }
.lane-rules span { font-size: 12px; background: #fff; border-radius: 999px; padding: 2px 8px; }
.lane-setup { display: grid; gap: 8px; margin: 10px 10px 12px; padding-top: 10px; border-top: 1px solid rgba(44, 42, 38, .08); }
.lane-setup[hidden] { display: none; }
.lane-setup label { margin: 0; }
.lane-setup input.main { font-size: 1rem; }
.lane-label { margin: 0; color: var(--muted); font-size: 13px; }
.lane-colors, .lane-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
button.swatch { width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--swatch); border: 2px solid #fff; box-shadow: 0 0 0 1px #D9D3C8; }
button.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.lane-kinds button { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px; font-size: 13px; }
.lane-kinds button[aria-pressed="true"] { background: var(--sage); color: #F7FBF8; border-color: var(--sage); }
.lane-move { display: grid; gap: 4px; margin: 0; color: var(--muted); font-size: 13px; }
.lane-move[hidden] { display: none; }
.lane-move select { width: 100%; }
.lane-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lane-actions button { padding: 8px 12px; }
.lane-locked { margin: 0; }
button.lane-add { flex: 0 0 92px; min-height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px; border-radius: 16px; border: 1.5px dashed #C8C2B6; background: #F3F1EC; color: var(--sage); }
button.lane-add b { font-size: 32px; font-weight: 500; line-height: 1; }
button.lane-add:hover { background: var(--sage-soft); }
.lane-mark { position: absolute; top: 0; width: 4px; height: 148px; border-radius: 3px; background: var(--sage); box-shadow: 0 0 0 4px rgba(63, 92, 87, .18); pointer-events: none; z-index: 5; }

.task-screen { display: grid; gap: 14px; }
.task-work, .task-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .task-screen { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 380px); align-items: start; }
  .passport, .feed { grid-column: 1 / -1; }
}
.passport { display: grid; gap: 8px; }
.passport-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.passport .state {
  font-weight: 700; font-size: 13px; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--sand);
}
.passport[data-status="draft"] { box-shadow: inset 0 4px 0 #C4B39A, var(--shadow); }
.passport[data-status="draft"] .state { background: #F6F1E8; }
.passport[data-status="open"] { box-shadow: inset 0 4px 0 #6E97AB, var(--shadow); }
.passport[data-status="open"] .state { background: #EAF1F4; }
.passport[data-status="in_progress"] { box-shadow: inset 0 4px 0 var(--sage), var(--shadow); }
.passport[data-status="in_progress"] .state { background: #E7F0EC; color: var(--sage); }
.passport[data-status="review"] { box-shadow: inset 0 4px 0 #C4A36A, var(--shadow); }
.passport[data-status="review"] .state { background: #F8F0E4; }
.passport[data-status="done"] { box-shadow: inset 0 4px 0 #6E9474, var(--shadow); }
.passport[data-status="done"] .state { background: #E8F2E6; color: var(--ok); }
.passport[data-status="blocked"] { box-shadow: inset 0 4px 0 #C46A62, var(--shadow); }
.passport[data-status="blocked"] .state { background: #FBECEA; color: var(--danger); }
.passport[data-status="on_hold"] { box-shadow: inset 0 4px 0 #A39890, var(--shadow); }
.passport[data-status="on_hold"] .state { background: #F3EEE8; }
.passport[data-status="cancelled"] { box-shadow: inset 0 4px 0 #D5D0C8, var(--shadow); }
.passport[data-status="cancelled"] .state { background: #F6F4F1; color: var(--muted); }
.when { font-family: Manrope, Inter, sans-serif; font-weight: 700; font-size: 1.2rem; }
.when.late, .wait { color: var(--danger); }
.wait { margin: 0; }
.wait a { color: inherit; }
.prio { color: var(--danger); font-weight: 700; font-size: 13px; }
.meter-link { color: var(--sage); font-size: 13px; text-decoration: none; }
.passport h1 { margin: 0; }
.passport h1 input, .task-create h1 input {
  width: 100%; border-color: transparent; background: transparent; font-size: 1.45rem; padding-left: 0;
}
.passport h1 input:focus, .task-create h1 input:focus { border-color: var(--line); background: #fff; padding-left: 10px; }
.passport-facts, .make-facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.fact { display: grid; gap: 4px; min-width: 0; margin: 0; }
.fact > span, .fact > label { color: var(--muted); font-size: 12px; margin: 0; }
.fact.wide { grid-column: 1 / -1; }
.fact.who:not(:has(.pick-chip))::after { content: "не выбран"; color: var(--muted); font-size: 15px; }
.passport-facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.fact input, .fact select, .fact textarea { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions button.quiet, .link-add button.quiet, .room button.quiet { border: 1px solid var(--line); padding: 8px 12px; }
.reason { max-width: 420px; }
.outcome textarea { background: var(--sage-soft); border-color: transparent; min-height: 72px; }
.meter { height: 6px; background: var(--sand); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--done, 0%); background: var(--sage); }
.check-line {
  width: 100%; display: flex; gap: 8px; align-items: baseline; text-align: left;
  background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 8px 2px;
}
.check-line.done span { color: var(--muted); text-decoration: line-through; }
.check-line i { margin-left: auto; color: var(--muted); font-style: normal; font-size: 12px; }
.mini { flex: none; margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--sand); }
.mini[data-status="in_progress"] { background: #E7F0EC; color: var(--sage); }
.mini[data-status="review"] { background: #F8F0E4; }
.mini[data-status="done"] { background: #E8F2E6; color: var(--ok); }
.mini[data-status="blocked"] { background: #FBECEA; color: var(--danger); }
.room form { margin: 0; }
.link-add, .task-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.link-add select, .task-quick input[type="text"], .task-quick input:not([type="checkbox"]) { flex: 1 1 220px; width: auto; max-width: 420px; }
.task-quick .check { margin: 0; }
.feed article { padding: 8px 0; border-top: 1px solid var(--line); }
.feed article p { margin: 0; }
.feed article.fact { color: var(--muted); font-size: 13px; }
.feed time { color: var(--muted); font-weight: 400; font-size: 12px; }
.composer-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 12px; }
.composer-task textarea { min-height: 44px; }
.task-create { display: grid; gap: 12px; }
.task-create h1, .task-create h2, .task-create p { margin: 0; }
.task-create h2 { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.context { color: var(--sage); font-weight: 650; }
button.check-line:disabled { opacity: 1; cursor: default; }
