/* ============================================================
   MUSA · «Studio Deck» theme
   Скевоморфная тема (кассетная дека) для musa.by
   Подключается ПОСЛЕ вашего app.css и переопределяет
   существующие классы. Тёмная тема — по умолчанию,
   светлая — на <html data-theme="light"> или <body data-theme="light">.
   ============================================================ */

/* шрифты загружаются в base.html.twig через <link rel="stylesheet"> с preconnect */

/* ---------- ТОКЕНЫ ---------- */
:root,
[data-theme="dark"] {
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --wood: repeating-linear-gradient(180deg,#5a3d22 0 4px,#4a3119 4px 8px);
  --chassis: linear-gradient(180deg,#1b1e23,#121419);
  --page-bg: #14161a;
  --fascia: linear-gradient(180deg,#2a2e35,#1a1d22);
  --panel: linear-gradient(180deg,#1f2228,#16191e);
  --panel-solid: #1b1e23;
  --field: #0c0e11;
  --field-inset: inset 0 2px 6px rgba(0,0,0,.8),0 1px 0 rgba(255,255,255,.05);

  --ink: #e8eaed;
  --ink-strong: #ffffff;
  --ink-2: #c2c7cd;
  --muted: #9aa0a8;
  --muted-2: #7a8088;
  --faint: #5f6772;

  --accent: #E8A13A;
  --accent-bright: #F2C572;
  --accent-grad: linear-gradient(180deg,#F2B85A,#D98A28);
  --accent-ink: #3a2606;
  --accent-soft: #23272e;

  --line: rgba(255,255,255,.06);
  --line-2: rgba(255,255,255,.1);
  --ok: #5fc98a;
  --ok-bg: rgba(41,178,122,.12);
  --ok-line: rgba(41,178,122,.35);
  --danger: #E0574A;

  --raise: 0 1px 0 rgba(255,255,255,.2) inset,0 -2px 5px rgba(150,80,0,.4) inset,0 4px 11px rgba(0,0,0,.45);
  --inset-panel: inset 0 1px 0 rgba(255,255,255,.05),0 2px 6px rgba(0,0,0,.35);
  --photo-frame: linear-gradient(180deg,#e7e0d2,#d6ccb9);

  /* старая палитра app.css -> новый акцент: ловит места, где тема не накрыла селектор явно */
  --sky: var(--accent-bright);
  --hint: var(--muted-2);
  --bg-soft: var(--field);
  --slate: var(--ink);
  --red: var(--danger);
}

[data-theme="light"] {
  --wood: repeating-linear-gradient(180deg,#d8c29a 0 4px,#c9b187 4px 8px);
  --chassis: linear-gradient(180deg,#f5f0e5,#e9e0cd);
  --page-bg: #e9e0cd;
  --fascia: linear-gradient(180deg,#fcf9f2,#ece2cf);
  --panel: #fdfaf3;
  --panel-solid: #fdfaf3;
  --field: #fdfaf3;
  --field-inset: inset 0 1px 4px rgba(120,100,60,.35),0 1px 0 rgba(255,255,255,.8);

  --ink: #2a2418;
  --ink-strong: #2a2418;
  --ink-2: #5a4e38;
  --muted: #7a6e50;
  --muted-2: #9a8456;
  --faint: #b0a079;

  --accent: #c98a1e;
  --accent-bright: #a8701a;
  --accent-grad: linear-gradient(180deg,#F2B85A,#D98A28);
  --accent-ink: #3a2606;
  --accent-soft: #ece3d0;

  --line: rgba(160,140,95,.25);
  --line-2: rgba(160,140,95,.35);
  --ok: #1f8a5b;
  --ok-bg: rgba(41,178,122,.14);
  --ok-line: rgba(41,178,122,.4);
  --danger: #cc4a3a;

  --raise: 0 1px 0 rgba(255,255,255,.5) inset,0 4px 11px rgba(120,90,30,.3);
  --inset-panel: 0 1px 0 rgba(255,255,255,.9),0 2px 6px rgba(120,100,60,.15);
  --photo-frame: linear-gradient(180deg,#e6dcc4,#d2c4a4);
}

/* ---------- БАЗА ---------- */
body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
a { color: inherit; }
::selection { background: rgba(232,161,58,.3); }

.page-title,
.item-detail__title {
  font-size: 28px; font-weight: 700; letter-spacing: -.01em; color: var(--ink-strong);
}

/* ---------- ШАПКА ---------- */
.site-header {
  background: var(--fascia);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.4);
}
[data-theme="light"] .site-header { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(120,100,60,.2); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__logo { height: 34px; width: auto; color: var(--accent-bright); filter: drop-shadow(0 0 4px rgba(232,161,58,.4)); }
[data-theme="light"] .brand__logo { color: #3a2c12; filter: none; }
.brand__text { font-family: var(--font-mono); font-weight: 700; font-size: 19px; letter-spacing: .14em; color: var(--accent-bright); text-transform: uppercase; }
[data-theme="light"] .brand__text { color: #3a2c12; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.brand__sub { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; font-weight: 500; }
.site-header .site-header__search { flex: 1 1 240px; max-width: 440px; min-width: 0; margin: 0 24px; }
.site-header__user { display: flex; align-items: center; gap: 12px; }
@media (max-width: 720px) {
  /* «Разместить», «Сообщения», профиль и поиск уехали в нижнюю панель */
  .site-header__user { display: none; }
  /* поиск прячется, раскрывается оверлеем по кнопке «Поиск» снизу */
  .site-header .site-header__search { display: none; }
  .site-header .site-header__search.is-open {
    display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 90;
    margin: 0; padding: 12px; background: var(--fascia);
    box-shadow: 0 8px 22px rgba(0,0,0,.5);
  }
  body.search-open::before {
    content: ''; position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5);
  }
}
.messages-link { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 6px 13px 6px 6px; border-radius: 20px; text-decoration: none; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(232,161,58,.32), inset 0 1px 0 rgba(255,255,255,.07); transition: box-shadow .12s ease, filter .12s ease; }
.user-chip:hover { box-shadow: inset 0 0 0 1px rgba(232,161,58,.6), inset 0 1px 0 rgba(255,255,255,.07); filter: brightness(1.06); }
.user-chip__avatar { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(232,161,58,.4); }
.user-chip__name { font-size: 13px; color: var(--ink); }

/* ---------- КНОПКИ ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border: 0; border-radius: 7px; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--accent-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.07),0 1px 2px rgba(0,0,0,.4);
  text-decoration: none; transition: filter .12s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-primary,
.btn--primary {
  color: var(--accent-ink); font-weight: 700; background: var(--accent-grad);
  box-shadow: var(--raise); text-shadow: 0 1px 0 rgba(255,255,255,.3);
}
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-sans); font-size: 12.5px; color: var(--accent-bright); text-decoration: none; }
.link-btn--danger { color: var(--danger); }

/* ---------- ПРОМО-ПОЛОСА ---------- */
.promo {
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -2px 4px rgba(0,0,0,.3);
}
.promo .container { padding-top: 9px; padding-bottom: 9px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--accent-bright); }
[data-theme="light"] .promo .container { color: #7a5a16; }

/* ---------- ХЛЕБНЫЕ КРОШКИ ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 16px 0 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted-2); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb__sep { color: var(--faint); }

/* ---------- ОБЩИЙ «ОТСЕК»: панель/секция ---------- */
.profile-section,
.thread-list,
.wall-row,
.notifications-group {
  border-radius: 10px; background: var(--panel); box-shadow: var(--inset-panel);
}
.profile-section { padding: 18px; margin: 0 0 16px; }
.profile-section__title { margin: 0 0 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.profile-section__hint { font-size: 11.5px; line-height: 1.55; color: var(--muted); margin: 14px 0; }

/* ---------- ПОЛЯ ВВОДА ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], input[type="password"], textarea, select {
  width: 100%; box-sizing: border-box; font-family: var(--font-sans); font-size: 14px;
  color: var(--ink); background: var(--field); border: 0; border-radius: 6px;
  padding: 12px 14px; box-shadow: var(--field-inset); outline: none;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, textarea:focus, select:focus { box-shadow: var(--field-inset), 0 0 0 1px rgba(232,161,58,.45); }
.msg-form { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.msg-form .btn { align-self: flex-start; height: 50px; padding: 0 28px; }

/* ---------- ПРОФИЛЬ: ТАБЫ ---------- */
.profile-tabs__nav { display: flex; gap: 8px; margin: 18px 0 22px; border-bottom: 0; }
.profile-tabs__tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border: 0; border-radius: 7px; cursor: pointer;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: var(--accent-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.06),0 1px 2px rgba(0,0,0,.4);
}
.profile-tabs__ic { display: inline-flex; flex: 0 0 auto; }
.profile-tabs__ic svg { width: 18px; height: 18px; display: block; }
.profile-tabs__tab:hover { color: var(--ink); }
.profile-tabs__tab.is-active {
  color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--raise);
}
[data-theme="dark"] .profile-tabs__tab.is-active,
:root .profile-tabs__tab.is-active {
  color: var(--accent-bright); background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(232,161,58,.5),0 0 12px rgba(232,161,58,.25),inset 0 1px 0 rgba(255,255,255,.06);
}
[data-theme="light"] .profile-tabs__tab.is-active { color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--raise); }
@media (max-width: 720px) {
  /* 4 таба в строку не влезают — раскладываем сеткой 2×2 */
  .profile-tabs__nav { flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
  .profile-tabs__tab { flex: 1 1 calc(50% - 3px); justify-content: center; gap: 6px; padding: 11px 8px; font-size: 13px; white-space: nowrap; text-align: center; }
}

/* ---------- ПРОФИЛЬ: СПИСКИ ---------- */
.profile-list { list-style: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
.profile-list__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 0; border-bottom: 1px solid var(--line); }
.profile-list__row:last-child { border-bottom: 0; }
.profile-list__row.profile-list__row--empty { justify-content: center; color: var(--muted-2); font-size: 13px; border: 1.5px dashed var(--line-2); border-radius: 8px; padding: 16px; box-sizing: border-box; }
.profile-list__name { font-size: 14px; color: var(--ink); }
.profile-list__sub { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); margin-top: 5px; }
.profile-list__aside { display: flex; align-items: center; gap: 14px; }

.badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 5px; }
.badge--ok { color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line); }

/* ---------- ПРОФИЛЬ: МОИ ОБЪЯВЛЕНИЯ ---------- */
.profile-items__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wall-list { display: flex; flex-direction: column; gap: 12px; }
.profile-item { display: flex; align-items: center; gap: 16px; }
.wall-row { flex: 1; display: flex; align-items: center; gap: 16px; padding: 14px; }
.wall-row__title { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.wall-row__meta { display: flex; gap: 14px; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.profile-item__actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* ---------- ОПОВЕЩЕНИЯ ---------- */
.notifications-form { display: flex; flex-direction: column; gap: 16px; }
.notifications-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 640px) { .notifications-grid { grid-template-columns: 1fr; } }
.notifications-toggle { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink); }
.notifications-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.notifications-group { border: 0; padding: 18px; margin: 0; }
.notifications-group legend { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); padding: 0; }
.notifications-options { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin-top: 12px; }
.notifications-group .ts-wrapper { margin-top: 12px; }
/* категории: уровень видно — родитель жирным, подкатегория с отступом.
   .option (0,2,0) перебивает голый класс, поэтому селектор со специфичностью выше. */
.ts-dropdown .option.cat-opt--root { font-weight: 700; color: var(--ink); }
.ts-dropdown .option.cat-opt--sub { padding-left: 30px; }
.cat-item__parent { opacity: .55; font-weight: 400; }
.cat-item__parent::after { content: "/"; margin: 0 4px; }
.notifications-options--scroll { display: flex; flex-wrap: wrap; gap: 8px; }
.notifications-option { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.notifications-option input { width: 15px; height: 15px; accent-color: var(--accent); }
.notifications-options--scroll .notifications-option { padding: 6px 12px; border-radius: 14px; background: var(--accent-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }

/* ---------- СООБЩЕНИЯ ---------- */
.thread-list { padding: 6px 0; overflow: hidden; }
.thread-list__item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.thread-list__item:last-child { border-bottom: 0; }
.thread-list__item:hover { background: linear-gradient(90deg,rgba(232,161,58,.06),transparent); }
.thread-list__top { display: flex; align-items: center; justify-content: space-between; }
.thread-list__name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.thread-list__time { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); }
.thread-list__preview { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- ПОДВАЛ ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); }
.site-footer .container { padding-top: 16px; padding-bottom: 16px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--faint); text-align: center; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer__sep { margin: 0 8px; color: var(--faint); }

/* ---------- ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ (необязательный хелпер) ---------- */
.theme-switch { display: inline-flex; gap: 3px; padding: 3px; border-radius: 18px; background: var(--field); box-shadow: var(--field-inset); }
.theme-switch__opt { display: flex; align-items: center; justify-content: center; padding: 7px; border: 0; border-radius: 15px; cursor: pointer; color: var(--muted); background: none; }
.theme-switch__opt svg { display: block; }
.theme-switch__opt[aria-pressed="true"] { color: var(--accent-bright); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(232,161,58,.4); }
[data-theme="light"] .theme-switch__opt[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--raise); }

/* ---------- ФОТО-РАМКА (для превью объявлений) ---------- */
/* Накиньте класс .photo на контейнер <img> в карточках, чтобы фото
   читались чисто на тёмном фоне (светлая рамка вместо «стекла»). */
.photo { position: relative; border-radius: 5px; overflow: hidden; background: var(--photo-frame); box-shadow: inset 0 1px 3px rgba(120,100,60,.35),0 1px 0 rgba(255,255,255,.5); }
.photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo--empty { display: flex; align-items: center; justify-content: center; min-height: 150px; background: repeating-linear-gradient(135deg,#1c2026 0 12px,#191c21 12px 24px); box-shadow: inset 0 2px 7px rgba(0,0,0,.6); color: #4a515b; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
[data-theme="light"] .photo--empty { background: repeating-linear-gradient(135deg,#e6dcc4 0 12px,#ddd1b8 12px 24px); color: #b0a079; }

/* ============================================================
   OVERRIDES для существующих классов musa.by (Symfony-шаблоны)
   ============================================================ */

/* контейнер шире, чтобы соответствовать новой теме */
.container { max-width: 1180px; }
main.container { padding-top: 24px; padding-bottom: 48px; }

/* базовая ссылка — отказ от стандартного голубого и подчёркивания */
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: none; filter: brightness(1.15); }
[data-theme="light"] a { color: var(--accent-ink); }

/* breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 16px 0 4px; margin: 0 0 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted-2); }
.breadcrumb a { color: var(--muted); }
.breadcrumb__sep { color: var(--faint); }

/* page title + empty */
.page-title { margin: 0 0 16px; }
.empty { color: var(--muted); font-size: 14px; padding: 16px 0; }

/* footer layout (нужен для переключателя темы справа) */
.site-footer { margin-top: 48px; background: transparent; border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer__theme { display: inline-flex; align-items: center; }

/* messages-link + бейдж непрочитанного из шапки */
.messages-link { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); padding: 6px 2px; }
.messages-link:hover { color: var(--accent-bright); }
.msg-badge { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--accent-grad); color: var(--accent-ink); font-family: var(--font-mono); font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 0 8px rgba(232,161,58,.45); }

/* SEARCH в шапке списка */
.wall-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.wall-header .breadcrumb { flex: 1 1 auto; margin: 0; padding: 0; min-width: 0; }
.wall-search { position: relative; flex: 0 1 320px; min-width: 220px; }
.wall-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; display: inline-flex; }
.wall-search__icon svg { width: 100%; height: 100%; display: block; }
input[type="search"].wall-search__input { width: 100%; box-sizing: border-box; padding: 11px 14px 11px 40px; font-family: var(--font-sans); font-size: 13.5px; color: var(--ink); background: var(--field); border: 0; border-radius: 6px; box-shadow: var(--field-inset); outline: none; -webkit-appearance: none; appearance: none; }
.wall-search__input::-webkit-search-cancel-button, .wall-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.wall-search__input::placeholder { color: var(--muted-2); }
.wall-search__input:focus { box-shadow: var(--field-inset), 0 0 0 1px rgba(232,161,58,.45); }

/* живые подсказки поиска */
.wall-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; max-height: 72vh; overflow-y: auto; padding: 6px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,.38); }
.wall-suggest[hidden] { display: none; }
.wall-suggest__head { padding: 9px 8px 4px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.wall-suggest__did { display: block; width: 100%; text-align: left; padding: 9px 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; font-family: var(--font-sans); font-size: 13px; color: var(--ink); }
.wall-suggest__did b { color: var(--accent-bright); }
.wall-suggest__item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.wall-suggest__thumb { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 5px; object-fit: cover; background: var(--field); }
.wall-suggest__thumb--empty { display: block; box-shadow: var(--field-inset); }
.wall-suggest__text { display: flex; flex-direction: column; min-width: 0; }
.wall-suggest__title { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.wall-suggest__price { font-size: 12px; color: var(--accent-bright); }
.wall-suggest__chip { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px; font-size: 13px; color: var(--ink); text-decoration: none; }
.wall-suggest__chip::before { content: "#"; color: var(--muted-2); font-family: var(--font-mono); }
.wall-suggest__chip--cat::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.wall-suggest__item.is-active, .wall-suggest__item:hover,
.wall-suggest__chip.is-active, .wall-suggest__chip:hover,
.wall-suggest__did.is-active, .wall-suggest__did:hover { background: var(--accent-soft); }

/* фрейм ленты не должен ломать flex .feed (сайдбар + основная колонка) */
#wall-feed { display: contents; }

/* категории — рейл табов + единая панель подкатегорий (мегаменю).
   Панель — DOM-потомок .catrail без зазора до табов, поэтому переход
   курсором таб → пункт не закрывает меню. */
.catrail { position: relative; z-index: 5; margin: 14px 0 22px; }
.catrail__tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.cat { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel-solid); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); white-space: nowrap; cursor: pointer; }
.cat:hover { color: var(--accent-bright); }
.cat.is-active { color: var(--accent-bright); box-shadow: 0 0 0 1px rgba(232,161,58,.5), 0 0 12px rgba(232,161,58,.25); }
[data-theme="light"] .cat.is-active { color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--raise); }
.cat__icon { display: inline-flex; width: 17px; height: 17px; color: currentColor; flex-shrink: 0; }
.cat__icon svg { width: 100%; height: 100%; display: block; }
.cat__caret { font-size: 9px; opacity: .6; }
.megamenu { position: absolute; top: 100%; left: 0; width: 720px; max-width: 100%; padding: 18px 20px; border-radius: 10px; background: var(--panel-solid); box-shadow: 0 22px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(232,161,58,.12); z-index: 10; }
.megamenu__head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.megamenu__title { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-bright); }
.megamenu__rule { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(232,161,58,.35), transparent); }
.megamenu__hint { font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
.megamenu__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; }
.megamenu__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink-2); border-radius: 6px; }
.megamenu__item:hover { background: var(--accent-soft); color: var(--accent-bright); }
.megamenu__item.is-active { color: var(--accent-bright); font-weight: 600; }
.megamenu__name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.megamenu__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(232,161,58,.6); flex-shrink: 0; }
.megamenu__count { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); flex-shrink: 0; }
/* !important: перебиваем inline left, который выставляет megamenu_controller */
@media (max-width: 720px) {
  .megamenu { left: 0 !important; right: 0; width: auto; }
  .megamenu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* axis chips (фильтры по тегам) */
.wall-axis-chips { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; padding: 14px 16px; background: var(--panel); border-radius: 10px; box-shadow: var(--inset-panel); }
.wall-axis-chips__row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wall-axis-chips__label { flex: 0 0 auto; min-width: 110px; padding: 5px 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.wall-axis-chips__list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.wall-axis-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 0; border-radius: 5px; background: var(--accent-soft); color: var(--ink-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; line-height: 1.3; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.wall-axis-chip:hover { color: var(--accent-bright); filter: brightness(1.1); }
.wall-axis-chip.is-active { color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--raise); }
[data-theme="dark"] .wall-axis-chip.is-active,
:root .wall-axis-chip.is-active { color: var(--accent-bright); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(232,161,58,.5), 0 0 8px rgba(232,161,58,.25); }
[data-theme="light"] .wall-axis-chip.is-active { color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--raise); }
.wall-axis-chip__count { font-size: 10px; color: var(--muted-2); }
.wall-axis-chip.is-active .wall-axis-chip__count { color: inherit; opacity: .7; }

/* фильтр по тегам (tom-select) */
.wall-tags { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.wall-tags__select, .wall-tags .ts-wrapper { flex: 1 1 320px; min-width: 240px; }
.wall-tags__submit { height: 38px; }
.wall-tags__reset { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* tom-select — тёмная тема */
.ts-wrapper { font-family: var(--font-sans); }
.ts-control { border: 0; border-radius: 6px; padding: 8px 10px; background: var(--field); color: var(--ink); box-shadow: var(--field-inset); min-height: 38px; }
.ts-wrapper.focus .ts-control { box-shadow: var(--field-inset), 0 0 0 1px rgba(232,161,58,.45); }
.ts-control input { color: var(--ink); }
.ts-control input::placeholder { color: var(--muted-2); }
.ts-control .item { background: var(--accent-soft); color: var(--accent-bright); border: 0; border-radius: 5px; padding: 2px 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
[data-theme="light"] .ts-control .item { color: var(--accent-ink); background: var(--accent-grad); }
.ts-control .item .remove { border: 0; color: inherit; opacity: .65; padding: 0 4px; }
.ts-control .item .remove:hover { background: transparent; opacity: 1; }
/* дефолтная тема tom-select красит чипы в синий через .ts-wrapper.multi .ts-control [data-value]
   (0,4,0) и грузится раньше — перекрываем своей палитрой бОльшей специфичностью */
.ts-wrapper.multi .ts-control .item[data-value],
.ts-wrapper.multi .ts-control .item[data-value].active { background: var(--accent-soft); color: var(--accent-bright); text-shadow: none; box-shadow: none; }
[data-theme="light"] .ts-wrapper.multi .ts-control .item[data-value],
[data-theme="light"] .ts-wrapper.multi .ts-control .item[data-value].active { color: var(--accent-ink); background: var(--accent-grad); }
/* разделитель перед × в дефолтной теме синий (border-left:#0073bb) — приглушаем */
.ts-wrapper.plugin-remove_button .ts-control .item .remove { color: inherit; opacity: .55; border-left-color: rgba(255,255,255,.14); }
[data-theme="light"] .ts-wrapper.plugin-remove_button .ts-control .item .remove { border-left-color: rgba(58,38,6,.25); }
.ts-wrapper.plugin-remove_button .ts-control .item .remove:hover { background: transparent; opacity: 1; }
.ts-dropdown { background: var(--panel-solid); border: 0; border-radius: 8px; box-shadow: 0 22px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(232,161,58,.12); margin-top: 4px; color: var(--ink); }
.ts-dropdown .optgroup-header { background: transparent; color: var(--muted-2); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px 4px; }
.ts-dropdown .option { padding: 8px 12px; font-size: 13px; color: var(--ink-2); }
.ts-dropdown .option.active { background: var(--accent-soft); color: var(--accent-bright); }
[data-theme="light"] .ts-dropdown .option.active { color: var(--accent-ink); background: var(--accent-grad); }

/* WALL LIST — карточная сетка вместо колонок */
.wall-list { column-count: initial; column-gap: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .wall-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wall-list { grid-template-columns: 1fr; } }

/* WALL ROW — карточка */
.wall-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; margin: 0; background: var(--panel); border: 0; border-radius: 10px; box-shadow: var(--inset-panel); overflow: hidden; transition: transform .1s ease; break-inside: auto; }
.wall-row:hover { transform: translateY(-2px); }
.wall-row__image { display: block; width: 100%; align-self: stretch; margin: 0; border-radius: 0; overflow: hidden; background: var(--photo-frame); }
.wall-row__image img { display: block; width: 100%; height: 160px; object-fit: cover; }
.wall-row__image--empty { display: flex; align-items: center; justify-content: center; height: 160px; background: repeating-linear-gradient(135deg,#1c2026 0 12px,#191c21 12px 24px); box-shadow: inset 0 2px 7px rgba(0,0,0,.5); color: #4a515b; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
[data-theme="light"] .wall-row__image--empty { background: repeating-linear-gradient(135deg,#e6dcc4 0 12px,#ddd1b8 12px 24px); color: #b0a079; }
.wall-row__main { flex: 1; min-width: 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.wall-row__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wall-row__title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; text-decoration: none; }
.wall-row__title:hover { color: var(--accent-bright); }
.wall-row__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wall-row__meta { display: flex; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--muted-2); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.wall-row__media { color: var(--accent-bright); }
.wall-row__price { background: transparent; color: var(--accent-bright); font-family: var(--font-mono); font-weight: 700; font-size: 15px; padding: 0; border-radius: 0; white-space: nowrap; box-shadow: none; text-shadow: none; }

/* МАГАЗИНЫ И СТУДИИ — широкие горизонтальные карточки (одна в строку) */
.wall-list--places { grid-template-columns: 1fr; gap: 14px; }
.wall-row--place { flex-direction: row; align-items: stretch; }
.wall-row--place .wall-row__image { width: 280px; flex: none; align-self: stretch; }
.wall-row--place .wall-row__image--logo { display: flex; align-items: center; justify-content: center; padding: 22px; background: var(--photo-frame); }
.wall-row--place .wall-row__image--logo img { width: 100%; height: 100%; max-height: 180px; object-fit: contain; }
.wall-row--place .wall-row__image--empty { align-self: stretch; height: auto; min-height: 172px; }
.wall-row--place .wall-row__main { padding: 16px 20px; gap: 10px; }
.wall-row--place .wall-row__title { font-size: 17px; }
@media (max-width: 640px) {
    .wall-row--place { flex-direction: column; }
    .wall-row--place .wall-row__image { width: 100%; }
    .wall-row--place .wall-row__image--logo { padding: 26px; }
    .wall-row--place .wall-row__image--logo img { max-height: 200px; }
}

/* PILL (теги/категории) */
.pill { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 5px; background: var(--accent-soft); color: var(--ink-2); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.pill:hover { color: var(--accent-bright); filter: brightness(1.1); }
.pill--category { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--raise); text-shadow: 0 1px 0 rgba(255,255,255,.3); }
.pill--category:hover { color: var(--accent-ink); }
.pill--active { background: var(--accent-grad); color: var(--accent-ink); }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 22px 0 16px; justify-content: center; }
.pagination li a, .pagination li span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 12px; background: var(--accent-soft); border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; text-decoration: none; border: 0; }
.pagination li a:hover { color: var(--accent-bright); }
.pagination li.active a, .pagination li.active span { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--raise); border: 0; }

/* ============ ITEM DETAIL ============ */
.item-detail { max-width: 1100px; }
.item-detail__title { font-size: 28px; margin: 0 0 12px; }
.item-detail__meta { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); margin-bottom: 12px; }
.item-detail__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.item-detail__price { display: inline-block; padding: 14px 22px; margin: 4px 0 18px; background: var(--field); box-shadow: var(--field-inset); border-radius: 8px; color: var(--accent-bright); font-family: var(--font-mono); font-weight: 700; font-size: 26px; line-height: 1.1; }
.item-detail__description { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin: 22px 0; }
.item-detail__description img { max-width: 100%; height: auto; border-radius: 8px; }
.item-detail__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.item-detail__main { min-width: 0; }
.item-detail__aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .item-detail__layout { grid-template-columns: minmax(0, 1fr); } .item-detail__aside { position: static; } }
.admin-actions { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.admin-actions form { margin: 0; }
.admin-actions__badge { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--danger); margin-right: auto; }

/* gallery */
.gallery { position: relative; margin: 0 0 18px; }
.gallery__stage { position: relative; aspect-ratio: 4 / 3; background: var(--field); border-radius: 9px; overflow: hidden; box-shadow: var(--field-inset); }
.gallery__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; opacity: 0; transition: opacity .15s; cursor: zoom-in; pointer-events: none; }
.gallery__slide--active { opacity: 1; pointer-events: auto; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; }
.gallery__nav:hover { background: rgba(0, 0, 0, .75); }
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.gallery__thumbs { display: flex; gap: 7px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.gallery__thumb { flex: 0 0 64px; width: 64px; height: 64px; border: 0; border-radius: 6px; background: var(--photo-frame); padding: 0; cursor: pointer; overflow: hidden; box-shadow: inset 0 1px 3px rgba(120,100,60,.35),0 1px 0 rgba(255,255,255,.5); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumb--active { box-shadow: 0 0 0 2px var(--accent), 0 0 10px rgba(232,161,58,.4); }
.gallery__lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; z-index: 100; }
.gallery__lightbox[hidden] { display: none; }
.gallery__full { max-width: 92vw; max-height: 92vh; object-fit: contain; display: block; }
.gallery__close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; z-index: 2; }
.gallery__close:hover { background: rgba(255, 255, 255, .3); }
.gallery__counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-family: var(--font-mono); font-size: 12px; background: rgba(0, 0, 0, .5); padding: 4px 10px; border-radius: 12px; }

