/* FH1, Claude Live, 26.11.2026. Шапка ленты TE (вариант A): строка «Лента · Пилот» с «Мои публикации», настройками
   и «＋ Пост», одна карусель, окно «Настройки ленты», пустые состояния одной строкой, хвост бесконечной прокрутки,
   плашка новых публикаций и жест «потянуть вниз». Разметку строит live-feed-head-fh1.*.js. Прежние органы скрыты
   только под html[data-live-feed-head="fh1"], который ставит скрипт после сборки шапки: без скрипта страница как раньше.
   Тёмная тема TE, светлая в цветах кабинета (html[data-theme=trs]).
   FR1, 27.11.2026: выбранное и главное в тёмной теме красным (#c7343c, белый текст), слово Дмитрия 27.11. */
html[data-live-feed-head="fh1"] {
  --fh1-fg: #f8fafc;
  --fh1-muted: #b8bcc0;
  --fh1-line: rgba(248, 250, 252, .2);
  --fh1-line-soft: rgba(248, 250, 252, .1);
  --fh1-sel-bg: #c7343c;
  --fh1-sel-fg: #ffffff;
  --fh1-dot: #ff4a4a;
  --fh1-on: #ed2f2f;
  --fh1-off: #3a3c3e;
  --fh1-knob: #bdbfc1;
  --fh1-sheet: #0d0e0f;
  --fh1-dim: rgba(0, 0, 0, .58);
  --fh1-focus: #f8fafc;
  --fh1-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
html[data-live-feed-head="fh1"][data-theme="trs"] {
  --fh1-fg: #16231c;
  --fh1-muted: #5b6b62;
  --fh1-line: #c9cbca;
  --fh1-line-soft: #e4e7e5;
  --fh1-sel-bg: #315f50;
  --fh1-sel-fg: #ffffff;
  --fh1-dot: #d92d2d;
  --fh1-on: #315f50;
  --fh1-off: #c9cbca;
  --fh1-knob: #ffffff;
  --fh1-sheet: #ffffff;
  --fh1-dim: rgba(22, 35, 28, .34);
  --fh1-focus: #315f50;
  --fh1-shadow: 0 8px 28px rgba(22, 35, 28, .18);
}

/* ---------- прежние органы: скрыты, но остаются в разметке и нажимаются скриптом ---------- */
html[data-live-feed-head="fh1"] .nutrition-main > .live-feed-compact[data-feed-opening-nav],
html[data-live-feed-head="fh1"] .nutrition-main > .feed-toolbar[data-feed-opening-tools],
html[data-live-feed-head="fh1"] #nutrition-content [data-ff-seg="feed"],
html[data-live-feed-head="fh1"] #nutrition-content [data-ff-bar="feed"][data-fh1-empty-bar],
html[data-live-feed-head="fh1"] #nutrition-content [data-feed-view-prefs] > section.tl-fprefs,
html[data-live-feed-head="fh1"] #nutrition-content .tl-filters,
html[data-live-feed-head="fh1"] #nutrition-content details[data-repost-settings],
html[data-live-feed-head="fh1"] [data-fh1-more],
html[data-live-feed-head="fh1"] .nsc-reposts[data-fh1-empty],
html[data-live-feed-head="fh1"] .nsc-reposts > p[role="status"],
html[data-live-feed-head="fh1"] .nsc-reposts > div + button.tl-btn,
html[data-live-feed-head="fh1"] [data-fh1-dupe],
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty[data-fh1-dupe],
html[data-live-feed-head="fh1"] #nutrition-content p[data-fh1-failed],
html[data-live-feed-head="fh1"] #nutrition-content p[data-fh1-quiet] {
  display: none !important;
}
/* строка «Открываем публикации…» над списком при подгрузке порции сдвигала бы ленту: под лентой свой индикатор */
html[data-live-feed-head="fh1"] #nutrition-content[aria-labelledby="nutrition-tab-te-feed"] div:has(> [data-publication-list] > article) > p[role="status"]:not(.tl-fp-status) {
  display: none !important;
}
html[data-live-feed-head="fh1"] #nutrition-content[data-fh1-only="efir"] [data-publication-list] > :not(.is-efir-item),
html[data-live-feed-head="fh1"] #nutrition-content[data-fh1-only="efir"] small[data-feed-filter-scope] {
  display: none !important;
}

