/* Календарь главной — внешний вид из calendar.html. Фиксированные цвета,
   от палитры не зависит. Разметка прежняя, стили переопределены. */

/* ── Шрифты заголовка секции ── */
html:root #fp-calendar .fp-calendar-wrapper > .flex p { font-family: 'Manrope', system-ui, sans-serif; }
html:root #fp-calendar .fp-calendar-wrapper > .flex h2 { font-family: 'Unbounded', 'Manrope', sans-serif; font-weight: 600; letter-spacing: -.01em; }

/* ── Сетка ── */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar { background: transparent; border-radius: 0; font-family: 'Manrope', system-ui, sans-serif; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-grid--head { background: transparent; border-radius: 0; padding: 0 1px; column-gap: 0; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-cell--head {
  height: auto; min-height: 0; padding: 11px 8px 10px; border: 0; border-radius: 12px 12px 0 0;
  font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #fff;
  background: linear-gradient(180deg, #37518C, #192842);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-cell--head:nth-child(3n+2) { background: linear-gradient(180deg, #B6313A, #750E17); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-cell--head:nth-child(3n)   { background: linear-gradient(180deg, #C08729D1, #98620C); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-grid--body {
  border: 1px solid #E5CDB1; border-radius: 0 0 14px 14px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 3px rgba(66,1,1,.05);
}

/* ── Ячейка дня ── */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day {
  container: day / inline-size;
  height: auto; padding: 8px 6px 10px; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 0; border-right: 1px solid #E5CDB1; border-bottom: 1px solid #E5CDB1;
  outline: 0;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:nth-child(7n) { border-right: 0; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:nth-last-child(-n+7) { border-bottom: 0; }
@media (min-width: 641px) { html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day { min-height: 150px; height: auto; } }

html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__num {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  min-width: 26px; height: 26px; margin: 0; border-radius: 13px; padding: 0;
  font: 800 14px/1 'Manrope', system-ui, sans-serif; font-variant-numeric: tabular-nums;
  color: #22181A; opacity: 1;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--weekend { background: #FCF7F0; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--weekend .ts-day__num { color: #8E1B1B; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past:not(.ts-day--other-month) { background: #F2EDE7; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past.ts-day--weekend:not(.ts-day--other-month) { background: #ECE5DD; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__num { color: #665A52; font-weight: 600; opacity: 1; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--other-month { background: repeating-linear-gradient(135deg, #F6F2ED 0 6px, #fff 6px 12px); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--other-month.ts-day--weekend { background: repeating-linear-gradient(135deg, #F3EDE6 0 6px, #fff 6px 12px); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--other-month .ts-day__num { color: #6B5F57; font-weight: 600; opacity: 1; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--today {
  background: linear-gradient(180deg, #FCF0D9, #F7DCC0);
  box-shadow: inset 0 0 0 1px #C98B5B; border-radius: 6px; outline: 0;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-cell.ts-day.ts-day--today .ts-day__num {
  width: auto; height: 26px; min-width: 26px; line-height: 1; padding: 0 6px; border-radius: 13px; margin: 0;
  font-size: 14px; color: #fff; background: linear-gradient(180deg, #B6313A, #750E17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--unavailable { background: #F6F2ED; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--unavailable .ts-day__num { color: #665A52; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__unavail-label { color: #665A52; }

/* ── Карточка события ── */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__items { gap: 6px; opacity: 1 !important; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item {
  display: flex; flex-direction: column; gap: 3px; padding: 7px; overflow: visible;
  border-radius: 8px; background: #fff; border: 1px solid #EADFD4; outline: 0;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(66,1,1,.06);
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item--guest { background: #E0EFFE; border-color: #C4DDF6; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(0,40,80,.06); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; row-gap: 3px; min-height: 18px; padding: 0; margin: 0; line-height: 1.3; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-time {
  display: inline-flex; align-items: center; gap: 4px;
  font: 800 12px/1.3 'Manrope', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #7A5212;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__item-time::before, html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__item-venue::before {
  content: ""; flex: none; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__item-time::before { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3Cpath d='M12 7v5l3 2' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__item-venue::before { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 22s7-6.2 7-12a7 7 0 1 0-14 0c0 5.8 7 12 7 12zM12 7.4a2.6 2.6 0 1 0 0 5.2 2.6 2.6 0 0 0 0-5.2z'/%3E%3C/svg%3E"); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-title {
  display: block; height: auto; margin: 0; padding: 0; white-space: normal; overflow: visible;
  font: 700 12.5px/1.3 'Manrope', system-ui, sans-serif; letter-spacing: 0; color: #1E2F4D;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-title-text { -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.3; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-guest-who { font-weight: 700; }

/* бейджи «Прем'єра» / «Гастролі» */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-premiere {
  margin-left: auto; padding: 2px 7px; border: 0; border-radius: 999px; line-height: normal;
  font: 800 10px/normal 'Manrope', system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  color: #fff; background: linear-gradient(180deg, #B6313A, #750E17); box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-premiere--guest { background: linear-gradient(180deg, #2A78C4, #1F5F9E); }

/* низ карточки: зал + «Квитки» */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; row-gap: 4px; margin-top: 2px; min-height: 22px; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-venue {
  display: inline-flex; align-items: center; gap: 3px; flex: 0 1 auto; min-width: 0; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: none; text-align: left; white-space: nowrap;
  font: 700 11px/1.3 'Manrope', system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #8F101B;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-venue--small { color: #0B6B5A; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-venue--vyjizd { color: #2F3DA8; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-ticket {
  flex: none; width: auto; height: 22px; margin: 0 0 0 auto; padding: 0 6px; border: 0; border-radius: 5px;
  display: inline-flex; align-items: center; white-space: nowrap;
  font: 800 10px/1 'Manrope', system-ui, sans-serif; letter-spacing: .03em; text-transform: uppercase;
  color: #420101; background: linear-gradient(180deg, #FFD08A, #FFB347);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(66,1,1,.14);
}

/* прошедшие дни */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__item { background: #FAF7F3; border-color: #E6DED5; box-shadow: none; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__item-time,
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__item-venue { color: #665A52; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__item-venue::before { color: #A99C90; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__item-title { color: #5A4E47; font-weight: 600; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__item-premiere { background: transparent; color: #665A52; border: 1px solid #D6CBC0; padding: 1px 6px; box-shadow: none; }

/* иконки скрываются по ширине ячейки */
@container day (max-width: 165px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__item-time::before { display: none; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__item-venue::before { display: none; }
}
@container day (max-width: 146px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-footer { flex-direction: column; align-items: stretch; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-ticket { justify-content: center; height: 24px; margin: 0; }
}

/* ── «Ще N подій» ── */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__overflow {
  display: flex; align-items: center; justify-content: center; height: 30px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; outline: 0;
  background: linear-gradient(180deg, #F6F1EB, #EBE3D9); color: #3A2F2B;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  font: 700 12px/1 'Manrope', system-ui, sans-serif; letter-spacing: 0; opacity: 1 !important;
}
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__overflow--narrow { display: none; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--weekend .ts-day__overflow { background: linear-gradient(180deg, #F5EEE5, #E8DDD0); }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--today .ts-day__overflow { background: linear-gradient(180deg, #F6DCBC, #EBC197); border: 1px solid #C98B5B; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--past .ts-day__overflow { background: linear-gradient(180deg, #FDFBF8, #F3EDE6); border: 1px solid #E6DED5; color: #665A52; }

/* адаптив из calendar.html */
@media (max-width: 1100px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-cell--head { font-size: 11px; letter-spacing: .04em; padding: 10px 4px 9px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day { padding: 7px 4px 8px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item { padding: 6px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day .ts-day__item-premiere { font-size: 9px; padding: 2px 5px; letter-spacing: .03em; }
}

/* выходной (будущий) */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--weekend:not(.ts-day--past):not(.ts-day--other-month):not(.ts-day--today) { background: #fff4e5; }

/* ховер/фокус дня — рамка как у сегодняшнего */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--active:hover,
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--active:focus,
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--active:focus-visible,
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--history:hover,
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--history:focus,
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day--history:focus-visible {
  box-shadow: inset 0 0 0 1px #C98B5B; outline: 0;
}

/* Шрифты заголовков секций главной */
html:root :is(#fp-schedule, #fp-repertoire, #fp-news, #fp-about) :is(h2) { font-family: 'Unbounded', 'Manrope', sans-serif; font-weight: 600; letter-spacing: -.01em; }
html:root :is(#fp-schedule, #fp-repertoire, #fp-news, #fp-about, #fp-calendar) p[style*="letter-spacing:0.25em"] { font-family: 'Manrope', system-ui, sans-serif; }

/* «+ Ще N подій ⌄» и раскрытие дня поверх сетки */
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__overflow--wide { gap: 5px; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__overflow--wide::before { content: "+"; font-weight: 800; }
html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__overflow--wide::after {
  content: ""; width: 14px; height: 14px; flex: none; background: currentColor; transition: transform .2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (min-width: 641px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar { overflow: visible; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-grid--body { overflow: visible; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:nth-last-child(7) { border-bottom-left-radius: 13px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:last-child { border-bottom-right-radius: 13px; }

  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:has(.ts-day__items--more) { isolation: isolate; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:has(.ts-day__items--more)::before {
    content: ""; position: absolute; z-index: -1; left: 0; right: -1px;
    top: var(--zx-ltop, 0); bottom: var(--zx-lbot, -1px);
    background: inherit; border-radius: 6px; opacity: 0; pointer-events: none;
    box-shadow: inset 0 0 0 1px #C98B5B, 0 8px 18px rgba(66,1,1,.18);
    transition: top .22s ease, bottom .22s ease, opacity .12s ease .1s;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day__items--more {
    display: flex; flex-direction: column; gap: 6px;
    position: absolute; left: 0; right: 0; top: var(--zx-top, 100%); z-index: 1;
    margin: 0; padding: 0 var(--zx-pad, 6px); background: none; border: 0; border-radius: 0; box-shadow: none;
    visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path .22s ease, visibility 0s .22s, transform .22s ease;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:has(.ts-day__items--more) .ts-day__num,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day:has(.ts-day__items--more) > .ts-day__items { transition: transform .22s ease; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-open,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-closing { overflow: visible; z-index: 30; box-shadow: none; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-open::before { opacity: 1; transition: top .22s ease, bottom .22s ease, opacity .1s ease; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-open .ts-day__items--more { visibility: visible; clip-path: inset(0); transition: clip-path .22s ease, visibility 0s, transform .22s ease; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-open .ts-day__overflow { display: none; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-up .ts-day__num,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-up > .ts-day__items,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-day.zt-up > .ts-day__items--more { transform: translateY(calc(-1 * var(--zx-shift, 0px))); }
}

/* Телефон, режим «список»: только дни с событиями (правила выше иначе возвращают display:flex) */
@media (max-width: 640px) {
  html:root #fp-calendar .ts-calendar--mobile-list .ts-cal-grid--body .ts-day--other-month,
  html:root #fp-calendar .ts-calendar--mobile-list .ts-cal-grid--body .ts-day:not(.ts-day--has-items):not(.ts-day--unavailable) { display: none; }
}
@media (max-width: 640px) {
  /* список: дата слева узкой колонкой, события справа (как было до новой сетки) */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-cal-grid--body .ts-day {
    flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px;
    padding: 10px 12px; min-height: 0; border: 1px solid #E5CDB1; border-radius: 8px; overflow: visible;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day__date { flex: 0 0 2.75rem; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day__items { flex: 1 1 0; min-width: 0; align-items: stretch; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day .ts-day__item { width: 100%; }
}
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day__date { align-items: center; text-align: center; }
}

/* Телефон, список: день недели и число по центру, крупнее */
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day__date {
    flex: 0 0 3.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day__weekday { display: block; width: 100%; text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .1em; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-day__num { display: block; width: 100%; text-align: center; font-size: 1.9rem; line-height: 1.1; margin: 0; }

  /* Розклад: все дни месяца, пустые — узкой строкой */
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-cal-grid--body .ts-day--other-month { display: none; }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-cal-grid--body .ts-day:not(.ts-day--has-items):not(.ts-day--unavailable):not(.ts-day--other-month) {
    display: flex; flex-direction: row; align-items: center; padding: 4px 12px; min-height: 0; gap: 10px; opacity: .85;
  }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__date { flex-direction: row; flex: 0 0 auto; gap: 10px; }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__num { width: auto; font-size: 1.1rem; }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__weekday { width: auto; font-size: .7rem; }
}

/* Телефон, режим «таблица»: текст внутри ячеек мельче, чтобы помещался (нужное можно приблизить) */
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item { padding: 3px 3px 4px; border-radius: 6px; gap: 1px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-header { min-height: 0; gap: 2px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-time { font-size: 8px; line-height: 1.1; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-title { font-size: 7px; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; white-space: normal; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-venue,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-footer { font-size: 6px; line-height: 1.1; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-footer * { font-size: 6px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item svg { width: 6px; height: 6px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item .ts-day__item-ticket,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item [class*="ticket"] { font-size: 6px; padding: 1px 3px; }
}

/* Афіша (телефон, список): пустые дни — число по высоте с названием дня; метка сегодня */
@media (max-width: 640px) {
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__date { align-items: center; gap: 12px; }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__weekday { width: 1.8rem; line-height: 1; }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__num { line-height: 1; }
  /* сегодня: круг по центру колонки под названием дня */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-list .ts-cal-cell.ts-day.ts-day--today .ts-day__num {
    display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; margin: 0 auto; border-radius: 50%;
    font-size: 1.25rem; line-height: 1; text-align: center;
  }
}
@media (max-width: 640px) {
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__num { margin: 0; padding: 0; }
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__date { margin: 0; }
  /* «Ще N події» в таблице — мелко */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__overflow { font-size: 6.5px; padding: 2px 3px; line-height: 1.1; min-height: 0; gap: 1px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__overflow svg { width: 6px; height: 6px; }
}
@media (max-width: 640px) {
  html:root :is(.schedule-page, #zt-sp) .ts-calendar--mobile-list .ts-day:not(.ts-day--has-items) .ts-day__num { height: auto; min-height: 0; padding: 0; border: 0; display: flex; align-items: center; justify-content: flex-start; }
}

/* Телефон: календарь без рамки и лишних отступов, мельче шрифты (таблица) */
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar .ts-cal-grid--body {
    border: 0; border-radius: 0; box-shadow: none; background: transparent;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar { border: 0; border-radius: 0; box-shadow: none; }
  /* ячейки таблицы: меньше отступы и число */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day { padding: 4px 2px 5px; gap: 3px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__num { font-size: 13px; line-height: 1.1; margin: 0 0 1px 2px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day.ts-day--today .ts-day__num { width: 20px; height: 20px; font-size: 11px; margin-left: 1px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day__items { gap: 3px; padding: 0; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item { padding: 2px 2px 3px; }
  /* «Квитки» — мельче */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-ticket {
    font-size: 5.5px; letter-spacing: 0; padding: 1px 2px; min-height: 0; line-height: 1.2; border-radius: 3px; box-shadow: none;
  }
  /* «Гастролі» — влезает в колонку */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-premiere {
    font-size: 5.5px; letter-spacing: 0; padding: 1px 3px; line-height: 1.2; border-radius: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: none;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item--guest { overflow: hidden; }
  /* поля секции и обёртки */
  #fp-calendar .fp-calendar-wrapper { padding-left: 4px; padding-right: 4px; }
  #fp-calendar .fp-calendar-wrapper > .flex, .schedule-page .schedule-page__container > :not(.ts-calendar) { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-footer { min-height: 0; gap: 2px; padding: 0; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-footer .ts-day__item-ticket {
    height: auto; min-height: 0; flex: 0 0 auto; align-self: stretch; display: block; text-align: center; font-size: 6px; padding: 2px 2px; margin: 1px 0 0; line-height: 1.1;
  }
}

/* Телефон, таблица: «настоящий» календарь — линии 1px, число в углу, 2 события + «+ ще N» */
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-grid--body { gap: 0; border-top: 1px solid #E5CDB1; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day {
    border-radius: 0; margin: 0; padding: 1px 0 2px; gap: 1px; min-height: 64px;
    border-right: 1px solid #E5CDB1; border-bottom: 1px solid #E5CDB1;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day:nth-child(7n+1) { border-left: 1px solid #E5CDB1; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__num { font-size: 10px; line-height: 1; margin: 0 0 1px 2px; padding: 0; width: auto; height: auto; min-height: 0; display: block; text-align: left; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day.ts-day--today .ts-day__num {
    display: inline-block; width: auto; height: auto; min-width: 0; border-radius: 2px; padding: 1px 3px; margin: 0; font-size: 10px; line-height: 1.1;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day__items { gap: 2px; margin: 0; padding: 0; width: 100%; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day__items--more { display: none; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day__items:not(.ts-day__items--more) .ts-day__item.ts-day__item--extra { display: block; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item { padding: 2px 1px 2px; border-radius: 2px; border-left-width: 2px; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-header { display: flex; flex-wrap: nowrap; align-items: center; gap: 1px; min-width: 0; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-time { font-size: 6.5px; letter-spacing: -.02em; white-space: nowrap; flex: 0 0 auto; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item-premiere { font-size: 4.5px; padding: 1px 2px; flex: 0 1 auto; min-width: 0; }
  /* «+ ще N подій» */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__overflow--wide { display: none; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__overflow--narrow {
    display: block; position: static; height: auto; margin: 1px 1px 0; padding: 1px 0; border-radius: 2px;
    font: 700 6px/1.2 'Manrope', system-ui, sans-serif; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__overflow--narrow::before { content: "+ "; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__overflow--narrow::after { content: none; }
}

/* Телефон, таблица: прозрачные границы дней, жёлтая — у сегодня/выбранного; красная полоса с числом у сегодня */
@media (max-width: 640px) {
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-grid--body { border: 0; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day {
    border: 1px solid transparent; background-clip: padding-box; box-shadow: none;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day:nth-child(7n+1) { border-left: 1px solid transparent; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day.ts-day--today { background: #fff; border-radius: 0; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day.ts-day--today,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day--active:hover,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day--active:focus,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day--history:hover,
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day--history:focus { border-color: #C98B5B; box-shadow: none; background-clip: border-box; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day.ts-day--today .ts-day__num {
    display: block; width: 100%; box-sizing: border-box; border-radius: 0; margin: 0 0 2px; padding: 2px 3px;
    background: linear-gradient(180deg, #B6313A, #750E17); color: #fff; text-align: left;
  }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day__date { width: 100%; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item { border-left: 1px solid #EADFD4; box-shadow: 0 1px 2px rgba(66,1,1,.06); }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day .ts-day__item--guest { border-color: #C4DDF6; box-shadow: 0 1px 2px rgba(0,40,80,.06); }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day--past .ts-day__item { border-color: #E6DED5; box-shadow: none; }
  /* сегодня: без светлой полоски над красной шапкой */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day.ts-day--today { padding-top: 0; }
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-cal-cell.ts-day.ts-day--today .ts-day__num { box-shadow: none; }
  /* выходные: заметнее зазор между днями */
  html:root :is(#fp-calendar, .schedule-page) .ts-calendar--mobile-grid .ts-day--weekend:not(.ts-day--past):not(.ts-day--other-month):not(.ts-day--today) { background-color: #fbe6c8; }
}
