/* Pixmaker Mini App — дизайн-система v2 («pix»).
 *
 * Структурная ДНК: condensed-заголовки с точкой-акцентом,
 * mono-надписи КАПСОМ, тёмные карточки, pill-чипы, таббар (мобайл) /
 * верхняя навигация (десктоп).
 * Палитра — фирменная янтарная с лендинга pixmaker.ru (НЕ красная SHUUU).
 * Шрифты — с реальной кириллицей: Oswald / Golos Text / JetBrains Mono.
 *
 * Все селекторы с префиксом `px-`; легаси-экраны на `ma-` (mini_app.css)
 * продолжают работать рядом до полного переезда.
 */

:root {
  /* Палитра лендинга (тёплый тёмный + янтарь) */
  --px-bg: #0c0b0d;
  --px-bg-soft: #141215;
  --px-surface: #1a171b;
  --px-surface-2: #221e23;
  --px-border: rgba(255, 240, 210, 0.10);
  --px-border-strong: rgba(255, 240, 210, 0.16);
  --px-text: #f3ece0;
  --px-muted: #b3a995;
  --px-faint: #8a8175;
  --px-accent: #ffc83d;
  --px-accent-deep: #f5a623;
  --px-accent-soft: rgba(255, 200, 61, 0.12);
  --px-on-accent: #2a1c00;
  --px-danger: #ff6b5e;
  --px-ok: #6fbf8f;
  --px-warn: #d9a13b;
  --px-radius: 16px;
  --px-radius-sm: 12px;
  /* Шрифты с кириллицей */
  --px-display: "Oswald", "Arial Narrow", sans-serif;
  --px-body: "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;
  --px-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ── Оболочка страницы ─────────────────────────────────────────── */

.px-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--px-bg);
  color: var(--px-text);
  font-family: var(--px-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.px-page {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 768px) {
  .px-page { padding: 40px 32px 120px; gap: 26px; }
}

/* ── Верхняя навигация (десктоп) ───────────────────────────────── */

.px-topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 32px;
  background: rgba(12, 11, 13, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--px-border);
}
@media (min-width: 768px) { .px-topnav { display: flex; } }
.px-topnav-links { display: flex; gap: 4px; }
.px-toplink {
  padding: 9px 17px;
  border-radius: 12px;
  color: var(--px-muted);
  font-size: 14.5px;
  text-decoration: none;
}
.px-toplink:hover { color: var(--px-text); }
.px-toplink.active { background: var(--px-surface); color: var(--px-text); font-weight: 500; }

/* ── Таббар (мобайл) ───────────────────────────────────────────── */

.px-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  border-top: 1px solid var(--px-border);
  background: rgba(12, 11, 13, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 768px) { .px-tabbar { display: none; } }
.px-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--px-faint);
  text-decoration: none;
}
.px-tab svg { width: 21px; height: 21px; stroke: currentColor; }
.px-tab span {
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.px-tab.active { color: var(--px-accent); }

/* Экраны с собственным нижним CTA прячут таббар — отступ не нужен. */
.px-page--no-tabbar { padding-bottom: 24px; }

/* ── Шапка приложения / типографика ────────────────────────────── */

.px-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.px-logo {
  font-family: var(--px-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--px-text);
  text-decoration: none;
}
.px-dot { color: var(--px-accent); }
.px-header-right { display: flex; align-items: center; gap: 10px; }

.px-h1 { font-family: var(--px-display); font-size: 34px; font-weight: 600; line-height: 1.1; }
.px-h2 { font-family: var(--px-display); font-size: 22px; font-weight: 600; line-height: 1.15; }
.px-h3 { font-family: var(--px-display); font-size: 17px; font-weight: 600; }
@media (min-width: 768px) { .px-h1 { font-size: 50px; } .px-h2 { font-size: 26px; } }
.px-sub { color: var(--px-muted); font-size: 14px; }
@media (min-width: 768px) { .px-sub { font-size: 15.5px; } }
.px-eyebrow {
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--px-faint);
}
.px-note { color: var(--px-muted); font-size: 13px; }
.px-mono-link {
  font-family: var(--px-mono);
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--px-accent);
  text-decoration: none;
}
.px-back {
  font-family: var(--px-mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--px-muted);
  text-decoration: none;
}
.px-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* ── Чипы ──────────────────────────────────────────────────────── */