/* ---------- строка заголовка ---------- */
html[data-live-feed-head="fh1"] .nutrition-main > .nutrition-heading {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
html[data-live-feed-head="fh1"] .nutrition-main > .nutrition-heading > div:first-child { flex: none; min-width: 0; }
html[data-live-feed-head="fh1"] .nutrition-main > .nutrition-heading > .nutrition-pilot {
  order: 1;
  margin: 3px 0 0 !important;
  flex: none;
}
.fh1-actions {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.fh1-ic,
.fh1-post {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  font: inherit;
}
.fh1-ic::before,
.fh1-post::before,
.fh1-chips > button::before {
  content: "";
  position: absolute;
  inset: -4px -3px;
}
.fh1-ic {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--fh1-line);
  border-radius: 8px;
  background: transparent;
  color: var(--fh1-fg);
}
.fh1-ic[hidden], .fh1-post[hidden] { display: none; }
.fh1-ic[aria-pressed="true"] { background: var(--fh1-sel-bg); border-color: var(--fh1-sel-bg); color: var(--fh1-sel-fg); }
.fh1-i { width: 17px; height: 17px; display: block; }
.fh1-post {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--fh1-sel-bg);
  border-radius: 8px;
  background: var(--fh1-sel-bg);
  color: var(--fh1-sel-fg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fh1-post .fh1-i { width: 15px; height: 15px; }
.fh1-ic:focus-visible,
.fh1-post:focus-visible,
.fh1-chips > button:focus-visible,
.fh1-sheet button:focus-visible,
.fh1-sheet summary:focus-visible,
.fh1-new:focus-visible,
.fh1-tail a:focus-visible,
[data-fh1-act]:focus-visible {
  outline: 2px solid var(--fh1-focus);
  outline-offset: 2px;
}
@media (max-width: 359px) {
  html[data-live-feed-head="fh1"] .nutrition-main > .nutrition-heading > .nutrition-pilot { display: none; }
}
@media (max-width: 339px) {
  .fh1-post > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fh1-post { padding: 0 10px; }
}

/* ---------- карусель ---------- */
.fh1-rail {
  position: relative;
  margin: 10px 0 4px;
  min-width: 0;
}
.fh1-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-inline: 16px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.fh1-chips::-webkit-scrollbar { display: none; }
.fh1-rail.is-over:not(.at-end) .fh1-chips {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
}
.fh1-rail.is-over:not(.at-start):not(.at-end) .fh1-chips {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 44px), transparent);
}
.fh1-rail.is-over.at-end:not(.at-start) .fh1-chips {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px);
  mask-image: linear-gradient(90deg, transparent, #000 28px);
}
.fh1-chips > button {
  position: relative;
  flex: none;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--fh1-line);
  border-radius: 999px;
  background: transparent;
  color: var(--fh1-fg);
  font: inherit;
  font-size: 12px;
  font-weight: inherit;
  letter-spacing: .04em;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fh1-chips > button[hidden] { display: none; }
.fh1-chips > button[aria-checked="true"] {
  background: var(--fh1-sel-bg);
  border-color: var(--fh1-sel-bg);
  color: var(--fh1-sel-fg);
  font-weight: 600;
}
.fh1-chips > button[aria-disabled="true"] { opacity: .55; }
.fh1-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fh1-dot); flex: none; }
.fh1-chips > button[aria-checked="true"] .fh1-dot { box-shadow: 0 0 0 2px rgba(255, 74, 74, .25); }
@media (max-width: 699px) {
  .fh1-chips { margin-inline: -16px; padding-inline: 16px; }
  .fh1-rail.is-over:not(.at-end) .fh1-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 52px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 52px), transparent); }
}

