/* ============================================================
   insAIder Mini App · витрина покупателя (CRM #4070)
   Подключается после tokens.css и components.css.
   Цвета — только токены DS. Основной экран — телефон: ссылку
   на витрину присылают в WhatsApp, она открывается в браузере.
   Поля ввода — 16px: при меньшем шрифте iPhone увеличивает
   страницу, как только покупатель коснулся поля.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.ma {
  margin: 0; min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg-app); color: var(--text-primary);
  font-family: var(--font-ui); font-size: var(--text-base); line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
/* Сбросы — селекторами элементов: у них самый низкий вес, и любой класс
   (.btn, .wm, .ma-tile, .ma-lead) их перекрывает. */
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--teal-500); text-decoration: none; }
svg { flex: 0 0 auto; }
.ma [hidden] { display: none !important; }
.ma a:focus-visible, .ma button:focus-visible, .ma select:focus-visible, .ma-chip:focus-within {
  outline: 2px solid var(--border-focus); outline-offset: 2px;
}
.ma .btn { justify-content: center; }
.ma .num { white-space: nowrap; }

.ma-wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.ma-clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.ma-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* --- шапка ------------------------------------------------- */
.ma-head { background: var(--surface); padding-top: env(safe-area-inset-top); }
.ma-head__row { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 6px; }
.ma-head__brand { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; }
.ma-head__title {
  font-family: var(--font-brand); font-weight: 600; font-size: var(--text-xl);
  letter-spacing: -0.02em; line-height: 1.15; color: var(--brand-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ma-head__sub {
  font-size: var(--text-sm); color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ma-head__sub:empty { display: none; }
.ma-head__call {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--brand-navy);
}
.ma-head__call.is-wa { color: var(--green-700); }

/* --- поиск (липкая полоса) -------------------------------- */
.ma-bar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 0 10px; transition: box-shadow var(--dur-base) var(--ease-out);
}
.ma-bar.is-stuck { box-shadow: var(--shadow-md); }
.ma-search { position: relative; margin: 0; }
.ma-search__icon {
  position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  fill: none; stroke: var(--text-tertiary); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.ma-search__input {
  width: 100%; height: 44px; margin: 0; padding: 0 44px 0 40px;
  font-family: var(--font-ui); font-size: 16px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-md);
  -webkit-appearance: none; appearance: none; outline: none;
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.ma-search__input::placeholder { color: var(--text-muted); }
.ma-search__input::-webkit-search-cancel-button,
.ma-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.ma-search__input:focus { background: var(--surface); border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--cyan-100); }
.ma-search__clear {
  position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-tertiary);
}
.ma-search__clear svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* --- основная колонка ------------------------------------- */
.ma-main { flex: 1 0 auto; padding-top: 16px; padding-bottom: 32px; outline: none; }
.ma-sec + .ma-sec { margin-top: 28px; }
.ma-sec__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ma-h2 { font-family: var(--font-ui); font-weight: 600; font-size: var(--text-lg); line-height: 1.25; color: var(--text-primary); }
.ma-h1 {
  font-family: var(--font-ui); font-weight: 600; font-size: var(--text-2xl);
  letter-spacing: -0.01em; line-height: 1.2; color: var(--text-primary); overflow-wrap: anywhere;
}
.ma-count { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-lead { margin-top: 4px; font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-crumb {
  display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 6px -4px; padding: 6px 4px;
  font-size: var(--text-base); font-weight: 500; color: var(--teal-500); border-radius: var(--radius-sm);
}
.ma-crumb .ma-ico { width: 18px; height: 18px; stroke-width: 2; }
.ma-page-head { margin-bottom: 16px; }

/* --- плитки групп ------------------------------------------ */
.ma-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ma-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  min-height: 74px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast);
}
.ma-tile__name { font-weight: 600; font-size: var(--text-base); line-height: 1.3; }
.ma-tile__count { font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-tile:active { transform: scale(0.98); }

/* --- панель сортировки ------------------------------------- */
.ma-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ma-select { position: relative; display: inline-flex; }
.ma-select select {
  height: 38px; margin: 0; padding: 0 34px 0 12px; max-width: 100%;
  font-family: var(--font-ui); font-size: 16px; color: var(--text-primary);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.ma-select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--text-tertiary); border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg); pointer-events: none;
}
.ma-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-primary);
  font-size: var(--text-base); font-weight: 500; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.ma-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ma-chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; display: none; }
.ma-chip.is-on { background: var(--brand-navy); border-color: var(--brand-navy); color: var(--text-inverse); }
.ma-chip.is-on svg { display: block; }

/* --- товары: плитки с фото --------------------------------- */
.ma-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ma-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast);
}
.ma-card:active { transform: scale(0.985); }
.ma-card__img {
  position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border-bottom: 1px solid var(--border-soft); overflow: hidden;
}
.ma-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.ma-card__img.is-empty, .ma-row__thumb.is-empty { background: var(--surface-2); }
.ma-ph { width: 38%; height: 38%; max-width: 72px; fill: none; stroke: var(--navy-300); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round; }
.ma-card.is-out .ma-card__img img, .ma-row.is-out .ma-row__thumb img { opacity: 0.55; }
.ma-card__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.ma-card__name { font-size: var(--text-base); font-weight: 500; line-height: 1.3; min-height: 2.6em; }
.ma-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }

