/* ============================================================
   Лавка AI — веб-верстка стартового экрана ИИ-ассистента
   1:1 по референсу (тёмная тема)
   Шрифты и иконка NewChatOutline извлечены из IPA
   com.appkode.foodfox_26.35.0 (YXFonts_*.bundle / Assets.car)
   ============================================================ */

@font-face {
  font-family: "YS Display";
  src: url("fonts/YSDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "YS Display";
  src: url("fonts/YSDisplay-Medium.ttf") format("truetype");
  font-weight: 500;
}
@font-face {
  font-family: "YS Display";
  src: url("fonts/YSDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
}
@font-face {
  font-family: "YS Text";
  src: url("fonts/YSText-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "YS Text";
  src: url("fonts/YSText-Medium.ttf") format("truetype");
  font-weight: 500;
}
@font-face {
  font-family: "YS Text";
  src: url("fonts/YSText-Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --bg: #0E0E0F;             /* фон вокруг (модальный экран iOS) */
  --screen: #131316;         /* фон экрана ассистента */
  --surface: #232327;        /* чипсы, карточки, поле ввода */
  --surface-2: #2B2B30;
  --text: #F5F5F7;
  --text-2: #A9A9AE;         /* подзаголовок */
  --text-3: #8A8A8F;         /* плейсхолдер */
  --text-4: #6D6D72;         /* дисклеймер */
  --blue: #2FA7E9;           /* акцент: голос, бейдж, иллюстрация */
  --green: #32D74B;          /* батарея */
  --font-display: "YS Display", -apple-system, "Helvetica Neue", sans-serif;
  --font-text: "YS Text", -apple-system, "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: var(--screen);
  font-family: var(--font-text);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  /* как в нативных приложениях: без двойного тап-зума и пинча */
  touch-action: pan-y manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; padding: 0; }

/* --- Контейнер страницы: без телефонной рамки --- */
.phone {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--screen);
  overflow: hidden;
}

/* ============================================================
   Шапка
   ============================================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  flex: none;
}
.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #EBEBEE;
  transition: background .15s;
}
.header-btn:active { background: rgba(255, 255, 255, .1); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-btn img { filter: invert(1); display: block; }

/* аватар профиля в шапке */
.header-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2FA7E9, #8341EF);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .12s;
}
.header-avatar:active { transform: scale(.92); }
.header-avatar { flex-shrink: 0; overflow: hidden; }
.header-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.header-avatar svg, .header-btn svg, .sheet-new-chat svg { display: block; flex-shrink: 0; }

/* --- Центральный заголовок шапки (единый для всех внутренних страниц) --- */
.header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 500;
  letter-spacing: -.2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Приветствие
   ============================================================ */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 32px 20px;
  min-height: 0;
}
.hero-illu { display: block; margin-bottom: 22px; }
.hero-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 12px;
}
.hero-subtitle {
  font-size: 19px;
  line-height: 1.32;
  color: var(--text-2);
}

/* ============================================================
   Блоки: «С чего начнем?» и «Что умею»
   ============================================================ */
.block { flex: none; }
.block-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.2px;
  padding: 0 20px;
  margin-bottom: 14px;
}
.block + .block { margin-top: 26px; }

/* --- Чипсы (две строки с горизонтальной прокруткой) --- */
.chips-row {
  display: flex;
  gap: 12px;
  padding: 0 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, transform .12s;
}
.chip:active { background: var(--surface-2); transform: scale(.97); }