.px-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.px-chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
  scrollbar-width: none;
}
.px-chips--scroll::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .px-chips--scroll { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; } }
.px-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--px-border-strong);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  color: var(--px-text);
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
}
.px-chip.active {
  background: var(--px-accent);
  border-color: var(--px-accent);
  color: var(--px-on-accent);
  font-weight: 600;
}

/* ── Кнопки ────────────────────────────────────────────────────── */

.px-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 18px;
  font-family: var(--px-body);
  font-size: 16px;
  font-weight: 600;
  padding: 16px 20px;
  width: 100%;
  color: var(--px-text);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.px-btn--primary {
  background: var(--px-accent);
  color: var(--px-on-accent);
  box-shadow: 0 10px 30px -10px rgba(255, 200, 61, 0.45);
}
.px-btn--primary:disabled { opacity: 0.45; box-shadow: none; cursor: default; }
.px-btn--secondary { background: var(--px-surface); border: 1px solid var(--px-border-strong); }
.px-btn--mini {
  display: inline-flex;
  width: auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  background: var(--px-surface-2);
  border: 1px solid var(--px-border-strong);
}

/* ── Карточки ──────────────────────────────────────────────────── */

.px-card {
  background: var(--px-surface);
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius);
  padding: 16px;
}
.px-hero { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
@media (min-width: 768px) { .px-hero { padding: 26px; } }

.px-tool { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.px-tool-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.px-icon-box {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--px-accent-soft);
  color: var(--px-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.px-price-chip {
  font-family: var(--px-mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--px-muted);
  border: 1px solid var(--px-border-strong);
  border-radius: 999px;
  padding: 4px 10px;
  text-transform: uppercase;
}
.px-soon {
  font-family: var(--px-mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 200, 61, 0.4);
  color: var(--px-accent);
  border-radius: 999px;
  padding: 3px 9px;
}

/* ── Сетки и фото-карточки (реальные превью) ───────────────────── */

.px-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* На мобильном колонки складываются в стек (как в мокапах). */
.px-grid-cols { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) {
  .px-grid-2 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .px-grid-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.px-photo {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--px-border);
  background: var(--px-surface-2);
  text-decoration: none;
  color: inherit;
}
.px-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* img-fallback прячет битую картинку атрибутом hidden — он должен
   побеждать display:block выше. */
.px-photo img[hidden] { display: none; }
.px-photo-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 28px 12px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.px-photo-badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(4px);
}

/* Плейсхолдер-градиент, если превью не загрузилось (img-fallback). */
.px-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
}
.px-photo-fallback[hidden] { display: none; }
/* Градиент img_banner должен заполнять карточку целиком. */
.px-photo-fallback > * { width: 100%; height: 100% !important; border-radius: 0; }

/* Горизонтальная полка */
.px-shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 46%;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 4px;
  scrollbar-width: none;
}
.px-shelf::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .px-shelf { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: unset; margin: 0; padding: 0; overflow: visible; }
}

/* ── Поиск ─────────────────────────────────────────────────────── */

.px-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--px-surface);
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius);
  padding: 13px 16px;
}
.px-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--px-text);
  font-family: var(--px-body);
  font-size: 15px;
}
.px-search input::placeholder { color: var(--px-faint); }
.px-search-clear {
  background: none;
  border: none;
  color: var(--px-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
}

/* ── Списки (профиль) ──────────────────────────────────────────── */

.px-list {
  display: flex;
  flex-direction: column;
  background: var(--px-surface);
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius);
}
.px-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--px-border);
}
.px-row:last-child { border-bottom: none; }
.px-row .px-row-value { margin-left: auto; color: var(--px-muted); font-size: 13.5px; }
.px-row .px-row-chev { color: var(--px-faint); }

.px-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--px-surface-2);
  border: 1px solid var(--px-border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}