/* specs (правый блок карточки) */
.specs { list-style: none; margin: 0; padding: 6px 14px; background: var(--panel); border-radius: 9px; box-shadow: var(--inset-panel); font-family: var(--font-mono); font-size: 12px; border: 0; }
.specs__row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs__row:last-child { border-bottom: 0; }
.specs__icon { width: 16px; height: 16px; color: var(--muted-2); }
.specs__label { color: var(--muted-2); }
.specs__value { color: var(--ink-2); font-weight: 500; text-align: right; }
a.specs__value { color: var(--accent-bright); font-weight: 600; }
[data-theme="light"] a.specs__value { color: var(--accent-ink); }

/* contacts */
.contacts { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--panel); border: 0; border-radius: 9px; box-shadow: var(--inset-panel); margin-top: 0; }
.contacts__btn { width: 100%; text-align: center; height: 44px; }
.contacts__btn--author {
  color: #06331d; font-weight: 700;
  background: linear-gradient(180deg,#3fe07f,#16a34a);
  box-shadow: var(--raise); text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.contacts__btn--author:hover { filter: brightness(1.06); color: #06331d; }
.contacts .phone, .contacts__row { display: flex; gap: 8px; align-items: center; }
.contacts .phone .btn, .contacts__row .btn { flex: 1; min-width: 0; width: auto; }
.contacts .phone__number { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 14px; background: var(--field); box-shadow: var(--field-inset); border: 0; border-radius: 6px; font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--accent-bright); }
.contacts [hidden] { display: none !important; }
.contacts .phone__copy, .contacts__row .phone__copy { width: 44px; height: 44px; flex: 0 0 44px; }
.phone__copy { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: var(--accent-soft); border: 0; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); color: var(--muted); cursor: pointer; transition: color .15s; }
.phone__copy:hover { color: var(--accent-bright); }
.phone__copy svg { width: 16px; height: 16px; }
.phone__copy--ok { color: var(--ok); }

/* favorite (♥) */
.fav-btn { display: inline-flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box; height: 44px; padding: 0 16px; margin: 0 0 14px; background: var(--accent-soft); border: 0; border-radius: 7px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); color: var(--ink-2); font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: filter .12s; }
.fav-btn:hover { filter: brightness(1.1); color: var(--ink-2); }
.fav-btn svg { width: 18px; height: 18px; color: var(--muted-2); transition: color .12s, transform .1s; }
.fav-btn.is-active { color: var(--accent-bright); }
.fav-btn.is-active svg { color: var(--danger); transform: scale(1.05); }
[data-theme="light"] .fav-btn.is-active { color: var(--accent-ink); }

