/* Новые рабочие сценарии поверх неизменённого макета заказчика. */
.choice-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trial-callout { display:flex; align-items:center; gap:24px; margin-top:24px; padding:28px; border:1px solid rgba(255,226,44,.45); border-radius:28px; background:rgba(255,226,44,.07); }
.trial-callout[hidden] { display:none; }
.trial-callout h3 { margin:0 0 8px; color:var(--sun); font-size:24px; }
.trial-callout p { margin:0; color:var(--text-2); }
.trial-callout__button { flex:none; white-space:nowrap; }
.hero__actions .btn--trial { border-color:var(--sun); color:var(--sun); }
.gift-order-card { display:grid; grid-template-columns:minmax(0, 1.5fr) minmax(0, 1fr); gap:40px; padding:32px; border:1px solid var(--line); border-radius:32px; background:var(--ground-2); }
.gift-order-card h2 { font-size:clamp(26px, 3vw, 40px); }
.gift-order-card p { color:var(--text-2); }
.gift-order-form { align-self:center; min-width:0; }
.gift-order-form .btn { width:100%; }
.gift-order-price { font-size:32px; font-weight:700; }
.gift-order-form [hidden] { display:none; }
.gift-order-form input[type=checkbox] { appearance:auto; padding:0; border-radius:0; width:20px; height:20px; accent-color:var(--sun); vertical-align:middle; }
@media (max-width:900px) { .gift-order-card { grid-template-columns:1fr; gap:24px; padding:24px; } }
@media (max-width:640px) {
  .trial-callout { align-items:stretch; flex-direction:column; gap:20px; padding:24px 20px; }
  .trial-callout__button { white-space:normal; text-align:center; min-height:52px; }
  #formatFields .choice-grid { grid-template-columns:1fr; }
}

/* Корзина витрины (спецификация 2026-10-13-storefront-cart, 8.2–8.4): шаг «Книги», плашка снизу на телефоне,
   «Заказ · N» в шапке, строка корзины под кнопками карточки. Раскладка телефона — та же граница, что в site.css. */
/* «Заказ · N» — своя кнопка только на узком телефоне, где «Выбрать книгу» скрыта; шире её роль играет .top__cta. */
.top__cart { display: none; }
.cart-list { display: grid; gap: 12px; margin-bottom: 4px; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; }
.cart-line__main { display: grid; gap: 4px; min-width: 0; }
.cart-line__main b { overflow-wrap: anywhere; }
.cart-line__price { color: var(--text-2); }
.cart-line__books { color: var(--text-3); font-size: 14px; overflow-wrap: anywhere; }
.cart-line .btn-text { flex: none; }
.cart-empty, .cart-notice, .cart-total { color: var(--text-2); }
.cart-total b { color: #fff; }
.cart-warning, .cart-waiting { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--sun); border-radius: 18px; color: var(--text-2); }
.cart-warning[hidden], .cart-waiting[hidden] { display: none; }
.cart-warning .btn { justify-self: start; white-space: normal; text-align: left; }
.cart-hint { padding: 12px 16px; border: 1px dashed rgba(255, 255, 255, .3); border-radius: 18px; color: var(--text-2); }
.cart-hint .btn { margin-top: 8px; white-space: normal; }
.cart-hints { display: grid; gap: 10px; margin: 10px 0; }
.cart-hints:empty { display: none; }
.cart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 12px; }
.cart-manual { margin: 4px 0 12px; }
.cart-manual summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.cart-manual[open] summary { margin-bottom: 12px; }
.cart-manual .btn { margin-top: 8px; }
.series__cart { display: grid; gap: 8px; margin-top: 12px; }
.series__cart-line { color: var(--text-2); }
.series__cart-refusal { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--sun); border-radius: 16px; color: var(--text-2); }
/* Отказ под «В заказ» — своей строкой в ряду кнопок карточки, «Содержание» — под ним (проверка 13.10). */
.series__actions > .series__cart-refusal { flex: 1 1 100%; }
.series__cart-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.series__set-done { flex: none; color: var(--mint); font-weight: 700; }
.month.is-in-cart { border-color: var(--mint); }
.btn.is-in-cart { box-shadow: inset 0 0 0 2px var(--mint); }
.summary__promise p { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.summary__promise[hidden] { display: none; }
/* Строки итога: длинная подпись позиции («Первое полугодие · … · по цене первой покупки») не сжимает сумму до столбика
   «1 / 690 / ₽» — подпись берёт остаток строки, сумма переносится, только если сама не влезает. Не nowrap: строка
   «−1 169 ₽ · предварительно» на 320–390 px распирала бы список шире карточки и обрезала все суммы. */
.summary__list span { flex: 1 1 0%; }
.toc__refusal { display: grid; gap: 8px; margin-top: 12px; color: var(--text-2); }
.toc__refusal[hidden] { display: none; }
.toc__refusal .btn { justify-self: start; }
/* Плашка снизу: ниже плашки приглашения (40) и окон; место под ней — отступом у body, пока она видна. */
.cart-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(9, 10, 20, .96); border-top: 1px solid rgba(255, 255, 255, .12);
  color: #fff; font-weight: 600; }
.cart-bar[hidden], .cart-bar .btn[hidden] { display: none; }
.cart-bar .btn { flex: none; }
/* Отказ «одна позиция» в плашке: текст — первой строкой, [Заменить] [Оформить] — второй, справа (проверка 13.10). */
.cart-bar.is-refusal { flex-wrap: wrap; row-gap: 8px; }
.cart-bar.is-refusal #cartBarText { flex: 1 1 100%; font-size: 14px; line-height: 1.35; }
.cart-bar.is-refusal #cartBarReplace { margin-left: auto; }
body.has-cart-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
/* Плашка с отказом — две строки и кнопки (≈ 110 px на 320–390): отступ по ней, низ подвала не уходит под плашку. */
body.has-cart-bar-refusal { padding-bottom: calc(116px + env(safe-area-inset-bottom)); }
@media (max-width: 899px), (max-width: 1099px) and (orientation: portrait) {
  .series__cart-line { display: none; }
}
@media (max-width: 640px) {
  .top__cart { display: inline-flex; flex: none; height: 44px; padding: 0 14px; font-size: 15px; white-space: nowrap; }
  .top__cart[hidden] { display: none; }
}
@media (max-width: 420px) {
  .top { gap: 8px; }
  .top__cart, .top .top__account { padding: 0 10px; font-size: 14px; }
  .cart-line { flex-direction: column; }
}
/* Уже 360 px логотип, «Войти», «Заказ · N» и меню в ряд не помещаются — меню уходило за правый край. Пока в заказе
   есть книги (.top--cart ставит main.js, paintCart; не :has — его нет в Safari до 15.4), «Войти» прячем: кабинет
   остаётся в меню («Кабинет родителя»), вход — на шаге «Аккаунт». */
@media (max-width: 359px) {
  .top--cart .top__account { display: none; }
  .top--cart .top__cart { margin-left: auto; }
}
/* 360–379 px: у вошедшего «Кабинет» шире «Войти» — меню заходило за край на 2 px, при «Заказ · 12» на 10 px (замер 13.10).
   Плотнее ряд и поля кнопок — меню целиком в окне. */
@media (max-width: 379px) {
  .top { gap: 6px; }
  .top__cart, .top .top__account { padding: 0 8px; }
}
/* 320 px: крупная цена итога «≈ 1 690 ₽» переносила «₽» на новую строку — на самых узких экранах цифра чуть меньше. */
@media (max-width: 340px) {
  .summary__price { white-space: nowrap; }
  .summary__price b { font-size: 44px; }
}