/* ---------- лента сразу под каруселью; пустые состояния одной строкой ---------- */
html[data-live-feed-head="fh1"] #nutrition-content [data-feed-view-prefs]:empty { display: none; }
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty {
  display: block !important;
  margin: 0 !important;
  padding: 18px 8px 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  text-align: center;
}
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty > svg { display: none !important; }
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty p { margin: 0 auto !important; max-width: 34em; display: block !important; }
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty p b {
  display: inline !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  color: var(--fh1-fg) !important;
}
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty p b::after { content: ". "; }
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty p small {
  display: inline !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  letter-spacing: .02em !important;
  color: var(--fh1-muted) !important;
}
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty .ff-btns { display: block !important; margin: 2px 0 0 !important; }
html[data-live-feed-head="fh1"] #nutrition-content .ff-empty .tl-btn,
html[data-live-feed-head="fh1"] #nutrition-content .feed-first-status .tl-btn,
html[data-live-feed-head="fh1"] #nutrition-content p[role="status"] > button,
html[data-live-feed-head="fh1"] #nutrition-content .tl-fp-status [data-fh1-act],
.fh1-tail a {
  display: inline-block !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 10px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--fh1-fg) !important;
  font: inherit;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  cursor: pointer;
}
html[data-live-feed-head="fh1"] #nutrition-content .feed-first-status,
html[data-live-feed-head="fh1"] #nutrition-content p[data-fh1-status],
html[data-live-feed-head="fh1"] #nutrition-content .tl-fp-status:not([hidden]),
html[data-live-feed-head="fh1"] #nutrition-content small[data-feed-filter-scope] {
  display: block;
  margin: 0 !important;
  padding: 14px 8px 4px !important;
  border: 0 !important;
  background: none !important;
  text-align: center !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  color: var(--fh1-muted) !important;
}
html[data-live-feed-head="fh1"] #nutrition-content p[data-fh1-status]:empty,
html[data-live-feed-head="fh1"] #nutrition-content small[data-feed-filter-scope]:empty { display: none !important; }
html[data-live-feed-head="fh1"] #nutrition-content .feed-first-status > p { margin: 0 !important; font-size: 12px !important; }
html[data-live-feed-head="fh1"] #nutrition-content .feed-first-status .feed-first-progress { margin: 10px auto 0 !important; }

/* ---------- хвост: подгрузка, конец, ошибка ---------- */
.fh1-tail {
  min-height: 56px;
  padding: 8px 0 24px;
  text-align: center;
}
.fh1-bar {
  display: block;
  visibility: hidden;
  width: 112px;
  height: 2px;
  margin: 10px auto 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--fh1-line-soft);
}
.fh1-bar > i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--fh1-fg);
  animation: fh1-slide 1.1s ease-in-out infinite;
}
.fh1-tail[data-state="loading"] .fh1-bar { visibility: visible; }
.fh1-line {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: .02em;
  color: var(--fh1-muted);
}
.fh1-line:empty { display: none; }
@keyframes fh1-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ---------- плашка новых публикаций ---------- */
.fh1-new {
  position: fixed;
  z-index: 45;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  height: 36px;
  padding: 0 16px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--fh1-sel-bg);
  color: var(--fh1-sel-fg);
  box-shadow: var(--fh1-shadow);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -150%);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.fh1-new[hidden] { display: none; }
.fh1-new.is-on { transform: translate(-50%, 0); opacity: 1; }
.fh1-new .fh1-i { width: 15px; height: 15px; }
.fh1-new::before { content: ""; position: absolute; inset: -4px -2px; }

/* ---------- «потянуть вниз» ---------- */
.fh1-ptr {
  position: fixed;
  z-index: 44;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  left: 50%;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fh1-line);
  border-radius: 50%;
  background: var(--fh1-sheet);
  color: var(--fh1-fg);
  box-shadow: var(--fh1-shadow);
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(var(--fh1-pull, 0px) - 52px));
}
.fh1-ptr.is-on { opacity: 1; }
.fh1-ptr > span { display: grid; place-items: center; transition: transform .15s ease; }
.fh1-ptr.is-ready > span { transform: rotate(180deg); }
.fh1-ptr.is-spin { transform: translateY(14px); transition: transform .2s ease; }
.fh1-ptr.is-spin > span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--fh1-line);
  border-top-color: var(--fh1-fg);
  border-radius: 50%;
  animation: fh1-spin .8s linear infinite;
}
.fh1-ptr.is-spin > span > svg { display: none; }
@keyframes fh1-spin { to { transform: rotate(360deg); } }

