/* CL-DC1c, Claude Live, 20.11.2026. Продолжение CL-DC1 и CL-DC1b: длинная нативная дата при увеличенном тексте.
   При тексте 200 % строка iPhone («сентябрь 2026 г.», «20 нояб. 2026 г.»: 16 знаков) при шрифте поля 32 px занимает
   307 px, а между стрелками на 320 и 390 у поля 160..198 px: дата обрезана. Когда ряд не вмещает стрелку, дату и стрелку
   (условие по ширине блока ряда в его же em, поэтому срабатывает только при увеличенном тексте), ряд встаёт в две строки:
   дата отдельной строкой во всю ширину (не уже 16 знаков, места под значок календаря Chrome 1.25em и полей поля 12 px;
   при нехватке поровну выходит в поля страницы, не ближе 3 px к краю экрана), под ней стрелки по краям, между ними
   «Открыть день», ниже «Текущий месяц». Области нажатия 44 x 44, шрифт, нативный выбор, значения и обработчики
   прежние. При обычном тексте условие не выполняется: вид DC1 и DC1b.
   Ставится последней строкой head (после DC1, DC1b и CH1); :not(#dc1c) поднимает вес правил над DC1 и DC1b. */
@media (max-width: 560px) {
  :root[data-live-ui="v2"] :is(
    #workout .lw-library-history .lw-calendar-toolbar-2933,
    #nutrition-root:not(.te-feed-page) form.nutrition-date,
    .lc191-picker [data-compare-history],
    .vp-calendar-toolbar
  ) { container: dc1c / inline-size; }
}

/* Пороги: 16 знаков поля (шрифт поля 16 px при шрифте блока 15 px: 10.24em; у «Питания» блок 16 px: 9.6em)
   плюс стрелки, зазоры и рамки ряда; у «Питания» и «Сравнения» до 359 px с учётом полей из DC1b. */
@container dc1c (width < calc(10.24em + 106px)) {
  :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) :is(#workout .lw-library-history .lw-calendar-toolbar-2933 > .lw-history-month, .vp-calendar-toolbar > .vp-calendar-month):not([hidden]) {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    justify-content: stretch;
    flex: 1 1 100%;
    width: auto;
    margin-inline: 0;
    max-width: 100%;
  }
  :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) :is(#workout .lw-library-history .lw-calendar-toolbar-2933 > .lw-history-month > input.lw-history-month-input, .vp-calendar-toolbar > .vp-calendar-month > input[data-vpc-month]) {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    inline-size: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
    width: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
    max-width: none;
    max-inline-size: none;
    margin-inline: min(0px, calc((100% - min(calc(16ch + 1.25em + 12px), calc(100vw - 6px))) / 2));
  }
  :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) :is(#workout .lw-library-history .lw-calendar-toolbar-2933 > .lw-history-month > .lw-history-arrow:first-child, .vp-calendar-toolbar > .vp-calendar-month > button[data-vpc-action="previous"]) {
    grid-column: 1; grid-row: 2; justify-self: start; justify-content: center; padding-inline: 0;
  }
  :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) :is(#workout .lw-library-history .lw-calendar-toolbar-2933 > .lw-history-month > .lw-history-month-input + .lw-history-arrow, .vp-calendar-toolbar > .vp-calendar-month > button[data-vpc-action="next"]) {
    grid-column: 3; grid-row: 2; justify-self: end; justify-content: center; padding-inline: 0;
  }
  :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #workout .lw-library-history .lw-calendar-toolbar-2933 > .lw-history-month > .lw-history-current:not([hidden]) {
    grid-column: 1 / -1; grid-row: 3; justify-self: center;
  }
}

