/* Блоки: карточки, панели, чипы, вкладки, меню, значки. Всё сильно скруглено. */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--ring); padding: 20px; min-width: 0; }
.panel { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--ring-inset); min-width: 0; }
.card.press { --press: .985; cursor: pointer; }

/* чипы */
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 34px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: 14px; line-height: 1; white-space: nowrap; color: var(--text); cursor: pointer;
}
@media (min-width: 768px) { .chip { height: 32px; font-size: 13px; } }
/* активный чип: aria-pressed у кнопки-переключателя, aria-current у чипа-ссылки */
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--card); box-shadow: var(--ring); }
.chip--filter { background: var(--surface); }
.chip--filter[aria-pressed="true"], .chip--filter[aria-current="true"] { background: var(--brand); color: var(--on-brand); font-weight: 500; box-shadow: none; }
.chip--filter .icon { color: var(--stars-on, var(--star)); }
.chip--filter[aria-pressed="true"] .icon, .chip--filter[aria-current="true"] .icon { color: inherit; }
@media (hover: hover) {
  .chip:not([aria-pressed="true"]):not([aria-current="true"]):hover { background: var(--surface-2); }
}
/* ряд чипов: на телефоне листается вбок, не ломая страницу.
   Блок с прокруткой обрезает всё, что выходит за его край, включая тени. Поэтому внутри оставлен запас 6px
   (padding), а снаружи он убран обратным отступом (margin) — ряд стоит на том же месте, тень цела. */
.chips { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px; margin: -6px; }
.chips--wrap { flex-wrap: wrap; overflow: visible; }

/* вкладки-сегменты */
.seg {
  display: flex; gap: 4px;
  padding: 4px; background: var(--surface); border-radius: 14px; box-shadow: var(--ring-inset);
}
.seg__tab {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1 1 auto; min-width: 0;
  height: 38px; padding: 0 8px; border-radius: var(--r-xs);
  font-size: 14px; white-space: nowrap; --press: .97;
}
.seg__tab .seg__dot { display: none; }
@media (min-width: 560px) {
  .seg__tab { flex: 1 1 0; padding: 0 12px; }
  .seg__tab .seg__dot { display: block; }
}
@media (min-width: 768px) {
  .seg__tab { height: 36px; }
}
.seg__tab.active { background: var(--card); box-shadow: var(--ring); }
.seg__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--brand)); }

/* значки */
.badge {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 22px; padding: 0 8px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--brand-tint); color: var(--brand-ink);
}
.badge--neutral { background: var(--surface); color: var(--muted); }
.badge--warn { background: var(--warn-tint); color: var(--warn-ink); }
.badge--danger { background: var(--danger-tint); color: var(--danger-ink); }

/* Выпадающее меню — ОДИН вид и ОДИН механизм (select.js) для всех: список в форме, язык в шапке, любые будущие.
   Одинаковые скругление, отступы, тень, пункты и появление. */
.menu {
  min-width: 180px; padding: 4px; background: var(--card); border-radius: var(--r-sm); box-shadow: var(--shadow-pop);
  max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform-origin: top center; z-index: 70;
}
/* открытие и закрытие — одна и та же анимация в разные стороны: проявление + рост от 96% */
@keyframes menu-in { from { opacity: 0; scale: .96; } to { opacity: 1; scale: 1; } }
@keyframes menu-out { from { opacity: 1; scale: 1; } to { opacity: 0; scale: .96; } }
.select.is-open > .menu { opacity: 1; animation: menu-in .16s var(--ease); }
.select.is-closing > .menu { animation: menu-out .16s var(--ease) forwards; }
.menu__item {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px;
  border-radius: 8px; font-size: 14px; white-space: nowrap;
}

.menu__item[aria-current="true"], .menu__item[aria-selected="true"] { font-weight: 500; }
.menu__item .icon { margin-left: auto; color: var(--brand); }
.menu__item[aria-selected="false"] .icon { visibility: hidden; }
.menu__item:focus-visible { outline: 0; background: var(--surface); }
@media (hover: hover) { .menu__item:hover { background: var(--surface); } }

/* аватар и плитка-логотип */
.avatar {
  flex: none; display: grid; place-items: center;
  width: var(--size, 32px); height: var(--size, 32px); border-radius: 50%;
  background: hsl(var(--hue, 160) 55% 90%); color: hsl(var(--hue, 160) 45% 26%);
  font-size: calc(var(--size, 32px) * .38); font-weight: 500; letter-spacing: .02em;
}
.avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.logo-tile {
  flex: none; display: grid; place-items: center;
  width: var(--size, 48px); height: var(--size, 48px); border-radius: 50%;
  background: radial-gradient(120% 120% at 22% 14%, var(--g1), var(--g2) 55%, var(--g3));
  box-shadow: inset 0 0 0 var(--hair) rgba(0, 0, 0, .1), inset 0 1px 1px rgba(255, 255, 255, .5);
  color: #FFFFFF; font: 500 calc(var(--size, 48px) * .4)/1 var(--font-display);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

/* аккордеон (Preline) */
.acc { border-bottom: 1px solid var(--line); }
.acc__toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 14px 0; font-size: 15px; line-height: 22px; -webkit-tap-highlight-color: transparent; }
.acc__toggle .icon { color: var(--muted); transition: transform .25s var(--ease); }
.hs-accordion.active .acc__toggle .icon { transform: rotate(45deg); }
.acc__content { overflow: hidden; transition: height .3s var(--ease); }
.acc__content p { padding: 0 40px 14px 0; color: var(--muted); font-size: 14px; line-height: 21px; max-width: 65ch; }

/* всплывающее сообщение */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 300;
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 10px 16px 10px 12px;
  width: max-content; max-width: min(calc(100% - 32px), 520px);   /* длинное сообщение переносится на вторую строку, а не обрезается */
  background: var(--inverse); color: var(--on-inverse); border-radius: 20px;
  font-size: 14px; line-height: 20px; pointer-events: none;
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity .3s var(--ease-ios), transform .4s var(--ease-ios);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: var(--brand); flex-shrink: 0; }

/* градиентные шары и фоны (orb.js) */
.orb { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; max-width: 100%; }
.orb-flat { position: absolute; inset: 0; width: 100%; height: 100%; }

/* строка-ссылка в списке (меню в шторке) */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 15px; border-bottom: 1px solid var(--line); --press: .98; }
.list-row .icon { color: var(--faint); }

/* плитка с логотипом-картинкой: белый фон, картинка целиком */
.logo-tile--img { overflow: hidden; background: var(--card); box-shadow: var(--ring); text-shadow: none; }
.logo-tile--img img { display: block; width: 100%; height: 100%; object-fit: cover; }   /* круг: картинка заполняет плитку целиком */