.px-avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.px-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Аватар-ссылка в топнаве — открывает профиль. */
.px-avatar--link { text-decoration: none; color: var(--px-text); cursor: pointer; }
.px-avatar--link:hover { border-color: var(--px-accent); color: var(--px-accent); }
.px-avatar--link.active { border-color: var(--px-accent); color: var(--px-accent); }

/* ── Пустые состояния / «скоро» ────────────────────────────────── */

.px-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 40px 20px;
  color: var(--px-muted);
}
.px-empty .px-empty-icon { font-size: 34px; }

/* ── Утилиты ───────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .px-only-mobile { display: none !important; }
}
@media (max-width: 767.98px) {
  .px-only-desktop { display: none !important; }
}

/* ── Поля формы ────────────────────────────────────────────────── */

.px-field { display: flex; flex-direction: column; gap: 10px; }

/* ── Селект-дропдаун (тариф · соотношение · разрешение) ─────────── */

.px-select { position: relative; flex: 1 1 auto; min-width: 0; }
.px-select__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--px-surface);
  border: 1px solid var(--px-border);
  color: var(--px-text);
  font-family: var(--px-body);
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.px-select__trigger:hover { border-color: var(--px-border-strong); }
.px-select__icon { display: inline-flex; flex: none; color: var(--px-accent); }
.px-select__icon svg { width: 20px; height: 20px; display: block; }
.px-select__label {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.px-select__chev { flex: none; color: var(--px-faint); transition: transform 0.2s ease; }
.px-select__trigger[aria-expanded="true"] .px-select__chev { transform: rotate(180deg); }

.px-select__menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  padding: 6px;
  background: var(--px-surface-2);
  border: 1px solid var(--px-border-strong);
  border-radius: 14px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}
.px-select__menu--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }

.px-select__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--px-text);
  font-family: var(--px-body);
  font-size: 14px;
  cursor: pointer;
}
.px-select__menu--grid .px-select__option { align-items: center; text-align: center; }
.px-select__option:hover { background: rgba(255, 240, 210, 0.06); }
.px-select__option.selected { background: var(--px-accent-soft); color: var(--px-accent); }
.px-select__option-desc { font-size: 12px; color: var(--px-muted); font-weight: 400; }
.px-select__option.selected .px-select__option-desc { color: var(--px-accent); }

/* ── Аккордеон (нативный <details>) ────────────────────────────── */

.px-accordion {
  border: 1px solid var(--px-border-strong);
  border-radius: var(--px-radius);
  background: transparent;
}
.px-accordion > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--px-text);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.px-accordion > summary::-webkit-details-marker { display: none; }
.px-accordion__icon { color: var(--px-muted); }
.px-accordion__chev { margin-left: auto; color: var(--px-faint); transition: transform 0.2s ease; }
.px-accordion[open] > summary .px-accordion__chev { transform: rotate(180deg); }
.px-accordion__body { padding: 0 16px 16px; }

/* ── Текстовое поле с счётчиком ────────────────────────────────── */

.px-textarea {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--px-surface);
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius);
  padding: 12px 14px;
}
.px-textarea__input {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: none;
  outline: none;
  background: transparent;
  color: var(--px-text);
  font-family: var(--px-body);
  font-size: 15px;
  line-height: 1.5;
}
.px-textarea__input::placeholder { color: var(--px-faint); }
.px-textarea__foot { display: flex; align-items: center; gap: 10px; }
.px-textarea__counter { margin-left: auto; font-family: var(--px-mono); font-size: 11px; color: var(--px-faint); }

/* ── Экран генерации (px-gen / pxg) ────────────────────────────── */

.pxg [hidden] { display: none !important; }