/* --- Карточки умений: иконка не сжимается из-за длинного текста --- */
.home-page .cards-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 2px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 20px;
}
.home-page .cards-row::-webkit-scrollbar { display: none; }
.home-page .card {
  --skill-color: #9bd9ff;
  --skill-tint: #243441;
  flex: 0 0 156px;
  min-width: 0;
  min-height: 174px;
  padding: 16px;
  border: 1px solid #ffffff09;
  border-radius: 22px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: left;
  scroll-snap-align: start;
  transition: background .15s, transform .12s, border-color .15s;
}
.home-page .card[data-skill="image"] { --skill-color: #c9b2ff; --skill-tint: #342b48; }
.home-page .card[data-skill="search"] { --skill-color: #9fcdc9; --skill-tint: #263b3c; }
.home-page .card[data-skill="music"] { --skill-color: #ffb5ce; --skill-tint: #432d38; }
.home-page .card[data-skill="video"] { --skill-color: #ffc199; --skill-tint: #423229; }
.home-page .card[data-skill="code"] { --skill-color: #a3dfbb; --skill-tint: #293c33; }
.home-page .card[data-skill="voice"] { --skill-color: #e1bbff; --skill-tint: #3a2d46; }
.home-page .card[data-skill="docs"] { --skill-color: #f1d99e; --skill-tint: #3d372a; }
.home-page .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; min-height: 44px; }
.home-page .card-icon-wrap { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px; background: var(--skill-tint); color: var(--skill-color); }
.card-icon { width: 26px; height: 26px; color: #EBEBEE; }
.home-page .card-icon-wrap svg { display: block; width: 28px; height: 28px; flex: none; color: inherit; }
.home-page .card-badge { padding: 4px 6px; border-radius: 7px; background: #ffffff0b; color: #b9bdc7; font-size: 10px; font-weight: 500; line-height: 1.2; }
.home-page .card-text { font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--text); min-height: 2.6em; overflow-wrap: break-word; }
.home-page .card-count { margin-top: auto; font-size: 12px; line-height: 1.4; color: #a6a6b0; }
.home-page .card:active { background: var(--surface-2); transform: scale(.98); }
.home-page .card:focus-visible { outline: 2px solid var(--skill-color); outline-offset: -3px; }
@media (hover: hover) { .home-page .card:hover { background: var(--surface-2); border-color: #ffffff20; } }
@media (prefers-reduced-motion: reduce) { .home-page .card { transition: none; } }

/* ============================================================
   Внутренние страницы (skill / catalog / model)
   ============================================================ */
.page-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden; /* страховка от горизонтальных переполнений */
  padding: 6px 0 24px;
  scrollbar-width: none;
}
.page-main::-webkit-scrollbar { display: none; }

/* --- Строки списка моделей --- */
.model-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}
.model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 18px;
  text-align: left;
  transition: background .15s, transform .12s, box-shadow .15s;
}
.model-row:active { background: var(--surface-2); transform: scale(.985); }
.model-row[data-selected="true"] {
  box-shadow: inset 0 0 0 1.5px var(--blue);
  background: rgba(47, 167, 233, .08);
}
.vendor-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: none;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.model-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.model-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
}
.model-desc {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  background: var(--surface-2);
  color: var(--text-2);
  text-transform: lowercase;
}
.mini-badge--blue { background: rgba(47, 167, 233, .16); color: #5FBDF2; }
.mini-badge--green { background: rgba(50, 215, 75, .14); color: #5BD676; }
.chev {
  flex: none;
  color: var(--text-4);
}

/* --- Рейтинг и цена в строке модели --- */
.model-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.price-tag {
  font-size: 11.5px;
  color: var(--text-4);
}
.price-tag--free { color: #5BD676; }

/* --- Звёздочка избранного в строке модели --- */
.fav-btn {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  transition: background .15s, color .15s, transform .12s;
}
.fav-btn:active { transform: scale(.88); }
.fav-btn--active { color: #FAE436; }
.fav-btn--active svg { fill: #FAE436; }

/* --- Режим сравнения в каталоге --- */
.list-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sort-btn--active { background: rgba(47, 167, 233, .16); }
.compare-check {
  display: none;
}
body.compare-mode .compare-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--text-4);
  color: transparent;
  transition: border-color .15s, background .15s;
}
body.compare-mode .compare-check--on {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.compare-check--on::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
body.compare-mode .model-row { padding-right: 10px; }
body.compare-mode .chev,
body.compare-mode .model-meta { display: none; }

/* --- Панель инструментов списка: счётчик + сортировка --- */
.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px;
  margin: 4px 0 12px;
}
.list-count {
  font-size: 14px;
  color: var(--text-3);
}
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 62%;
  height: 38px;
  padding: 0 14px;
  border-radius: 19px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, transform .12s;
}
.sort-btn span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sort-btn:active { background: var(--surface-2); transform: scale(.97); }
.sort-btn svg { color: var(--text-4); }

/* --- Нижняя шторка-меню (сортировка) --- */
.menu-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: flex-end;
  animation: fade .2s;
}
.menu-backdrop.hidden { display: none; }
@keyframes menu-fade { from { opacity: 0; } }
.menu-sheet {
  width: 100%;
  background: #1B1B1E;
  border-radius: 28px 28px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: menu-up .28s cubic-bezier(.2, .8, .3, 1);
}
@keyframes menu-up { from { transform: translateY(50%); } }
.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 12px;
}
.menu-head h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  transition: background .15s, transform .12s;
}
.menu-option:active { background: var(--surface-2); transform: scale(.985); }
.menu-option .chev--check { color: var(--blue); opacity: 0; }
.menu-option--active .chev--check { opacity: 1; }
.menu-option--active { background: rgba(47, 167, 233, .1); }

/* --- Заголовок секции навыка в каталоге --- */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-top: 18px;
  background: none;
  text-align: left;
  color: var(--text);
}
.section-head .section-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--surface);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.section-head .section-icon svg { width: 19px; height: 19px; }
.section-head .section-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.section-head .section-count {
  font-size: 13.5px;
  color: var(--text-4);
}
.section-head .chev { color: var(--text-4); }

/* --- Закреплённая выбранная модель (страница навыка) --- */
.picked-card {
  margin: 16px 16px 0;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(47, 167, 233, .1);
  box-shadow: inset 0 0 0 1.5px var(--blue);
  display: flex;
  align-items: center;
  gap: 12px;
}
.picked-card .vendor-avatar { width: 44px; height: 44px; }
.picked-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.picked-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #5FBDF2;
}
.picked-name {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
}
.picked-actions {
  display: flex;
  gap: 8px;
}
.picked-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 19px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .12s, background .15s;
}
.picked-btn:active { transform: scale(.95); }
.picked-btn--primary { background: var(--blue); color: #fff; }
.picked-btn--ghost { background: rgba(255, 255, 255, .08); color: var(--text); }

/* --- Мини-поиск (страница навыка) --- */
.mini-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  margin: 0 20px 10px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text-4);
}
.mini-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-text);
  font-size: 15px;
  color: var(--text);
}
.mini-search input::placeholder { color: var(--text-3); }