/* --- товары: строки (каталог без фото) --------------------- */
.ma-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ma-row {
  display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast);
}
.ma-row:active { transform: scale(0.99); }
.ma-row__thumb {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: var(--radius-sm); overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border-soft);
}
.ma-row__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ma-row__thumb .ma-ph { width: 26px; height: 26px; }
.ma-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ma-row__name { font-size: var(--text-base); font-weight: 500; line-height: 1.3; }
.ma-row__info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ma-row__side { flex: 0 0 auto; max-width: 45%; text-align: right; padding-top: 1px; }

.ma-code { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ma-price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600;
  font-size: var(--text-md); color: var(--text-primary); white-space: nowrap; }
.ma-price--none { font-family: var(--font-ui); font-weight: 500; font-size: var(--text-sm); color: var(--text-tertiary); white-space: normal; }

/* --- «показать ещё», пусто, ошибка, загрузка --------------- */
.ma-more { display: flex; justify-content: center; margin-top: 16px; }
.ma-more .btn { width: 100%; max-width: 360px; }
.ma-empty { text-align: center; padding: 40px 16px; }
.ma-empty__icon { width: 44px; height: 44px; margin: 0 auto 12px; fill: none; stroke: var(--navy-300);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ma-empty__title { font-size: var(--text-md); font-weight: 600; color: var(--text-primary); }
.ma-empty__text { margin-top: 6px; font-size: var(--text-base); color: var(--text-secondary); }
.ma-empty .btn { margin-top: 16px; }
.ma-error { align-items: center; flex-wrap: wrap; }
.ma-error__text { flex: 1 1 200px; }
.ma-error .btn { flex: 0 0 auto; }
.ma-error--more { margin-top: 16px; }

.ma-skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: ma-shimmer 1.4s ease infinite; border-radius: var(--radius-xs);
}
@keyframes ma-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ma-skel--img { aspect-ratio: 1 / 1; border-radius: 0; }
.ma-skel--line { height: 12px; }
.ma-skel--w60 { width: 60%; }
.ma-skel--w40 { width: 40%; }
.ma-skel--tile { min-height: 74px; border-radius: var(--radius-md); }
.ma-card--skel, .ma-row--skel { pointer-events: none; }
.ma-row--skel { min-height: 68px; }
.ma-row--skel .ma-row__side { width: 72px; }
.ma-loading { min-height: 50vh; }

/* --- карточка товара (шторка) ------------------------------ */
.ma-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.ma-sheet__scrim {
  position: absolute; inset: 0; background: var(--navy-900); opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}
.ma-sheet.is-open .ma-sheet__scrim { opacity: 0.45; }
.ma-sheet__panel {
  position: relative; display: flex; flex-direction: column; width: 100%;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-xl); overflow: hidden; outline: none;
  transform: translateY(100%); transition: transform var(--dur-slow) var(--ease-out);
}
.ma-sheet.is-open .ma-sheet__panel { transform: none; }
.ma-sheet__panel::before {
  content: ""; position: absolute; z-index: 3; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: var(--radius-pill); background: var(--navy-200);
}
.ma-sheet__body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}
.ma-sheet__close {
  position: absolute; z-index: 4; top: 12px; right: 12px; width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--surface); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-pill); box-shadow: var(--shadow-md);
}
.ma-sheet__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.ma-pd__media {
  aspect-ratio: 1 / 1; max-height: 52vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border-bottom: 1px solid var(--border-soft);
}
.ma-pd__media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.ma-pd__info { padding: 22px 16px 28px; }
.ma-pd__head { padding-right: 44px; }
.ma-pd--media .ma-pd__head { padding-right: 0; }
.ma-pd__cat { display: inline-block; font-size: var(--text-sm); font-weight: 500; color: var(--teal-500); margin-bottom: 6px; }
.ma-pd__title { font-weight: 600; font-size: var(--text-xl); line-height: 1.25; color: var(--text-primary); overflow-wrap: anywhere; }
.ma-pd__codes { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--font-mono);
  font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-pd__buy { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ma-pd__price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600;
  font-size: var(--text-3xl); letter-spacing: -0.02em; line-height: 1.1; color: var(--text-primary); white-space: nowrap; }
