/* Компоненты ниже первого экрана. Токены, база и всё, что бывает на первом экране любой страницы, в critical.css */

/* Карточки */
.card h3 { margin-bottom: 6px; }
.card--link { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s; }
.card--link:hover { color: inherit; box-shadow: var(--shadow-lg); }
.card--link:focus-visible { outline-offset: 3px; }
/* Билет: маршрут, дата, цена и кнопка */
.ticket { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.ticket__route { font-weight: 700; }
.ticket__meta { grid-column: 1; font-size: .875rem; color: var(--muted); }
.ticket__price { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.ticket__logo { width: 72px; height: 32px; object-fit: contain; }
.ticket .btn { grid-column: 1 / -1; margin-top: 8px; }

/* Цены и бейджи */
.price { font-weight: 700; font-size: 1.25rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { font-size: .75em; font-weight: 500; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--blue-50); color: var(--blue-700);
}
.badge--price { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.badge--cheap { background: var(--green-50); color: var(--green-700); }
.badge--hot { background: var(--magenta-50); color: var(--magenta-700); }
.badge--muted { background: var(--bg); color: var(--muted); }
a.badge { text-decoration: none; }
a.badge--price:hover { box-shadow: inset 0 0 0 1px var(--blue-700); color: var(--blue-700); }

/* Таблица, которая на телефоне становится карточками: у td есть data-label */
.rtable { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font-variant-numeric: tabular-nums; }
.rtable th, .rtable td { padding: 12px 16px; text-align: left; vertical-align: middle; }
.rtable thead th { font-size: .8125rem; font-weight: 600; color: var(--muted); background: var(--bg); }
.rtable tbody tr + tr { border-top: 1px solid var(--line); }
.rtable .num { text-align: right; }
.rtable a { font-weight: 600; }
@media (max-width: 639px) {
  .rtable, .rtable tbody, .rtable tr, .rtable td, .rtable th { display: block; }
  .rtable { background: none; box-shadow: none; overflow: visible; }
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rtable tbody { display: grid; gap: 10px; }
  .rtable tbody tr { padding: 6px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .rtable tbody tr + tr { border-top: 0; }
  .rtable td, .rtable tbody th { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 6px 0; text-align: right; }
  .rtable td + td { border-top: 1px solid var(--line); }
  .rtable td::before, .rtable tbody th::before { content: attr(data-label); font-size: .875rem; font-weight: 400; color: var(--muted); text-align: left; }
  .rtable td:not([data-label])::before, .rtable td[data-label=""]::before { display: none; }
  .rtable td:first-child { font-weight: 700; }
}

/* Вкладки и лента месяцев */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tab {
  flex: none; display: grid; justify-items: center; min-width: 76px; min-height: var(--tap); padding: 6px 12px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: .875rem; text-decoration: none;
}
.tab small { color: var(--muted); font-variant-numeric: tabular-nums; }
.tab[aria-current=true], .tab[aria-selected=true], .tab.is-active { background: var(--blue-700); color: #fff; box-shadow: none; }
.tab[aria-current=true] small, .tab[aria-selected=true] small, .tab.is-active small { color: rgb(255 255 255 / .85); }

/* Заглушка загрузки */
.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, #e9edf3 25%, #f4f6fa 50%, #e9edf3 75%) 0 0/200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .sticky-cta { transition: none; } }

/* Выпадающие части формы поиска: подсказки городов и пассажиры */
.ac { position: relative; }
.ac-list {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: min(60vh, 360px); margin: 0; padding: 4px 0; overflow-y: auto;
  list-style: none; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); color: var(--text);
}
.ac-list li { position: relative; min-height: var(--tap); padding: 10px 64px 10px 16px; cursor: pointer; line-height: 1.3; color: var(--muted); }
.ac-list li + li { border-top: 1px solid var(--line); }
.ac-list li b { font-weight: 600; color: var(--text); }
.ac-list li span { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); font-size: .8125rem; font-weight: 600; }
.ac-list li:hover, .ac-list [aria-selected=true] { background: var(--blue-50); }
.sf__pax-body {
  position: absolute; z-index: 30; top: 60px; right: 0; width: min(340px, calc(100vw - 32px)); padding: 8px 16px 16px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); color: var(--text);
}
.sf__count { display: flex; align-items: center; gap: 4px; min-height: 56px; }
.sf__count + .sf__count { border-top: 1px solid var(--line); }
.sf__count label { flex: 1; font-size: .9375rem; line-height: 1.25; }
.sf__count input { width: 36px; padding: 0; border: 0; background: none; text-align: center; font-weight: 700; font-size: 1.0625rem; -moz-appearance: textfield; }
.sf__count input::-webkit-inner-spin-button, .sf__count input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sf__step {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%;
  background: var(--blue-50); color: var(--blue-700); font-size: 1.375rem; font-weight: 600;
}
html:not(.js) .sf__step { display: none; }
.sf__check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); margin: 4px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.sf__check input { width: 22px; height: 22px; accent-color: var(--blue-700); }

/* Липкая кнопка поиска на телефоне */
.sticky-cta {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -4px 20px rgb(16 48 107 / .15);
  transform: translateY(110%); transition: transform .2s ease-out; visibility: hidden;
}
.sticky-cta.is-visible { transform: none; visibility: visible; }
.sticky-cta__info { flex: 1; min-width: 0; font-size: .875rem; line-height: 1.3; }
/* По строке на маршрут и цену: панель всегда в высоту кнопки и не наезжает на подвал */
.sticky-cta__info > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-cta__info b { font-size: 1rem; text-overflow: clip; }
.sticky-cta .btn { flex: 1 0 auto; }
.sticky-cta__info + .btn { flex: none; padding-inline: 20px; }
/* Цена важнее значка: на узком экране кнопка без лупы, чтобы цена влезала целиком */
@media (max-width: 419px) { .sticky-cta__info + .btn { padding-inline: 14px; } .sticky-cta__info + .btn .icon { display: none; } }
/* Место под панелью внутри подвала: отступ у body давал под подвалом полосу цвета страницы */
@media (max-width: 1023px) { .has-sticky-cta .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); } }
@media (min-width: 1024px) { .sticky-cta { display: none; } }

