/* M500 v3 — карусель «Для вас» на главном экране /w/.
   Самодостаточный модуль: только классы .fy-*, только существующие переменные widget.css
   (--text, --muted, --line, --line2, --coral, --f-head, --f-body, --r-lg, --ease).
   Карточки — фиксированной (не зависящей от темы) палитры: тёмно-синяя, коралловая, бирюзовая;
   поэтому одинаково премиально выглядят в светлой и тёмной теме. Высота 170 px, одна в линию,
   следующая видна на 16 px, нативный scroll-snap, без библиотек и автопрокрутки. */

.fy { margin: 0 0 18px; }

/* ---- шапка секции ---- */
.fy-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.fy-head h2 { margin: 0; font: 600 20px/1.2 var(--f-head); letter-spacing: -.02em; }
.fy-count { color: var(--muted); font: 600 12px/1 var(--f-head); letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* ---- лента: выезжает за поля экрана, снап по левому краю контента ---- */
.fy-list { list-style: none; display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px 4px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fy-list::-webkit-scrollbar { display: none; }
.fy-item { flex: 0 0 calc(100% - 26px); min-width: 0; display: flex; scroll-snap-align: start; scroll-snap-stop: always; }
.fy-item:last-child { scroll-snap-align: end; }

/* ---- карточка ---- */
.fy-card { position: relative; width: 100%; height: 170px; overflow: hidden; border-radius: var(--r-lg);
  color: #fff; isolation: isolate; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 12px 28px -16px rgba(0, 0, 0, .45); }
.fy-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset; }
/* палитра по виду блока */
.fy-start  { background: radial-gradient(120% 90% at 100% 100%, #2a4f70 0%, rgba(42, 79, 112, 0) 55%), linear-gradient(135deg, #0b1a27 0%, #14314a 100%); }
.fy-tour   { background: radial-gradient(90% 80% at 100% 0%, #ff8c5a 0%, rgba(255, 140, 90, 0) 60%), linear-gradient(135deg, #e04a24 0%, #a8290c 100%); }
.fy-points { background: radial-gradient(110% 90% at 100% 100%, #1b5a5c 0%, rgba(27, 90, 92, 0) 55%), linear-gradient(135deg, #0a2a33 0%, #11484c 100%); }
.fy-news   { background: linear-gradient(135deg, #132637 0%, #1f3d58 100%); }

/* ---- графика: своя зона справа, текст на неё не заходит ---- */
.fy-art { position: absolute; top: 0; right: 0; bottom: 0; width: 136px; pointer-events: none; z-index: 0; }
.fy-art img, .fy-art svg { display: block; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }

/* ---- текст ---- */
.fy-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start;
  height: 100%; padding: 14px 136px 14px 16px; }
.fy-tag { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1.3 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: #ffb9a8; }
.fy-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fy-tour .fy-tag { color: #ffe4d9; }
.fy-points .fy-tag { color: #ffd77a; }
.fy-title { margin: 6px 0 0; font: 600 17px/1.2 var(--f-head); letter-spacing: -.02em; }
.fy-text { margin: 6px 0 0; font: 500 13.5px/1.3 var(--f-body); color: rgba(255, 255, 255, .94); text-wrap: pretty; }
.fy-link { display: inline-flex; align-items: center; gap: 6px; position: relative; min-height: 36px; margin-top: auto; padding: 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset;
  color: #fff; font: 600 13px/1 var(--f-body); text-decoration: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .2s var(--ease); }
.fy-link::after { content: ""; position: absolute; inset: -4px -6px; }   /* область нажатия ≥44 px */
.fy-link:hover, .fy-link:active { background: rgba(255, 255, 255, .24); }
.fy-tour .fy-link { background: rgba(255, 255, 255, .92); color: #a8290c; box-shadow: none; }
.fy-operator { margin: 4px 0 0; font-size: 11px; color: rgba(255, 255, 255, .78); }

/* ---- крестик: 44×44 зона, 30 px видимый круг, над зоной графики, вне текстовой колонки ---- */
.fy-close { position: absolute; z-index: 2; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0; border: 0;
  display: grid; place-items: center; background: none; color: #fff; cursor: pointer; }
.fy-close::before { content: ""; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(10, 18, 26, .38); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fy-close svg { position: relative; width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }

/* ---- состояние после крестика: подтверждение + «Больше не показывать» (вместо постоянной подписи) ---- */
.fy-undo { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; justify-content: center; gap: 10px;
  padding: 16px; background: rgba(8, 19, 28, .96); color: #fff; }
.fy-card.is-hidden .fy-undo { display: flex; }
.fy-card.is-hidden .fy-content, .fy-card.is-hidden .fy-close, .fy-card.is-hidden .fy-art { visibility: hidden; }
.fy-undo p { margin: 0; font: 600 15px/1.3 var(--f-body); }
.fy-undo small { display: block; margin-top: 2px; font: 400 12.5px/1.3 var(--f-body); color: rgba(255, 255, 255, .7); }
.fy-undo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fy-undo-row button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; font: 600 13px/1 var(--f-body); cursor: pointer; }
.fy-undo-back { background: #fff; color: #0b1a27; }
.fy-undo-never { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset; }

/* ---- точки ---- */
.fy-dots { display: flex; justify-content: center; gap: 6px; padding-top: 9px; }
.fy-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 4px; background: var(--line2); cursor: pointer;
  position: relative; transition: width .25s var(--ease), background .25s var(--ease); }
.fy-dots button::after { content: ""; position: absolute; inset: -12px -6px; }   /* область нажатия */
.fy-dots button[aria-current="true"] { width: 20px; background: var(--coral); }

/* ---- узкие экраны ---- */
@media (max-width: 360px) {
  .fy-art { width: 118px; }
  .fy-content { padding-right: 118px; }
  .fy-text { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .fy-list { scroll-behavior: auto; } }

.fy-interest-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; margin-top: 4px; padding: 0 12px;
  border: 0; border-radius: 999px; background: #fff; color: #172630; font: 650 12px/1 var(--f-body); cursor: pointer; }
.fy-card.fy-has-interest { height: 208px; }
.fy-interest-btn::after { content: ""; position: absolute; inset: -6px; }
.fy-interest-btn:disabled { opacity: .65; }

/* APP-29: фотографии в существующей карусели, без отдельного экрана новостей. */
.fy-head h2 { font-size: 18px; }
.fy-photo.fy-card { height: auto; min-height: 184px; background: #102532; }
.fy-photo .fy-art { inset: 0; width: 100%; }
.fy-photo .fy-art img { object-fit: cover; object-position: 70% center; }
.fy-photo .fy-art::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 22, 32, .94), rgba(7, 22, 32, .8) 55%, rgba(7, 22, 32, .12)); }
.fy-photo .fy-content { height: auto; min-height: 184px; padding: 18px 27% 10px 18px; }
.fy-photo .fy-tag { display: none; }
.fy-photo .fy-title { margin: 0; font-size: 23px; line-height: 1.12; }
.fy-photo .fy-text { margin: 9px 0 8px; font-size: 13px; line-height: 1.4; }
.fy-photo .fy-link { min-height: 44px; padding: 0; border-radius: 0; background: none; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.fy-photo .fy-link::after { inset: 0; }
.fy-close span { position: relative; font: 24px/1 var(--f-body); }
.fy :is(button, a):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.fy-dots { gap: 0; padding: 0; }
.fy-dots button, .fy-dots button[aria-current="true"] { width: 44px; height: 44px; border-radius: 0; background: none; }
.fy-dots button::after { inset: auto; top: 19px; left: 19px; width: 6px; height: 6px; border-radius: 4px; background: var(--line2); }
.fy-dots button[aria-current="true"]::after { left: 12px; width: 20px; background: var(--coral); }
.fy-undo-row button, .fy-interest-btn { min-height: 44px; }
.fy-interest-btn::after { inset: 0; }
@media (max-width: 360px) { .fy-photo .fy-content { padding-right: 24%; } .fy-photo .fy-title { font-size: 21px; } }
/* Тот же фотоформат для включённой legacy-ленты: её API и аудитории сохраняются. */
.bn-photo { position: relative; isolation: isolate; min-height: 184px; background: #102532; color: #fff; }
.bn-photo .bn-img { position: absolute; inset: 0; max-width: none; width: 100%; z-index: -1; }
.bn-photo .bn-img img { object-position: 70% center; }
.bn-photo .bn-img::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 22, 32, .94), rgba(7, 22, 32, .8) 55%, rgba(7, 22, 32, .62)); }
.bn-photo .bn-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 8px; }
.bn-photo .bn-t { color: #fff; font: 600 20px/1.15 var(--f-head); letter-spacing: -.02em; padding-right: 38px; }
.bn-photo .bn-x { color: #fff; font-size: 13px; line-height: 1.4; }
.bn-photo .bn-act { margin-top: auto; flex-wrap: wrap; gap: 10px; }
.bn-photo .bn-more, .bn-photo .bn-hide { color: #fff; min-height: 44px; }
.bn-photo .bn-more { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.bn-photo .bn-hide { font-size: 12px; }
.bn :is(button, a):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 360px) { .bn-photo .bn-t { font-size: 18px; } }
.fy-list, .bn-rail { align-items: stretch; }
.bn-item { display: flex; }
.bn-card { flex: 1; }
.bn-photo .bn-x { display: block; -webkit-line-clamp: unset; overflow: visible; }
/* Крестик: видимая44px цель; скрытие на7дней вместо прежнего постоянного отказа. */
.bn-card { position: relative; }
.bn-card:not(.bn-photo) .bn-body { padding-right: 50px; }
.bn-hide, .bn-photo .bn-hide { position: absolute; top: 5px; right: 5px; z-index: 2; display: grid; place-items: center;
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  color: #fff; background: rgba(7, 22, 32, .7); font: 26px/1 var(--f-body); text-decoration: none; }
.bn-hide:hover { background: #102532; text-decoration: none; }