.ma-pd__price.ma-price--none { font-family: var(--font-ui); font-size: var(--text-lg); letter-spacing: 0; }
.ma-pd__unit { font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-pd__actions { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ma-pd__actions .btn { width: 100%; }
.ma-btn-wa { background: var(--green-700); border-color: var(--green-700); color: var(--text-inverse); }
.ma-pd__sec { margin-top: 24px; }
.ma-pd__h { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.ma-pd__desc { font-size: var(--text-base); line-height: 1.55; color: var(--text-secondary); white-space: pre-line; overflow-wrap: anywhere; }
.ma-kv { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.ma-kv dt, .ma-kv dd { padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: var(--text-base); overflow-wrap: anywhere; }
.ma-kv dt { color: var(--text-tertiary); padding-right: 12px; }
.ma-kv dd { color: var(--text-primary); }
.ma-stores li { padding: 10px 0; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 12px; }
.ma-stores__name { font-weight: 500; }
.ma-stores__addr { font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-stores__qty { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ma-pd__missing { padding: 64px 16px 40px; }
.ma-pd__skel { display: grid; gap: 10px; padding-top: 6px; }
.ma-skel--title { height: 24px; width: 85%; }
.ma-skel--price { height: 32px; width: 45%; margin-top: 10px; }
.ma-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- всплывающее сообщение --------------------------------- */
.ma-toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  font-size: var(--text-base); font-weight: 500;
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.ma-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ma-toast svg { width: 18px; height: 18px; fill: none; stroke: var(--green-700); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* --- подвал ------------------------------------------------ */
.ma-foot {
  margin-top: 8px; background: var(--surface); border-top: 1px solid var(--border);
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
}
.ma-foot__in { display: flex; flex-direction: column; gap: 18px; }
.ma-foot__name { font-weight: 600; font-size: var(--text-md); }
.ma-foot__sub { margin-top: 2px; font-size: var(--text-sm); color: var(--text-secondary); }
.ma-foot__list { margin-top: 10px; display: grid; gap: 6px; font-size: var(--text-base); }
.ma-foot__list li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-secondary); overflow-wrap: anywhere; }
.ma-foot__list .ma-ico { width: 18px; height: 18px; margin-top: 1px; color: var(--text-tertiary); }
.ma-foot__by { font-size: var(--text-sm); color: var(--text-tertiary); }
.ma-foot__by .wm, .ma-msg__by .wm { font-size: var(--text-md); }

/* --- служебная страница (нет витрины, пауза) --------------- */
.ma--message { align-items: center; justify-content: center; padding: 24px 16px; }
.ma-msg { width: 100%; max-width: 420px; text-align: center; }
.ma-msg__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 28px 24px; }
.ma-msg__title { font-weight: 600; font-size: var(--text-xl); line-height: 1.25; color: var(--text-primary); }
.ma-msg__text { margin-top: 10px; font-size: var(--text-base); color: var(--text-secondary); }
.ma-msg__by { margin-top: 18px; font-size: var(--text-sm); color: var(--text-tertiary); }

/* --- наведение — только там, где есть мышь ------------------ */
@media (hover: hover) {
  .ma-tile:hover, .ma-card:hover, .ma-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
  .ma-chip:hover { border-color: var(--navy-400); }
  .ma-chip.is-on:hover { border-color: var(--brand-navy); background: var(--navy-700); }
  .ma-search__clear:hover { background: var(--surface-2); color: var(--text-primary); }
  .ma-head__call:hover, .ma-sheet__close:hover { background: var(--navy-50); }
  .ma-crumb:hover, .ma-pd__cat:hover, .ma-foot__list a:hover { color: var(--teal-600); }
  .ma-btn-wa:hover { background: var(--green-700); box-shadow: var(--shadow-md); }
}

/* --- планшет ---------------------------------------------- */
@media (min-width: 600px) {
  .ma-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ma-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .ma-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ma-pd__actions { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* --- компьютер -------------------------------------------- */
@media (min-width: 900px) {
  .ma-wrap { padding-left: 24px; padding-right: 24px; }
  .ma-head__row { padding-top: 20px; padding-bottom: 8px; }
  .ma-head__title { font-size: var(--text-2xl); }
  .ma-bar { padding: 10px 0 12px; }
  .ma-search { max-width: 640px; }
  .ma-main { padding-top: 24px; padding-bottom: 48px; }
  .ma-h1 { font-size: var(--text-3xl); }
  .ma-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .ma-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .ma-rows { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
  .ma-foot__in { flex-direction: row; justify-content: space-between; align-items: flex-end; }

  .ma-sheet { align-items: center; padding: 24px; }
  .ma-sheet__panel {
    max-width: 920px; max-height: calc(100vh - 48px); border-radius: var(--radius-lg);
    opacity: 0; transform: translateY(12px) scale(0.98);
    transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease-out);
  }
  .ma-sheet.is-open .ma-sheet__panel { opacity: 1; transform: none; }
  .ma-sheet__panel.is-narrow { max-width: 640px; }
  .ma-sheet__panel::before { display: none; }
  .ma-pd--media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .ma-pd--media .ma-pd__media { max-height: none; border-bottom: 0; border-right: 1px solid var(--border-soft);
    position: -webkit-sticky; position: sticky; top: 0; }
  .ma-pd--media .ma-pd__head { padding-right: 44px; }
  .ma-pd__info { padding: 28px 28px 32px; }
  .ma-pd__title { font-size: var(--text-2xl); }
}

@media (prefers-reduced-motion: reduce) {
  .ma *, .ma *::before, .ma *::after { animation: none !important; transition: none !important; }
}