/* --- Иконка навыка крупно (страница навыка) --- */
.skill-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 32px 6px;
}
.skill-hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: var(--surface);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.skill-hero-icon svg { width: 44px; height: 44px; }
.skill-hero-count {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-3);
}
.skill-hero-count b { color: #5FBDF2; font-weight: 500; }

/* ============================================================
   Поле ввода
   ============================================================ */
.input-area {
  flex: none;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}
.input-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 8px 0 22px;
  border-radius: 29px;
  background: var(--surface);
}
.input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-text);
  font-size: 19px;
  color: var(--text);
}
.input::placeholder { color: var(--text-3); }
.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  transition: transform .12s, background .15s, opacity .15s;
}

/* --- Кнопка отправки (самолётик) --- */
.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  transition: transform .12s, background .15s, opacity .2s;
}
.send-btn:active { transform: scale(.9); }
.send-btn[data-empty="true"] {
  opacity: .35;
  filter: saturate(.6);
}
.voice-btn:active { transform: scale(.92); }
.voice-btn.listening { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 167, 233, .5); }
  50% { box-shadow: 0 0 0 10px rgba(47, 167, 233, 0); }
}
.disclaimer {
  margin-top: 10px;
  text-align: center;
  font-size: 14.5px;
  color: var(--text-4);
}

