.container-wide {
  max-width: 1600px;
}

/* Рубрики — три цветовые группы */
.chip-beige {
  background: var(--tone-beige-bg);
  border-color: var(--tone-beige);
  color: var(--tone-beige-text);
}

.chip-video {
  background: var(--tone-video-bg);
  border-color: var(--tone-video);
  color: var(--tone-video-text);
}

.chip-efir {
  background: var(--tone-efir-bg);
  border-color: var(--tone-efir);
  color: var(--tone-efir-text);
}

.legend-item.tone-beige {
  background: var(--tone-beige-bg);
  border-color: var(--tone-beige);
}

.legend-item.tone-video {
  background: var(--tone-video-bg);
  border-color: var(--tone-video);
}

.legend-item.tone-efir {
  background: var(--tone-efir-bg);
  border-color: var(--tone-efir);
}

.legend-item.tone-beige .legend-swatch { background: var(--tone-beige); }
.legend-item.tone-video .legend-swatch { background: var(--tone-video); }
.legend-item.tone-efir .legend-swatch { background: var(--tone-efir); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  font-weight: 600;
}

.legend-desc {
  color: var(--muted);
  font-weight: 400;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.month-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}

.month-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.month-header h2 {
  margin: 0;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.month-theme {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.month-count {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.weekday {
  background: var(--surface);
  text-align: center;
  padding: 8px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  min-width: 0;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}

.day-cell {
  background: var(--surface);
  min-height: 110px;
  min-width: 0;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.day-cell.outside-range {
  background: #141b24;
  opacity: 0.45;
}

.day-cell.outside-month {
  background: #121820;
  opacity: 0.3;
}

.day-cell.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.day-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.day-cell.in-range .day-num {
  color: var(--text);
}

.post-chip {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  line-height: 1.3;
  text-decoration: none;
  border-left: 3px solid;
  transition: transform 0.1s, filter 0.1s;
  cursor: pointer;
  overflow: hidden;
}

.chip-content {
  flex: 1;
  min-width: 0;
}

.chip-status-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  line-height: 0;
}

.chip-status-icon .status-svg {
  width: 19.5px;
  height: 19.5px;
  display: block;
}

.chip-status-icon .status-svg-double {
  width: 22px;
  height: 16px;
}

.chip-status-failed {
  color: var(--danger);
}

.chip-status-warn {
  color: #f5a623;
  text-decoration: none;
}

.chip-status-draft {
  color: var(--muted);
}

.chip-status-scheduled,
.chip-status-published {
  color: #38bdf8;
}

.chip-status-video {
  color: var(--tone-video);
}

.legend-status {
  gap: 6px;
}

.legend-status .legend-icon {
  margin-top: 0;
}

.legend-status .legend-swatch {
  display: none;
}

.post-chip.chip-beige .post-chip-type {
  display: none;
}

.post-chip.chip-beige {
  padding-top: 4px;
  padding-bottom: 4px;
}

.post-chip:hover {
  filter: brightness(1.15);
  transform: translateX(1px);
  text-decoration: none;
}

.post-chip-type {
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 1px;
}

.post-chip-text {
  color: inherit;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-chip.status-published {
  opacity: 0.55;
}

/* Проработка: без загруженных тезисов */
.post-chip.chip-unprepared {
  opacity: 0.82;
  filter: saturate(0.55) brightness(0.92);
  border-left-style: dotted;
}

.post-chip.chip-unprepared.chip-beige {
  background: rgba(120, 110, 95, 0.14);
}

.post-chip.chip-unprepared.chip-video {
  background: rgba(180, 110, 60, 0.12);
}

.post-chip.chip-unprepared.chip-efir {
  background: rgba(180, 90, 120, 0.12);
}

.legend-unprepared {
  background: rgba(120, 110, 95, 0.14);
  border: 1px dashed var(--muted);
}

.legend-unprepared .legend-swatch {
  background: rgba(120, 110, 95, 0.35);
  border: 1px dotted var(--muted);
}

/* Контент для педагогов — штриховка */
.chip-dashed {
  border-left-style: dashed;
  border-left-width: 3px;
  cursor: default;
}

.chip-teacher-instagram {
  color: #f5d4e8;
  border-color: #d878b8;
  background: repeating-linear-gradient(
    -45deg,
    rgba(216, 120, 184, 0.16),
    rgba(216, 120, 184, 0.16) 5px,
    rgba(216, 120, 184, 0.06) 5px,
    rgba(216, 120, 184, 0.06) 10px
  );
}

.chip-teacher-pedagog {
  color: #d4e0f5;
  border-color: #6a8fc4;
  background: repeating-linear-gradient(
    -45deg,
    rgba(106, 143, 196, 0.16),
    rgba(106, 143, 196, 0.16) 5px,
    rgba(106, 143, 196, 0.06) 5px,
    rgba(106, 143, 196, 0.06) 10px
  );
}

.legend-dashed.chip-teacher-instagram {
  border-color: #d878b8;
}

.legend-dashed.chip-teacher-pedagog {
  border-color: #6a8fc4;
}

.legend-dashed.chip-teacher-instagram .legend-swatch {
  background: repeating-linear-gradient(
    -45deg,
    rgba(216, 120, 184, 0.5),
    rgba(216, 120, 184, 0.5) 3px,
    rgba(216, 120, 184, 0.2) 3px,
    rgba(216, 120, 184, 0.2) 6px
  );
}

.legend-dashed.chip-teacher-pedagog .legend-swatch {
  background: repeating-linear-gradient(
    -45deg,
    rgba(106, 143, 196, 0.5),
    rgba(106, 143, 196, 0.5) 3px,
    rgba(106, 143, 196, 0.2) 3px,
    rgba(106, 143, 196, 0.2) 6px
  );
}

.legend-dashed {
  border-style: dashed;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.calendar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  user-select: none;
}

.calendar-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.calendar-hint {
  font-size: 0.8rem;
  color: var(--muted);
}