/* Результат / статус */
.pxg-result { display: flex; flex-direction: column; gap: 12px; }
.pxg-result__status { color: var(--px-muted); font-size: 14px; }
.pxg-result__media { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pxg-result__img {
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  border: 1px solid var(--px-border);
}
.pxg-result__download { width: auto; padding: 12px 22px; }

/* Референс + слоты фото */
.pxg-cols { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 768px) { .pxg-cols { grid-template-columns: 1fr 1fr; gap: 24px; } }

.pxg-ref {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--px-border);
  background: var(--px-surface-2);
}
.pxg-ref__media { position: absolute; inset: 0; display: block; }
.pxg-ref__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pxg-ref__img[hidden] { display: none; }
.pxg-ref__fallback { position: absolute; inset: 0; }
.pxg-ref__fallback > * { width: 100%; height: 100% !important; border-radius: 0; }
.pxg-ref__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 10px;
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.pxg-uploads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pxg-uploads__hint { margin-top: 2px; }
.pxg-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--px-border-strong);
  border-radius: 14px;
  background: var(--px-surface);
  color: var(--px-muted);
  font-size: 12.5px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pxg-slot:hover { border-color: rgba(255, 200, 61, 0.45); color: var(--px-accent); }
.pxg-slot.filled { border-style: solid; border-color: var(--px-border); cursor: default; }
.pxg-slot__add { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pxg-slot__plus { font-size: 22px; line-height: 1; color: var(--px-faint); }
.pxg-slot__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pxg-slot__thumb[hidden] { display: none; }
.pxg-slot__remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.pxg-slot__remove[hidden] { display: none; }

/* CTA + спиннер */
/* Settings row (tier · aspect · resolution dropdowns) */
.pxg-settings { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }

.pxg-cta { margin-top: 2px; }
.pxg-cta__label { display: inline-flex; align-items: center; gap: 9px; }
.pxg-cta__icon { display: inline-flex; }
.pxg-cta__icon svg { width: 22px; height: 22px; display: block; }
.pxg-foot-note { display: flex; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.pxg-foot-note__icon { display: inline-flex; flex: none; opacity: 0.85; }
.pxg-foot-note__icon svg { width: 15px; height: 15px; display: block; }
.pxg-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(42, 28, 0, 0.35);
  border-top-color: var(--px-on-accent);
  border-radius: 50%;
  animation: pxg-spin 0.8s linear infinite;
}
.pxg-spinner[hidden] { display: none; }
@keyframes pxg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pxg-spinner { animation: none; } }

/* Компактнее по вертикали на десктопе: держим форму в узкой колонке, чтобы
   портрет-референс не растягивался на пол-экрана, и уплотняем отступы. */
@media (min-width: 768px) {
  .pxg { max-width: 680px; gap: 18px; }
  .pxg-cols { gap: 20px; }
}

/* ── Экран инструмента (pxt-*) ─────────────────────────────────────── */
.pxt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pxt-head .px-icon-box { flex: none; }

/* Блок «Пример»: промпт + результат (text-to-image) */
.pxt-example { display: flex; flex-direction: column; gap: 12px; }
.pxt-example__prompt { margin-top: 6px; color: var(--px-muted); font-size: 13.5px; line-height: 1.55; }
.pxt-example__media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--px-surface);
}
.pxt-example__media img { display: block; width: 100%; height: auto; }
.pxt-example__media > :not(.pxt-example__tag) { width: 100%; }
.pxt-example__tag {
  position: absolute;
  top: 8px; left: 10px;
  z-index: 1;
  font-family: var(--px-mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Блок «Пример»: до / после (enhance, restore) */
.pxt-example-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: 14px; overflow: hidden; }
.pxt-example-ba .pxt-example__media { border-radius: 0; }

/* Текст публичного промпта шаблона в аккордеоне на экране генерации. */
.pxg-template-prompt { line-height: 1.6; margin-bottom: 12px; white-space: pre-wrap; }

/* ── История (pxh-*) ───────────────────────────────────────────────── */
button.px-chip { font: inherit; cursor: pointer; }

.pxh-status[hidden] { display: none; }
.pxh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) { .pxh-grid { grid-template-columns: repeat(4, 1fr); } }

.pxh-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--px-surface);
  border: 1px solid var(--px-border);
}
.pxh-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pxh-card__ph {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--px-faint);
}
.pxh-card__badge {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: center;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}
.pxh-card__badge--failed, .pxh-card__badge--canceled { color: #ff9d9d; }
.pxh-card__badge--processing { color: var(--px-accent); }
.pxh-card__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 10px 8px;
  font-size: 11.5px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