/* --- Строка активной модели под полем ввода --- */
.model-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.model-status__label { font-size: 13.5px; }
.model-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px 0 9px;
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, transform .12s;
}
.model-link:active { background: var(--surface-2); transform: scale(.96); }
.model-link__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.model-link svg { flex: none; color: var(--text-4); }
.model-change {
  font-size: 13.5px;
  color: var(--text-4);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.model-change:active { color: var(--text-2); }

/* ============================================================
   Панель истории чатов: history_list
   Выезжает слева на ~88% ширины экрана
   ============================================================ */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: stretch;
  animation: fade .2s;
}
.sheet-backdrop.hidden { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 88%;
  max-width: 400px;
  height: 100%;
  background: #1B1B1E;
  border-radius: 0 28px 28px 0;
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  animation: slide-in-left .28s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slide-in-left { from { transform: translateX(-70%); } }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 14px;
}
.sheet-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-2);
  transition: background .15s;
}
.sheet-close:active { background: rgba(255, 255, 255, .1); }
.sheet-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }
.history-item {
  text-align: left;
  padding: 14px 52px 14px 16px;
  background: var(--surface);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: none;
  position: relative;
  transition: transform .12s, background .15s;
}
.history-item:active { background: var(--surface-2); transform: scale(.98); }
.history-item-delete {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  transition: background .15s, color .15s;
}
.history-item-delete:active { background: rgba(255, 99, 99, .14); color: #FF6B81; }
.history-empty {
  padding: 26px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-4);
}
.history-item-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-sub { font-size: 13px; color: var(--text-4); }
.sheet-new-chat {
  margin-top: 14px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  border-radius: 27px;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  transition: transform .12s, background .15s;
}
.sheet-new-chat:active { background: var(--surface-2); transform: scale(.98); }
.sheet-new-chat img { filter: invert(1); display: block; }

/* ============================================================
   Добавка v10: чипсы-подфильтры категорий и кошелёк
   (только новые классы, существующие не меняются)
   ============================================================ */

/* --- Компактный ряд чипсов «Все/Vision/Reasoning/Cheap/Free»
     над списком chat-моделей (catalog.js — секция, skill.js — sticky) --- */
.cat-chips {
  padding: 0 20px 6px;
  gap: 8px;
}
.cat-chips .chip {
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  font-size: 13.5px;
}

/* --- Кошелёк (profile.html) --- */
.wallet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 16px 14px;
  padding: 18px 16px 14px;
  border-radius: 18px;
  background: var(--surface);
}
.wallet-balance {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
}
.wallet-balance-label {
  font-size: 13px;
  color: var(--text-3);
}
.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.wallet-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 15px 12px 13px;
  border-radius: 18px;
  background: var(--surface);
  text-align: center;
  transition: background .15s, transform .12s;
}
.wallet-pack:active { background: var(--surface-2); transform: scale(.97); }
.wallet-pack-coins {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}
.wallet-pack-note {
  font-size: 12px;
  color: var(--text-3);
}
.wallet-pack-stars {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-4);
}
.wallet-dev-btn {
  display: block;
  margin: 10px 16px 0;
  height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: transform .12s, background .15s;
}
.wallet-dev-btn:active { transform: scale(.97); }
.wallet-dev-btn[hidden] { display: none; }
.wallet-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-4);
}

/* --- История пополнений --- */
.wallet-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}
.wallet-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--surface);
}
.wallet-history-sum {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.wallet-history-date {
  font-size: 13px;
  color: var(--text-4);
  white-space: nowrap;
}

/* --- Мини-тост (подсказка снизу экрана) --- */
.aihub-toast {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 30;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.aihub-toast--visible { opacity: 1; }