/* ---------- окно «Настройки ленты» ---------- */
html.fh1-lock, html.fh1-lock body { overflow: hidden; }
.fh1-sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.fh1-sheet-wrap[hidden] { display: none; }
.fh1-dim { position: absolute; inset: 0; background: var(--fh1-dim); opacity: 0; transition: opacity .2s ease; }
.fh1-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--fh1-line);
  border-radius: 22px 22px 0 0;
  background: var(--fh1-sheet);
  color: var(--fh1-fg);
  box-shadow: var(--fh1-shadow);
  transform: translateY(100%);
  transition: transform .26s ease;
  outline: none;
}
.fh1-sheet-wrap.is-open .fh1-dim { opacity: 1; }
.fh1-sheet-wrap.is-open .fh1-sheet { transform: none; }
.fh1-grab { display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 4px; background: var(--fh1-line); }
.fh1-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.fh1-sheet-head h2 { margin: 0; font-size: 16px; font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--fh1-fg); }
.fh1-x { border-color: transparent; }
.fh1-rows { display: block; }
.fh1-row {
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--fh1-line-soft);
  border-radius: 0;
  background: none;
  color: var(--fh1-fg);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-transform: none;
  letter-spacing: .02em;
}
.fh1-row[hidden], .fh1-block[hidden], .fh1-note[hidden] { display: none; }
button.fh1-row { cursor: pointer; }
.fh1-txt { min-width: 0; }
.fh1-txt b { display: block; font-size: 13px; font-weight: 400; letter-spacing: .02em; }
.fh1-txt small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--fh1-muted); }
.fh1-txt small:empty { display: none; }
.fh1-go { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--fh1-muted); }
.fh1-go .fh1-i { width: 15px; height: 15px; }
.fh1-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--fh1-off);
  cursor: pointer;
}
.fh1-switch::before { content: ""; position: absolute; inset: -8px -2px; }
.fh1-switch > i {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fh1-knob);
  transition: transform .15s ease;
}
.fh1-switch[aria-checked="true"] { background: var(--fh1-on); }
.fh1-switch[aria-checked="true"] > i { transform: translateX(18px); background: #fff; }
.fh1-switch[aria-disabled="true"] { opacity: .5; cursor: default; }
.fh1-note { margin: 8px 0 0; font-size: 11px; line-height: 1.4; color: var(--fh1-muted); }
.fh1-sub { margin: 16px 0 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fh1-muted); }
.fh1-chipset { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 14px; border-bottom: 1px solid var(--fh1-line-soft); }
.fh1-chip {
  position: relative;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--fh1-line);
  border-radius: 999px;
  background: transparent;
  color: var(--fh1-fg);
  font: inherit;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}
.fh1-chip::before { content: ""; position: absolute; inset: -5px -3px; }
.fh1-chip[aria-pressed="true"] { background: var(--fh1-sel-bg); border-color: var(--fh1-sel-bg); color: var(--fh1-sel-fg); font-weight: 600; }
.fh1-chip[aria-disabled="true"] { opacity: .55; }
.fh1-chip.is-author { margin-right: 10px; }
.fh1-row--view { flex-wrap: wrap; row-gap: 8px; }
.fh1-seg { display: inline-flex; padding: 2px; border: 1px solid var(--fh1-line); border-radius: 9px; }
.fh1-seg > button {
  position: relative;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--fh1-muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
  cursor: pointer;
}
.fh1-seg > button[aria-checked="true"] { background: var(--fh1-sel-bg); color: var(--fh1-sel-fg); }
.fh1-block[data-fh1-row="reposts"] { padding: 4px 0 0; }
.fh1-block[data-fh1-row="reposts"] details[data-repost-settings] { display: block !important; margin: 0; }
.fh1-block[data-fh1-row="reposts"] details[data-repost-settings] > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--fh1-fg);
  cursor: pointer;
  list-style: none;
}
.fh1-block[data-fh1-row="reposts"] details[data-repost-settings] > summary::-webkit-details-marker { display: none; }
.fh1-block[data-fh1-row="reposts"] details[data-repost-settings] > summary::after {
  content: "›";
  font-size: 16px;
  color: var(--fh1-muted);
  transition: transform .15s ease;
}
.fh1-block[data-fh1-row="reposts"] details[data-repost-settings][open] > summary::after { transform: rotate(90deg); }
@media (min-width: 700px) {
  .fh1-sheet {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 460px;
    max-height: min(84vh, 720px);
    margin-left: -230px;
    padding: 14px 22px 22px;
    border: 1px solid var(--fh1-line);
    border-radius: 16px;
    transform: translateY(-46%) scale(.98);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
  }
  .fh1-sheet-wrap.is-open .fh1-sheet { transform: translateY(-50%); opacity: 1; }
  .fh1-grab { display: none; }
}

.fh1-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .fh1-new, .fh1-sheet, .fh1-dim, .fh1-switch > i, .fh1-ptr, .fh1-ptr > span { transition: none !important; }
  .fh1-bar > i, .fh1-ptr.is-spin > span { animation-duration: 2.4s; }
}