/* «Сравнение»: до 359 px ряд в DC1b шире блока на поля карточки (32 px), с 360 px нет. */
@media (max-width: 359.98px) {
  @container dc1c (width < calc(10.24em + 70px)) {
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #workout .lc191 .lc191-picker [data-compare-history] > .lw-history-month:not([hidden]) {
      grid-template-columns: 44px minmax(0, 1fr) 44px;
      justify-content: stretch;
      margin-inline: 0;
      max-width: 100%;
    }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > label { grid-column: 1 / -1; grid-row: 1; justify-self: stretch; width: auto; max-width: none; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > label > input[type="month"] {
      inline-size: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      width: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      max-width: none;
      max-inline-size: none;
      margin-inline: min(0px, calc((100% - min(calc(16ch + 1.25em + 12px), calc(100vw - 6px))) / 2));
    }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > .lw-history-arrow:first-child { grid-column: 1; grid-row: 2; justify-self: start; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > label + .lw-history-arrow { grid-column: 3; grid-row: 2; justify-self: end; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > .lw-history-current:not([hidden]) { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
  }
}
@media (min-width: 360px) {
  @container dc1c (width < calc(10.24em + 104px)) {
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #workout .lc191 .lc191-picker [data-compare-history] > .lw-history-month:not([hidden]) {
      grid-template-columns: 44px minmax(0, 1fr) 44px;
      justify-content: stretch;
      margin-inline: 0;
      max-width: 100%;
    }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > label { grid-column: 1 / -1; grid-row: 1; justify-self: stretch; width: auto; max-width: none; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > label > input[type="month"] {
      inline-size: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      width: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      max-width: none;
      max-inline-size: none;
      margin-inline: min(0px, calc((100% - min(calc(16ch + 1.25em + 12px), calc(100vw - 6px))) / 2));
    }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > .lw-history-arrow:first-child { grid-column: 1; grid-row: 2; justify-self: start; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > label + .lw-history-arrow { grid-column: 3; grid-row: 2; justify-self: end; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) .lc191-picker [data-compare-history] > .lw-history-month > .lw-history-current:not([hidden]) { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
  }
}

/* «Питание»: до 359 px ряд в DC1b шире блока на левое поле страницы (18 px) и с «Открыть день», с 360 px как в DC1. */
@media (max-width: 359.98px) {
  @container dc1c (width < calc(9.6em + 126px)) {
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div:not([hidden]) {
      grid-template-columns: 44px minmax(0, 1fr) 44px;
      column-gap: 4px;
      row-gap: 6px;
      justify-content: stretch;
      margin-inline: 0;
      max-width: 100%;
    }
  }
}
@media (min-width: 360px) {
  @container dc1c (width < calc(9.6em + 158px)) {
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div:not([hidden]) {
      grid-template-columns: 44px minmax(0, 1fr) 44px;
      column-gap: 4px;
      row-gap: 6px;
      justify-content: stretch;
      margin-inline: 0;
      max-width: 100%;
    }
  }
}
/* Размещение «Питания» в две строки: те же правила при обоих порогах (ряд выше получил три колонки). */
@media (max-width: 359.98px) {
  @container dc1c (width < calc(9.6em + 126px)) {
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > input#ration-date {
      grid-column: 1 / -1; grid-row: 1; justify-self: center;
      inline-size: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      width: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      max-width: none; max-inline-size: none;
      margin-inline: min(0px, calc((100% - min(calc(16ch + 1.25em + 12px), calc(100vw - 6px))) / 2));
    }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > button[data-day="-1"] { grid-column: 1; grid-row: 2; justify-self: start; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > button[data-day="1"] { grid-column: 3; grid-row: 2; justify-self: end; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > button[type="submit"] { grid-column: 2; grid-row: 2; justify-self: center; }
  }
}
@media (min-width: 360px) {
  @container dc1c (width < calc(9.6em + 158px)) {
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > input#ration-date {
      grid-column: 1 / -1; grid-row: 1; justify-self: center;
      inline-size: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      width: max(100%, min(calc(16ch + 1.25em + 12px), calc(100vw - 6px)));
      max-width: none; max-inline-size: none;
      margin-inline: min(0px, calc((100% - min(calc(16ch + 1.25em + 12px), calc(100vw - 6px))) / 2));
    }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > button[data-day="-1"] { grid-column: 1; grid-row: 2; justify-self: start; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > button[data-day="1"] { grid-column: 3; grid-row: 2; justify-self: end; justify-content: center; padding-inline: 0; }
    :root[data-live-ui="v2"]:not(#dc1c):not(#dc1c) #nutrition-root:not(.te-feed-page) form.nutrition-date > div > button[type="submit"] { grid-column: 2; grid-row: 2; justify-self: center; }
  }
}
