/* «Доступность» → «Календарь»: колонки экспертов на день (frontend/js/experts-calendar.js)
   и «Общие встречи» команды (frontend/js/team-meetings.js). */
.kc-busy.meeting {
  background: #cdb8ef;
}
.kc-mode {
  margin: -6px 0 14px;
}
.xc-nav {
  grid-template-columns: 44px minmax(180px, auto) 44px auto;
}
.xc-teams .chip {
  min-height: 36px;
  padding: 6px 14px;
}
.xc-scroll {
  --xc-col: minmax(160px, 1fr);
  position: relative;
  max-height: calc(100vh - 290px);
  min-height: 380px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.xc-grid {
  display: grid;
  grid-template-columns: 56px repeat(var(--xc-cols), var(--xc-col));
  min-width: min-content;
}
.xc-corner,
.xc-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.xc-corner {
  left: 0;
  z-index: 8;
  border-right: 1px solid var(--line);
}
.xc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-top: 0;
  border-left: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}
.xc-head.link {
  cursor: pointer;
}
.xc-head.link:hover strong {
  color: var(--blue);
  text-decoration: underline;
}
.xc-head .avatar {
  flex: none;
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.xc-head-copy {
  display: grid;
  min-width: 0;
}
.xc-head-copy strong {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.xc-head-copy small {
  color: var(--muted);
  font-size: 12px;
}
.xc-scale {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.xc-scale span {
  position: absolute;
  right: 6px;
  margin-top: -7px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.xc-scale span:first-child {
  margin-top: 2px;
}
.xc-col {
  position: relative;
  border-right: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0 59px, #e6e9ee 59px 60px),
    repeating-linear-gradient(135deg, #f3f5f8 0 6px, #eceff3 6px 8px);
}
.xc-col.off .xc-work {
  display: none;
}
.xc-col.paused {
  opacity: 0.6;
}
.xc-work {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 59px, #e9ecf1 59px 60px), #fff;
}
.xc-past {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(225, 229, 235, 0.4);
  pointer-events: none;
}
.xc-now {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  height: 2px;
  background: #e2483d;
  pointer-events: none;
}
.xc-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #e2483d;
}
.xc-item {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  overflow: hidden;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.xc-item span {
  max-width: 100%;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xc-item small {
  opacity: 0.8;
  white-space: nowrap;
}
.xc-item.xc-booking {
  border-color: #7fa1ed;
  background: #e3ebff;
  color: #1648bd;
}
.xc-item.xc-booking.xc-done {
  border-color: #c7cfdb;
  background: #eef1f6;
  color: #4b5563;
}
.xc-item.xc-closed {
  border-color: #d99a92;
  background: repeating-linear-gradient(135deg, rgba(247, 217, 213, 0.95) 0 6px, rgba(255, 255, 255, 0.9) 6px 10px);
  color: #8a2a22;
}
.xc-item.xc-open {
  border-color: #7cc196;
  background: rgba(223, 242, 229, 0.95);
  color: #1f6b3b;
}
.xc-item.xc-meeting {
  border-color: #a98ad8;
  background: #efe7fb;
  color: #4d2a85;
}
.xc-join {
  margin-top: 2px;
  padding: 1px 10px;
  border-radius: 999px;
  background: #6b46b8;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.xc-legend .xc-lg {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.xc-lg-booking {
  background: #e3ebff;
  border-color: #7fa1ed;
}
.xc-lg-closed {
  background: repeating-linear-gradient(135deg, #f7d9d5 0 4px, #fff 4px 7px);
  border-color: #d99a92;
}
.xc-lg-open {
  background: #dff2e5;
  border-color: #7cc196;
}
.xc-lg-meeting {
  background: #efe7fb;
  border-color: #a98ad8;
}
.xc-card {
  position: fixed;
  z-index: 90;
  display: grid;
  gap: 6px;
  width: 300px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.xc-card p {
  margin: 0;
}
.xc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.xc-card-head strong {
  font-size: 15px;
  line-height: 1.35;
}
.xc-card-head .icon-button {
  flex: none;
  width: 30px;
  height: 30px;
}
.xc-card-when {
  font-weight: 600;
}
.xc-card-title {
  color: #8a2a22;
}
.xc-card-kind {
  font-size: 13px;
}
/* Открыта шторка / карточка — нижнее меню телефона не перекрывает её кнопки. */
body.sheet-open .bottom-nav,
body.sheet-open .more-menu {
  display: none;
}
@media (max-width: 768px) {
  .xc-scroll {
    --xc-col: 140px;
    max-height: calc(100dvh - 300px);
    min-height: 320px;
  }
  .xc-grid {
    grid-template-columns: 46px repeat(var(--xc-cols), var(--xc-col));
  }
  .xc-head {
    padding: 6px 8px;
  }
  .xc-head .avatar {
    display: none;
  }
  .kc-nav.xc-nav {
    grid-template-columns: 44px minmax(0, 1fr) 44px minmax(0, 104px);
  }
  .kc-nav.xc-nav .date-control {
    grid-column: auto;
  }
  .kc-nav.xc-nav .today-return {
    grid-column: auto;
    width: 100%;
    padding-inline: 8px;
  }
  .kc-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .xc-card {
    left: 8px !important;
    right: 8px;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
  }
}

/* «Общие встречи» команды. */
.tm-page .tm-list {
  display: grid;
  gap: 12px;
}
.tm-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.tm-card.inactive {
  opacity: 0.7;
}
.tm-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.tm-card-head h2 {
  margin: 0;
  font-size: 18px;
}
.tm-when {
  color: var(--muted);
  font-size: 14px;
}
.tm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tm-badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: #efe7fb;
  color: #4d2a85;
  font-size: 12px;
  font-weight: 650;
}
.tm-badge.off {
  background: #eef1f6;
  color: var(--muted);
}
.tm-people {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.tm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tm-join {
  background: #6b46b8;
  border-color: #6b46b8;
  color: #fff;
}
.tm-join:hover {
  background: #5a3a9e;
}
.tm-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f5fc;
}
.tm-summary h3 {
  margin: 0;
  font-size: 14px;
}
.tm-summary p {
  margin: 0;
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.5;
}
.tm-tasks {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.45;
}
.tm-tasks li.mine {
  font-weight: 600;
}
.tm-tasks li.mine::marker {
  color: #6b46b8;
}
.tm-history {
  display: grid;
  gap: 10px;
}
.tm-history-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.tm-history-item header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tm-status {
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.tm-status.ready {
  background: var(--green-bg);
  color: var(--green);
}
.tm-form .tm-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tm-form .tm-days label,
.tm-people-pick label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.tm-form .tm-days input:checked + span,
.tm-people-pick input:checked + span {
  font-weight: 600;
}
.tm-people-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}
.tm-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tm-switches {
  display: grid;
  gap: 8px;
}
.tm-switches label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
/* Главная эксперта: плашка общей встречи («Войти» / итоги). */
.tm-plaque {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid #d9c8f3;
  border-radius: 16px;
  background: #f7f2fe;
  color: #3d2170;
}
.tm-plaque.live {
  border-color: #6b46b8;
  background: #efe7fb;
  box-shadow: 0 6px 18px rgba(107, 70, 184, 0.14);
}
.tm-plaque.quiet {
  padding: 8px 14px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  font-size: 14px;
}
.tm-plaque-copy {
  display: grid;
  flex: 1 1 220px;
  gap: 2px;
}
.tm-plaque-copy small {
  color: var(--muted);
  font-size: 13px;
}
.tm-plaque .button {
  min-height: 40px;
}
@media (max-width: 768px) {
  .tm-plaque .button {
    flex: 1 1 auto;
  }
  .tm-times {
    grid-template-columns: 1fr 1fr;
  }
}
/* Галочки дней и участников внутри .field — без размеров полей ввода. */
.tm-form .field input[type="checkbox"],
.tm-switches input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: none;
  accent-color: #6b46b8;
}
.tm-form .tm-days label,
.tm-people-pick label {
  font-weight: 500;
  color: var(--ink);
}
.tm-card p {
  margin: 0;
}