/* Страницы */
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cta-card { display: grid; gap: 8px; justify-items: start; margin-top: var(--section); }
.cta-card .card__title, .cta-card .card__meta { margin: 0; }
.notice--warn { background: #fff6e5; }
.notice--warn .icon { color: #a35a00; }
.map-frame, .board-frame { display: block; width: 100%; border: 0; border-radius: var(--radius); background: var(--surface); }
.board-frame { height: 660px; max-width: 1000px; margin-top: 16px; }
.widget-frame { min-height: 400px; }

.dest-card { display: flex; flex-direction: column; }
.dest-card .card__title a { color: inherit; text-decoration: none; }
.dest-card .card__title a:hover { color: var(--blue-700); }
.dest-card__lines { margin: 8px 0 0; padding: 0; list-style: none; }
.dest-card__lines .card__row a:first-child { color: var(--text); }


.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 16px 0 20px; padding: 0; list-style: none; }
.feature { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-weight: 500; line-height: 1.35; }
.feature .icon { padding: 8px; box-sizing: content-box; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); }

.article-card .card__media { aspect-ratio: 16 / 7; }

/* Фото и цены из других городов (разметка бывает из кеша PHP, классы старые) */
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 0; padding: 0; list-style: none; }
.gallery li { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--blue-50); }
.gallery .gallery__big { grid-column: span 2; }
.gallery a { display: block; height: 100%; }
.gallery figure { position: relative; height: 100%; margin: 0; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery .photo-credit { position: absolute; inset: auto 0 0; padding: 2px 6px; background: rgb(0 0 0 / .45); color: #fff; }
.gallery .photo-credit a { color: inherit; }
.cheap-tickets-content { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.cheap-ticket { padding: 6px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.cheap-ticket-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.cheap-ticket-line + .cheap-ticket-line { border-top: 1px solid var(--line); }
.cheap-ticket-line-right { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.graph { display: block; max-width: 100%; height: auto; border-radius: var(--radius); background: var(--surface); }
.chip.is-active { background: var(--blue-700); color: #fff; box-shadow: none; }

/* Таблица агентств /oplata на kz */
.oplata_site { margin-top: var(--section); overflow-x: auto; }
.table_oplata { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: .9375rem; }
.table_oplata th, .table_oplata td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.table_oplata th { background: var(--bg); color: var(--muted); font-size: .8125rem; }
.table_oplata p { margin: 4px 0 0; color: var(--muted); }

/* Календарь цен: у дня цена всех рейсов и прямых, показ выбирает data-mode */
.mm { margin-top: 12px; }
.mm__filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 12px; }
.mm__filter .chip { min-height: 36px; font-size: .875rem; cursor: pointer; border: 0; }
.mm__filter .chip[aria-pressed=true] { background: var(--blue-700); color: #fff; box-shadow: none; }
.mm__filter .note { margin: 0 0 0 auto; }
html:not(.js) .mm__filter .chip { display: none; }
.mm turbo-frame { display: block; transition: opacity .2s; }
.mm turbo-frame[aria-busy=true] { opacity: .5; }
turbo-frame[id^="offers-page-"] { display: block; }
turbo-frame[id^="offers-page-"][aria-busy=true] { opacity: .5; }
.mm__grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.mm__grid caption { padding: 0 3px 6px; text-align: left; font-weight: 600; }
.mm__grid th { padding: 4px 0; font-size: .75rem; font-weight: 600; color: var(--muted); }
.mm__grid th.is-weekend { color: var(--magenta-700); }
.mm__grid td { height: 52px; padding: 0; vertical-align: top; border-radius: 8px; font-size: .75rem; color: var(--muted); }
.mm__grid td.is-past { padding: 4px; background: var(--bg); }
.mm__grid a { display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-height: 52px; padding: 4px 4px 5px; border-radius: 8px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); line-height: 1; text-decoration: none; }
.mm__grid a:hover { box-shadow: inset 0 0 0 2px var(--blue-700); }
.mm__p { font-weight: 700; line-height: 1.1; text-align: right; color: var(--blue-700); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm[data-mode=all] .mm__p--direct, .mm[data-mode=direct] .mm__p:not(.mm__p--direct) { display: none; }
.mm[data-mode=all] .is-min a, .mm[data-mode=direct] .is-min-direct a { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--green-700); }
.mm[data-mode=all] .is-min .mm__p, .mm[data-mode=direct] .is-min-direct .mm__p { color: var(--green-700); }
@media (max-width: 419px) { .mm__grid a { padding-inline: 2px; } .mm__p { font-size: .625rem; letter-spacing: -.02em; } }
@media (min-width: 640px) { .mm__grid td, .mm__grid a { height: 60px; min-height: 60px; } .mm__p { font-size: .875rem; } }

/* График цен по месяцам */
.chart__box { padding: 12px 12px 6px; }
.chart__svg { display: block; width: 100%; height: 120px; }
.chart__bar { fill: #b9c8e6; }
.chart__bar--min { fill: var(--green-700); }
.chart__labels { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.chart__lab { display: grid; justify-items: center; min-height: var(--tap); padding: 4px 0; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: .6875rem; line-height: 1.2; }
.chart__lab b { color: var(--text); font-weight: 600; text-align: center; }
.chart__lab--min b, .chart__lab--min span { color: var(--green-700); }
.chart__lab:hover { background: var(--blue-50); }
@media (max-width: 639px) { .chart__lab b { display: none; } .chart__lab--min b { display: block; font-size: .625rem; } }
@media (min-width: 640px) { .chart__lab { font-size: .8125rem; } .chart__svg { height: 160px; } }

/* Направление */
.ticket--best { box-shadow: inset 0 0 0 2px var(--green-700), var(--shadow); }
.flights { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin: 0; padding: 0; list-style: none; }
.flight { display: grid; gap: 6px; }
.flight__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flight__times { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Стрелка маской, а не инлайновым SVG: на направлении бывает сотня рейсов */
.flight__times i { flex: none; width: 16px; height: 16px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.flight__times small { margin-left: auto; font-size: .875rem; font-weight: 500; color: var(--muted); }
.flight__days { font-size: .8125rem; color: var(--muted); }
.more { margin-top: 12px; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { margin-bottom: 12px; }
.airline-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; padding: 0; list-style: none; }
.airline-tile { display: grid; gap: 8px; justify-items: start; padding: 12px; }
.airline-tile a { display: grid; gap: 6px; color: var(--text); text-decoration: none; font-size: .875rem; font-weight: 600; }
.airline-tile img { width: 120px; height: 30px; object-fit: contain; object-position: left center; }
.dest-mini { display: grid; gap: 8px; justify-items: start; }
.cta-row { text-align: center; }
.section-gap { margin-top: 16px; }
.widget-box { overflow-x: auto; }
.rtable small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
@media (max-width: 639px) { .rtable small { display: inline; margin-left: 6px; } }
@media (max-width: 639px) {
  .price-tickets-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 10px 14px; }
  .price-tickets-table tbody th { grid-column: 1 / -1; justify-content: flex-start; min-height: 0; padding: 0 0 6px; }
  .price-tickets-table tbody th::before { display: none; }
  .price-tickets-table td, .price-tickets-table td + td { display: grid; justify-items: start; align-content: start; gap: 2px; min-height: 0; padding: 0; border: 0; text-align: left; font-weight: 400; }
  .price-tickets-table td::before { font-size: .75rem; }
  .price-tickets-table td small { margin: 0; }
}
.price-facts .strong-title { display: block; margin-bottom: 8px; font-size: 1.25rem; }

/* Варианты рядом с направлением: соседний город или пересадка, кнопка прижата к низу карточки */
.alt { display: flex; flex-direction: column; gap: 8px; }
.alt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.alt__route { font-weight: 700; }
.alt__meta { margin: 0; font-size: .875rem; color: var(--muted); }
.alt__facts, .alt__legs { margin: 0; padding: 0; list-style: none; font-size: .875rem; color: var(--muted); }
.alt__legs li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: var(--tap); }
.alt__legs li + li { border-top: 1px solid var(--line); }
.alt__legs b { color: var(--text); white-space: nowrap; }
.alt .btn { margin-top: auto; }
/* Цены по месяцам в три узкие колонки помещаются и на телефоне, карточки на каждый месяц растянули бы блок на несколько экранов */
.season { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.season th, .season td { padding: 10px 12px; text-align: left; }
.season thead th { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.season tbody tr + tr { border-top: 1px solid var(--line); }
.season .num { text-align: right; white-space: nowrap; }
.season a { font-weight: 600; }
.season .is-min a { color: var(--green-700); }

/* Витрина /design */
.swatches { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.swatch { overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-size: .8125rem; }
.swatch i { display: block; height: 56px; }
.swatch span { display: block; padding: 8px 10px; }
.demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Календарь дат формы поиска: на телефоне шторка на весь экран с месяцами лентой, шире выпадающая панель на один или два месяца */
.dp {
  position: absolute; z-index: 40; width: max-content; max-width: 100%; padding: 12px 12px 10px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); color: var(--text);
}
.dp[hidden] { display: none; }
.dp__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 4px; }
.dp__title { font-size: 1rem; }
.dp__close, .dp__nav { width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.dp__close:hover, .dp__nav:hover:not(:disabled) { background: var(--blue-50); }
.dp__nav:disabled { opacity: .3; cursor: default; }
.dp__week { display: none; }
.dp__body { position: relative; }
.dp__nav { position: absolute; z-index: 1; top: -4px; }
.dp__nav--prev { left: 0; }
.dp__nav--next { right: 0; }
.dp__months { position: relative; display: flex; gap: 20px; }
.dp__month h3 { margin: 0; height: 36px; font-size: 1rem; line-height: 36px; text-align: center; }
.dp__month table { border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.dp__month th { width: 46px; height: 28px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.dp__month th.is-weekend { color: var(--magenta-700); }
.dp__month td { padding: 0; }
.dp__day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-width: 44px; height: 48px; padding: 0 1px;
  border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: .9375rem; line-height: 1.1; cursor: pointer;
}
.dp__day:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--blue-700); }
.dp__day:disabled { color: #b4bccb; cursor: default; }
.dp__day[aria-current=date] span { text-decoration: underline; text-underline-offset: .2em; }
.dp__p { font-size: .6875rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
.dp__p:empty { display: none; }
.dp__day.is-cheap { background: var(--green-50); }
.dp__day.is-cheap .dp__p, .dp__day.is-min .dp__p { color: var(--green-700); }
.dp__day.is-min { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--green-700); }
.dp__day[aria-pressed=true], .dp__day[aria-pressed=true]:hover { background: var(--blue-700); box-shadow: none; color: #fff; }
.dp__day[aria-pressed=true] .dp__p { color: #fff; }
.dp__day:disabled .dp__p { display: none; }
.dp__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 0; }
.dp__note { margin: 0; font-size: .75rem; color: var(--muted); }
.dp__clear { min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: .875rem; cursor: pointer; }
.dp__clear:hover { background: var(--blue-50); }
@media (max-width: 639px) {
  .dp-lock { overflow: hidden; }
  .dp { position: fixed; inset: 0; display: flex; flex-direction: column; width: auto; max-width: none; padding: 0; border-radius: 0; box-shadow: none; }
  .dp__head { padding: 6px 4px 6px 16px; border-bottom: 1px solid var(--line); }
  .dp__week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 8px; font-size: .75rem; font-weight: 600; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
  .dp__week span:nth-child(n+6) { color: var(--magenta-700); }
  .dp__body { flex: 1; min-height: 0; }
  .dp__nav, .dp__month thead { display: none; }
  .dp__months { flex-direction: column; gap: 8px; height: 100%; padding: 0 8px 16px; overflow-y: auto; overscroll-behavior: contain; }
  .dp__month h3 { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; padding-left: 8px; }
  .dp__month table { width: 100%; }
  .dp__day { height: 52px; }
  .dp__foot { padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
}