/* seller widget */
.seller { display: flex; align-items: center; gap: 13px; padding: 14px 16px; margin: 0 0 14px; background: var(--panel); border-radius: 9px; box-shadow: var(--inset-panel); }
.seller__avatar { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(232,161,58,.4); }
.seller__avatar--initial { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-bright); font-family: var(--font-mono); font-weight: 700; font-size: 18px; }
[data-theme="light"] .seller__avatar--initial { color: var(--accent-ink); }
.seller__info { min-width: 0; }
.seller__name { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.seller__meta { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }

/* embeds */
.embeds { margin: 22px 0; }
.embeds iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 9px; box-shadow: var(--field-inset); }

/* source-badge */
.source-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; line-height: 1; color: var(--accent-ink); background: var(--accent-grad); border-radius: 4px; vertical-align: middle; text-decoration: none; box-shadow: var(--raise); opacity: .8; transition: opacity .15s; }
.source-badge:hover { opacity: 1; filter: none; }
.specs__value--source { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* ============ FORM (создание/редактирование) ============ */
.form { max-width: 760px; margin: 8px 0 24px; padding: 22px 24px; background: var(--panel); border-radius: 10px; box-shadow: var(--inset-panel); }
.form__title { font-family: var(--font-sans); font-size: 24px; font-weight: 700; color: var(--ink-strong); letter-spacing: -.01em; margin: 0 0 20px; }
.form__row { margin-bottom: 18px; }
.form__label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; margin-bottom: 8px; }
.form__req { color: var(--danger); }
.form__control { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 0; border-radius: 6px; background: var(--field); color: var(--ink); font-family: var(--font-sans); font-size: 14px; box-shadow: var(--field-inset); outline: none; transition: box-shadow .12s; }
.form__control::placeholder { color: var(--muted-2); }
.form__control:focus { box-shadow: var(--field-inset), 0 0 0 1px rgba(232,161,58,.45); }
textarea.form__control { min-height: 120px; resize: vertical; line-height: 1.55; }
select.form__control { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="file"].form__control { padding: 9px 14px; font-size: 13px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 0; border-radius: 6px; background: var(--accent-soft); color: var(--ink-2); font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
input[type="file"]::file-selector-button:hover { filter: brightness(1.1); }
.form__hint { display: block; margin-top: 7px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; }
.form__error { display: block; margin-top: 6px; color: var(--danger); font-size: 13px; }

.form__photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.form__photo { position: relative; display: block; width: 100px; height: 100px; border-radius: 6px; overflow: hidden; background: var(--photo-frame); box-shadow: inset 0 1px 3px rgba(120,100,60,.35),0 1px 0 rgba(255,255,255,.5); }
.form__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.form__photo-remove { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 6px; font-family: var(--font-mono); font-size: 11px; color: #fff; background: rgba(0, 0, 0, .55); cursor: pointer; }
.form__photo-remove input { accent-color: var(--danger); }

.btn--lg { height: 50px; padding: 0 28px; font-size: 14px; }

/* ============ MODAL (логин) ============ */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.modal__dialog { position: relative; width: 100%; max-width: 420px; background: var(--panel-solid); border-radius: 12px; box-shadow: 0 22px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(232,161,58,.12); padding: 28px 24px 24px; }
.modal__close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal__close:hover { color: var(--ink); }

/* ============ LOGIN ============ */
.login-page { display: flex; justify-content: center; padding: 40px 0; }
.login-box { width: 380px; max-width: 100%; padding: 28px; background: var(--panel); border-radius: 12px; box-shadow: var(--inset-panel); }
.login-box__title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--ink-strong); text-align: center; }
.login-box__sub { margin: 0 0 22px; font-size: 13px; color: var(--muted); text-align: center; }
.login-box__error { color: var(--danger); text-align: center; margin: 0 0 12px; font-size: 13px; }
.login-providers { display: flex; flex-direction: column; gap: 10px; }
.login-provider { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; background: var(--field); border: 0; border-radius: 8px; box-shadow: var(--field-inset); color: var(--ink); font-family: var(--font-sans); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.login-provider:hover { filter: brightness(1.1); color: var(--ink); }
.login-provider__icon { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: #fff; }
.login-provider__icon--yandex { background: #fc3f1d; }
.login-provider__icon--vk { background: #07f; font-size: 10px; }
.login-provider__icon--telegram { background: #29a3e0; }
.login-provider--btn { width: 100%; }
.login-tg { display: flex; flex-direction: column; gap: 8px; }
.login-tg__status { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.login-tg__link { margin-left: 6px; text-decoration: underline; }
.login-passkey { width: 100%; height: 48px; margin-top: 6px; }
.login-box__hr { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.login-box__hr::before, .login-box__hr::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ============ PROFILE ============ */
.profile { max-width: 760px; margin: 0 auto; }
.profile__flash { margin: 0 0 12px; padding: 10px 14px; border-radius: 6px; font-size: 13px; }
.profile__flash--ok { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.profile__flash--err { background: rgba(224,87,74,.12); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(224,87,74,.35); }
.profile-section__hint { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; line-height: 1.55; margin: 12px 0; }
.profile-items__head .profile-section__title { margin: 0; }
.profile-item { display: flex; flex-direction: row; align-items: center; gap: 14px; margin-bottom: 12px; }
.profile-item .wall-row, .profile-item .wall-compact { flex: 1; }
.profile-item__actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; justify-content: center; padding-right: 4px; }
.profile-item__actions form { margin: 0; }

.notifications-form { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.notifications-toggle { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink); cursor: pointer; }
.notifications-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.notifications-unlink { margin-top: 12px; }
.notifications-unlink form { margin: 0; }

/* THREAD-LIST (inbox + thread в карточке messenger'a) */
.thread-list { display: flex; flex-direction: column; gap: 0; margin: 20px 0; padding: 6px 0; overflow: hidden; }
.thread-list__item { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; background: transparent; border-radius: 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.thread-list__item:last-child { border-bottom: 0; }
.thread-list__item:hover { background: linear-gradient(90deg, rgba(232,161,58,.08), transparent); }
.thread-list__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.thread-list__name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.thread-list__time { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }
.thread-list__preview { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* THREAD (переписка) */
.thread { max-width: 760px; margin: 8px 0 24px; }
.thread__head { margin-bottom: 16px; padding: 14px 16px; background: var(--panel); border-radius: 9px; box-shadow: var(--inset-panel); }
.thread__head .breadcrumb { padding: 0; margin: 0 0 4px; }
.thread__messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; padding: 18px; background: var(--panel); border-radius: 9px; box-shadow: var(--inset-panel); min-height: 200px; }
.msg { max-width: 75%; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--field); color: var(--ink); font-size: 13.5px; line-height: 1.55; box-shadow: var(--field-inset); }
.msg--mine { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--raise); }
.msg__time { display: block; font-family: var(--font-mono); font-size: 10px; margin-top: 5px; opacity: .65; text-align: right; }
.msg-form { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.msg-form textarea { width: 100%; min-height: 100px; }
.msg-form .btn { align-self: flex-start; height: 44px; padding: 0 24px; }
.item-message-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-top: 22px; }
.item-message-form textarea { width: 100%; min-height: 90px; }

.similar { max-width: 1100px; margin-top: 40px; }
.similar__title { font-size: 20px; margin: 0 0 16px; color: var(--ink); }
.thread-list__item-title { display: block; margin: 2px 0; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.thread-list__item-title a { color: var(--muted); }

/* кнопки внутри textarea-форм наследуют общий .btn — отдельных правил не нужно */

/* промо-полоса — light-вариант текста */
[data-theme="light"] .promo { background: var(--accent-grad); }
[data-theme="light"] .promo .container { color: #3a2606; }

/* ============================================================
   PROTOTYPE PARITY — деревянные направляющие, лента, фичи, ценник
   ============================================================ */

/* боковые рейлы — деревянные полосы у краёв окна */
body { padding: 0 14px; }
.rail { position: fixed; top: 0; bottom: 0; width: 14px; background: var(--wood); z-index: 60; pointer-events: none; }
.rail--l { left: 0; box-shadow: inset -3px 0 6px rgba(0,0,0,.5), inset 2px 0 1px rgba(255,255,255,.12); }
.rail--r { right: 0; box-shadow: inset 3px 0 6px rgba(0,0,0,.5), inset -2px 0 1px rgba(255,255,255,.12); }
[data-theme="light"] .rail--l { box-shadow: inset -3px 0 6px rgba(120,80,30,.4), inset 2px 0 1px rgba(255,255,255,.6); }
[data-theme="light"] .rail--r { box-shadow: inset 3px 0 6px rgba(120,80,30,.4), inset -2px 0 1px rgba(255,255,255,.6); }

/* ---------- МОБИЛЬНАЯ НИЖНЯЯ ПАНЕЛЬ ---------- */
.tabbar { display: none; }

@media (max-width: 720px) {
  /* на телефоне деревянные рейлы и боковой отступ съедают ширину — убираем */
  body { padding: 0; }
  .rail { display: none; }
  main.container { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: block; padding: 0 0 env(safe-area-inset-bottom);
    background: var(--fascia); border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 28px rgba(0,0,0,.5), inset 0 2px 1px rgba(255,255,255,.12);
  }
  .tabbar__inner {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    height: 60px; background: var(--fascia); border-radius: 18px 18px 0 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -3px 8px rgba(0,0,0,.4);
  }

  .tabbar__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    height: 100%; border: 0; background: none; cursor: pointer; text-decoration: none;
    color: var(--muted-2); font-family: var(--font-mono);
  }
  .tabbar__ic { position: relative; width: 21px; height: 21px; }
  .tabbar__ic svg { width: 100%; height: 100%; display: block; }
  .tabbar__badge {
    position: absolute; top: -6px; left: 12px;
    min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: var(--accent-grad); color: var(--accent-ink);
    font-family: var(--font-mono); font-size: 9px; font-weight: 700; line-height: 1;
    box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 0 8px rgba(232,161,58,.45);
  }
  .tabbar__label { font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
  .tabbar__item.is-active { color: var(--accent-bright); }
  [data-theme="light"] .tabbar__item.is-active { color: var(--accent-ink); }

  .tabbar__add {
    align-self: center; justify-self: center; display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-top: -20px; border-radius: 16px;
    background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--raise);
  }
  .tabbar__add svg { width: 26px; height: 26px; }
  .tabbar__add:active { transform: translateY(1px); }

  /* Разделы в таббаре: кнопка сама участвует в сетке, лист всплывает над панелью */
  .tabbar__sections { display: contents; }
  .sections-sheet[hidden] { display: none; }
  .sections-sheet { position: fixed; inset: 0; z-index: 80; }
  .sections-sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
  .sections-sheet__panel {
    position: absolute; left: 10px; right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 4px; padding: 6px;
    background: var(--fascia); border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.1);
  }
  .sections-sheet__item {
    display: block; padding: 14px 16px; border-radius: 10px;
    color: var(--ink); font-size: 16px; font-weight: 600; text-decoration: none;
  }
  .sections-sheet__item:active { background: var(--accent-soft); }
  .sections-sheet__item.is-active { color: var(--accent-bright); background: var(--accent-soft); }
}

/* ЛЕНТА: 240px сайдбар фильтров + карточки */
.feed { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; margin-top: 8px; }
.feed:not(:has(.feed__sidebar)) { grid-template-columns: 1fr; }
.feed__sidebar { padding: 18px; background: var(--panel); border-radius: 10px; box-shadow: var(--inset-panel); }
.feed__filters-toggle { display: none; }
/* широкий экран: сайдбар сбоку — фильтры всегда раскрыты, спойлер не нужен.
   Chrome 131+ прячет контент details через content-visibility на ::details-content,
   поэтому одного display:block на теле мало — раскрываем и псевдоэлемент. */
@media (min-width: 901px) {
  .feed__filters > .feed__filters-body { display: block !important; }
  .feed__filters::details-content { content-visibility: visible !important; }
}
/* узкий экран: сайдбар уезжает наверх — прячем фильтры под спойлер */
@media (max-width: 900px) {
  /* негативные отступы растягивают хит-зону на всю панель сайдбара */
  .feed__filters-toggle {
    display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
    margin: -18px; padding: 18px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 600;
  }
  .feed__filters[open] .feed__filters-toggle { margin-bottom: 0; padding-bottom: 0; }
  .feed__filters-toggle::-webkit-details-marker { display: none; }
  .feed__filters-toggle::after { content: '▾'; font-size: 10px; }
  .feed__filters[open] .feed__filters-toggle::after { content: '▴'; }
  .feed__filters[open] .feed__filters-body { margin-top: 16px; }
}
.feed__filter-group + .feed__filter-group { margin-top: 22px; }
.feed__filter-title { margin: 0 0 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.feed__filter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feed__filter-more { display: block; margin-top: 8px; }
.feed__filter-more > a { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); text-decoration: none; }
.feed__filter-more > a::after { content: ' ▾'; }
.feed__filter-more > a:hover { color: var(--accent-bright); }
.feed__filter-more[aria-busy="true"] { opacity: .5; }
.feed__main { min-width: 0; }
.feed__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.feed__count b { color: var(--accent-bright); }
[data-theme="light"] .feed__count b { color: var(--accent-ink); }
.feed__sort { padding: 4px 11px; border-radius: 5px; background: var(--accent-soft); color: var(--ink-2); font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
@media (max-width: 900px) { .feed { grid-template-columns: 1fr; } }

/* PROFILE — компактные строки объявлений (Мои объявления / Избранное) */
.wall-compact-list { display: flex; flex-direction: column; gap: 12px; }
.wall-compact { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--panel); border-radius: 10px; box-shadow: var(--inset-panel); }
.wall-compact__photo { width: 96px; height: 72px; flex: 0 0 96px; border-radius: 7px; }
.wall-compact__photo.photo--empty { min-height: 0; }
.wall-compact__body { flex: 1; min-width: 0; }
.wall-compact__title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.wall-compact__title:hover { color: var(--accent-bright); }
.wall-compact__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.wall-compact__price { color: var(--accent-bright); font-weight: 600; }
[data-theme="light"] .wall-compact__price { color: var(--accent-ink); }

/* ABOUT: 6 фич в grid-2 */
.about__lead { font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 760px; margin: 0 0 24px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature { padding: 18px; background: var(--panel); border-radius: 10px; box-shadow: var(--inset-panel); }
.feature__h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--ink); }
.feature__ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent-bright); flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.feature__ic svg { width: 16px; height: 16px; }
.feature p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }

/* ITEM DETAIL — большой ценник и панель описания */
.item-detail__layout { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 900px) {
    .item-detail__layout { grid-template-columns: minmax(0, 1fr); }
    .item-detail__aside { position: static; }
}
.item-detail__aside .item-detail__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.item-detail__aside .item-detail__title { font-size: 24px; margin: 0 0 14px; line-height: 1.2; }
.price-plate { display: flex; align-items: baseline; gap: 13px; padding: 16px 18px; margin: 0 0 18px; background: var(--field); border-radius: 8px; box-shadow: var(--field-inset); }
.price-plate__big { font-family: var(--font-mono); font-size: 30px; font-weight: 700; color: var(--accent-bright); line-height: 1.1; }
[data-theme="light"] .price-plate__big { color: var(--accent-ink); }
.item-detail__description-panel { margin-top: 22px; padding: 18px; background: var(--panel); border-radius: 10px; box-shadow: var(--inset-panel); }
.item-detail__description-panel .profile-section__title { margin: 0 0 14px; }
.item-detail__description-panel .item-detail__description { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

/* PROFILE — два панели рядом */
.profile { max-width: 1180px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.profile-grid > .profile-section { margin: 0; display: flex; flex-direction: column; }
/* список тянется на всю высоту карточки, пустой бокс — на всю высоту списка
   (карточки Passkey/Способы входа равной высоты, как в прототипе) */
.profile-grid > .profile-section > .profile-list { display: flex; flex-direction: column; flex: 1; margin: 0; }
.profile-grid > .profile-section > .profile-list > .profile-list__row--empty { flex: 1; }
@media (max-width: 700px) { .profile-grid { grid-template-columns: 1fr; } }
.profile .logout-form { margin-top: 4px; }
/* кнопка после списка (напр. «Добавить passkey») — с отступом и на всю ширину */
.profile-section .profile-list + .btn { margin-top: 14px; width: 100%; }

/* ============ MESSENGER — единый список тредов + чат ============ */
.messenger { display: grid; grid-template-columns: 330px 1fr; min-height: 520px; margin-top: 16px; border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: var(--inset-panel); }
.messenger .threads { border-right: 1px solid var(--line); overflow-y: auto; max-height: 70vh; }
.messenger .thread-list__item.is-active { background: linear-gradient(90deg, rgba(232,161,58,.1), transparent); box-shadow: inset 3px 0 0 var(--accent); }
.messenger__chat { display: flex; flex-direction: column; min-width: 0; }
.messenger__empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted-2); text-align: center; }
.messenger__empty--threads { min-height: 0; padding: 18px; }

.messenger__head { display: flex; align-items: center; gap: 13px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.messenger__back { display: none; flex: 0 0 auto; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 6px; background: var(--accent-soft); color: var(--ink-2); font-size: 20px; line-height: 1; text-decoration: none; }
.messenger__head-photo { width: 46px; height: 38px; flex: 0 0 46px; border-radius: 6px; }
.messenger__head-info { flex: 1; min-width: 0; }
.messenger__head-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.messenger__head-title:hover { color: var(--accent-bright); }
.messenger__head-price { font-family: var(--font-mono); font-size: 11px; color: var(--accent-bright); }
[data-theme="light"] .messenger__head-price { color: var(--accent-ink); }
.messenger__head-link { flex: 0 0 auto; height: 34px; padding: 0 14px; font-size: 12.5px; }

.messenger__feed { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px; overflow-y: auto; }
.messenger__feed .msg { box-shadow: var(--field-inset); }

.messenger__form { display: flex; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.messenger__form input[type="text"] { flex: 1; }
.messenger__form .btn { width: 50px; flex: 0 0 50px; padding: 0; }

@media (max-width: 760px) {
    .messenger { grid-template-columns: 1fr; }
    .messenger .threads { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
    .messenger__back { display: inline-flex; }
    /* на узком — показываем либо список, либо чат */
    .messenger--active .threads { display: none; }
    .messenger:not(.messenger--active) .messenger__chat { display: none; }
}


/* ============================================================
   Сброс протёкших из app.css состояний (hover/margin/border),
   которые мои override не перекрывали. Найдено аудитом app.css.
   ============================================================ */
/* hover'ы перекрашивались в светлые/синие токены app.css */
.pill:hover { background: var(--accent-soft); }
.pill--category:hover { background: var(--accent-grad); }
.login-provider:hover { background: var(--field); }
.ts-dropdown .active { background: var(--accent-soft); }
[data-theme="light"] .ts-dropdown .active { background: var(--accent-grad); }
/* лишние отступы/бордеры из app.css */
.brand__sub { margin-left: 0; }
.breadcrumb__sep { margin: 0; }
.login-page { max-width: none; margin: 0; }
.profile-tabs__tab { margin-bottom: 0; }
.msg-form textarea, .item-message-form textarea { border: 0; }


/* ============================================================
   Попап-подсказка про Telegram-оповещения (снизу справа)
   ============================================================ */
.notify-promo {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 340px; max-width: calc(100vw - 32px);
  display: grid; grid-template-columns: auto 1fr; grid-gap: 12px 12px; gap: 12px 12px;
  align-items: start;
  padding: 18px 18px 16px;
  background: var(--panel-solid); border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0,0,0,.55), 0 0 0 1px var(--line-2);
  /* скрыт до срабатывания таймера */
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.notify-promo.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.notify-promo__close {
  position: absolute; top: 6px; right: 10px; border: 0; background: none;
  font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px;
}
.notify-promo__close:hover { color: var(--ink); }

.notify-promo__icon {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent-bright);
}
.notify-promo__icon svg { width: 20px; height: 20px; }

.notify-promo__text { min-width: 0; }
.notify-promo__title {
  margin: 0 0 4px; font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--ink-strong);
}
.notify-promo__body { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

.notify-promo__cta {
  grid-column: 1 / -1; width: 100%; margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.notify-promo__cta-icon { width: 18px; height: 18px; flex: none; }

@media (max-width: 720px) {
  .notify-promo {
    right: 12px; left: 12px; width: auto; max-width: none;
    /* приподнимаем над фиксированным tabbar */
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
