/* =========================================================
   4HE / COMPONENTS
   Common reusable UI components only
   ========================================================= */

/* =========================
   ACTION BURSTS
   ========================= */

.ui-burst-host {
  position: relative;
  overflow: visible;
}

.ui-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ui-burst__item {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  font-size: 14px;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: uiBurstFloat 1.1s ease forwards;
  animation-delay: var(--burst-delay, 0ms);
  will-change: transform, opacity;
}

.ui-burst--like .ui-burst__item {
  color: var(--success);
}

.ui-burst--dislike .ui-burst__item {
  color: var(--danger);
}

.ui-burst--favorite .ui-burst__item {
  color: #79bf19;
}

@keyframes uiBurstFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(0.6) rotate(0deg);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      translate(var(--burst-x, 0px), -42px)
      scale(1.15)
      rotate(var(--burst-rotate, 0deg));
  }
}

/* =========================
   SHARE POPUP
   ========================= */

.feed-card__actions-right,
.profile-feed-card__actions {
  position: relative;
}

.feed-card__action--share,
.profile-feed-card__action--share {
  cursor: pointer;
}

.share2026 {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 35;
  width: 320px;
  max-width: min(320px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.theme-dark .share2026 {
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.34);
}

.share2026.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.share2026__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share2026__title {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.share2026__close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.share2026__close .i-svg {
  width: 22px;
  height: 22px;
}

.share2026__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.share2026__close:active {
  transform: scale(0.96);
}

.share2026__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.share2026-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.share2026-item:hover {
  color: var(--text);
  text-decoration: none;
}

.share2026-item__icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.share2026-item__icon .i-svg {
  width: 25px;
  height: 25px;
}

.share2026-item:hover .share2026-item__icon {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.share2026-item:active .share2026-item__icon {
  transform: scale(0.96);
}

.share2026-item__label {
  min-width: 0;
  color: var(--text-soft);
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
}

.share2026__copy {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.share2026__copy .i-svg {
  width: 24px;
  height: 24px;
}

.share2026__copy:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.share2026__copy:active {
  transform: scale(0.985);
}

.share2026__copy.is-success {
  background: var(--success-soft);
  border-color: rgba(32, 177, 90, 0.18);
  color: var(--success);
}

/* =========================================================
   4HE / PAGINATION
   Load more + page numbers without wrapper card
   ========================================================= */

.pagination {
  width: 100%;
  display: grid;
  gap: 10px;
  margin: 10px 0 18px;
}

.pagination:empty {
  display: none;
}

/* =========================
   LOAD MORE
   ========================= */

.pagination__load {
  width: 100%;
}

.pagination__load:empty {
  display: none;
}

.pagination__load a {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
  color: var(--text);

  text-decoration: none;
  box-shadow: none;

  font-size: 14px;
  line-height: 1;
  font-weight: 700;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.pagination__load a:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
  text-decoration: none;
}

.pagination__load a:active {
  transform: scale(0.99);
}

.pagination__load-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pagination__load-icon {
  width: 17px;
  height: 17px;
  color: var(--accent-main);
}

.pagination__load.is-loading a,
.bottom-nav__load.is-loading a {
  pointer-events: none;
  opacity: 0.78;
}

/* =========================
   ROW
   ========================= */

.pagination__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.pagination__row--inner {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.pagination__prev:empty,
.pagination__next:empty {
  display: none;
}

/* =========================
   PAGES
   ========================= */

.pagination__pages {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

/* DLE {pages}: a / span / strong */
.pagination__pages a,
.pagination__pages span,
.pagination__pages strong {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);

  text-decoration: none;
  box-shadow: none;

  font-size: 14px;
  line-height: 1;
  font-weight: 700;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.pagination__pages a:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
  text-decoration: none;
}

.pagination__pages a:active {
  transform: scale(0.96);
}

/* Активная страница DLE чаще всего приходит span/strong */
.pagination__pages span,
.pagination__pages strong,
.pagination__pages .current,
.pagination__pages .navigation-active {
  background: var(--accent-main);
  border-color: var(--accent-main);
  color: #fff;
}

/* Если DLE выводит многоточие как span */
.pagination__pages span:not([class]) {
  cursor: default;
}

/* =========================
   PREV / NEXT BUTTONS
   ========================= */

.pagination__prev,
.pagination__next {
  display: flex;
  align-items: center;
}

.pagination__prev a,
.pagination__next a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);

  text-decoration: none;
  box-shadow: none;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.pagination__prev a:hover,
.pagination__next a:hover {
  background: var(--accent-main-soft);
  border-color: rgba(45, 123, 255, 0.16);
  color: var(--accent-main);
  text-decoration: none;
}

.pagination__prev a:active,
.pagination__next a:active {
  transform: scale(0.97);
}

.pagination__nav-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 13px;

  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.pagination__nav-btn .i-svg {
  width: 15px;
  height: 15px;
}

/* =========================
   DARK
   ========================= */

.theme-dark .pagination__load a,
.theme-dark .pagination__pages a,
.theme-dark .pagination__pages span,
.theme-dark .pagination__pages strong,
.theme-dark .pagination__prev a,
.theme-dark .pagination__next a {
  background: var(--surface);
  border-color: var(--border);
}

.theme-dark .pagination__load a:hover,
.theme-dark .pagination__pages a:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.theme-dark .pagination__pages span,
.theme-dark .pagination__pages strong,
.theme-dark .pagination__pages .current,
.theme-dark .pagination__pages .navigation-active {
  background: var(--accent-main);
  border-color: var(--accent-main);
  color: #fff;
}

/* =========================
   RESPONSIVE
   ========================= */

@media screen and (max-width: 768px) {
  .pagination {
    gap: 9px;
    margin: 8px 0 15px;
  }

  .pagination__load a {
    min-height: 48px;
    border-radius: 16px;
    font-size: 13px;
  }

  .pagination__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .pagination__row--inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pagination__row--inner .pagination__prev {
    display: none;
  }

  .pagination__pages {
    gap: 6px;
  }

  .pagination__pages a,
  .pagination__pages span,
  .pagination__pages strong {
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 13px;
  }

  .pagination__nav-btn {
    min-height: 35px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 12px;
  }
}

@media screen and (max-width: 640px) {
  .pagination {
    gap: 8px;
    margin: 8px 0 12px;
    padding: 0 10px;
  }

  .pagination__load a {
    min-height: 46px;
    border-radius: 15px;
  }

  .pagination__row,
  .pagination__row--inner {
    grid-template-columns: 1fr;
  }

  .pagination__pages {
    justify-content: center;
  }

  .pagination__next {
    width: 100%;
  }

  .pagination__next a {
    width: 100%;
    margin: 0 10px;
  }

  .pagination__nav-btn {
    width: 100%;
  }
}

/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .pagination__load a,
  .pagination__pages a,
  .pagination__pages span,
  .pagination__pages strong,
  .pagination__prev a,
  .pagination__next a {
    transition: none !important;
  }
}
/* =========================================================
   4HE / POLL
   Clean orange poll card
   ========================================================= */

.poll-card {
  --poll-accent: var(--accent-fire);
  --poll-accent-hover: var(--accent-fire-hover);
  --poll-accent-soft: var(--accent-fire-soft);

  position: relative;
  margin: 0 0 16px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 138, 31, 0.16), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(255, 197, 90, 0.10), transparent 30%),
    linear-gradient(180deg, var(--surface), var(--surface));
  border: 1px solid rgba(255, 138, 31, 0.16);
  border-radius: 22px;
  box-shadow: none;
}

.feed-card__poll .poll-card {
  margin: 0;
}

.poll-card::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 138, 31, 0.10);
  filter: blur(34px);
  pointer-events: none;
}

.poll-card__inner {
  position: relative;
  z-index: 1;
  padding: 17px;
}

/* =========================
   HEAD
   ========================= */

.poll-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 15px;
}

.poll-card__title-wrap {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.poll-card__badge {
  width: max-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: rgba(255, 138, 31, 0.12);
  border: 1px solid rgba(255, 138, 31, 0.16);
  border-radius: 999px;
  color: var(--poll-accent);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.poll-card__badge-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.poll-card__title {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.poll-card__more {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  background: rgba(255, 138, 31, 0.09);
  border: 1px solid rgba(255, 138, 31, 0.14);
  border-radius: 999px;
  color: var(--poll-accent);
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.poll-card__more:hover {
  background: rgba(255, 138, 31, 0.14);
  border-color: rgba(255, 138, 31, 0.22);
  color: var(--poll-accent-hover);
  text-decoration: none;
}

.poll-card__more:active {
  transform: scale(0.98);
}

/* =========================
   LIST / ANSWERS
   ========================= */

.poll-card__list,
.poll-card .vote_list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
}

.poll-card__list > br,
.poll-card .vote_list > br {
  display: none !important;
}

.poll-card__list ul,
.poll-card__list ol,
.poll-card .vote_list ul,
.poll-card .vote_list ol {
  display: grid;
  gap: 9px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.poll-card__list li,
.poll-card .vote_list li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Вариант ответа */
.poll-card__list label,
.poll-card .vote_list label {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  margin: 4px 0;
  background: var(--surface);
  border: 1px solid rgba(255, 138, 31, 0.14);
  border-radius: 15px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.poll-card__list label:hover,
.poll-card .vote_list label:hover {
  background: rgba(255, 138, 31, 0.06);
  border-color: rgba(255, 138, 31, 0.24);
}

.poll-card__list label:active,
.poll-card .vote_list label:active {
  transform: scale(0.992);
}

/* Radio / checkbox */
.poll-card__list input[type="radio"],
.poll-card__list input[type="checkbox"],
.poll-card .vote_list input[type="radio"],
.poll-card .vote_list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 0;
  background: var(--surface);
  border: 1px solid rgba(255, 138, 31, 0.34);
  border-radius: 50%;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.poll-card__list input[type="checkbox"],
.poll-card .vote_list input[type="checkbox"] {
  border-radius: 7px;
}

.poll-card__list input[type="radio"]::after,
.poll-card .vote_list input[type="radio"]::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.poll-card__list input[type="checkbox"]::after,
.poll-card .vote_list input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(45deg) scale(0.8);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.poll-card__list input[type="radio"]:checked,
.poll-card__list input[type="checkbox"]:checked,
.poll-card .vote_list input[type="radio"]:checked,
.poll-card .vote_list input[type="checkbox"]:checked {
  background: var(--poll-accent);
  border-color: var(--poll-accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.14);
}

.poll-card__list input[type="radio"]:checked::after,
.poll-card .vote_list input[type="radio"]:checked::after {
  opacity: 1;
  transform: scale(1);
}

.poll-card__list input[type="checkbox"]:checked::after,
.poll-card .vote_list input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.poll-card__list input[type="radio"]:focus-visible,
.poll-card__list input[type="checkbox"]:focus-visible,
.poll-card .vote_list input[type="radio"]:focus-visible,
.poll-card .vote_list input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.18);
}

/* =========================
   RESULTS / DLE PROGRESS
   ========================= */

.poll-card__list .voteanswer, .poll-card__list .vote_answer, .poll-card__list .poll-result, .poll-card__list .poll-result-item, .poll-card .vote_list .voteanswer, .poll-card .vote_list .vote_answer, .poll-card .vote_list .poll-result, .poll-card .vote_list .poll-result-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid rgba(255, 138, 31, 0.14);
  border-radius: 15px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

/* DLE: <div class="pollprogress"><span class="poll1" style="width:100%;">100%</span></div> */
.poll-card .pollprogress,
.poll-card__list .pollprogress,
.poll-card .vote_list .pollprogress,
.poll-card__list .poll-progress,
.poll-card__list .voteprogress,
.poll-card__list .vote_progress,
.poll-card__list .progress,
.poll-card .vote_list .poll-progress,
.poll-card .vote_list .voteprogress,
.poll-card .vote_list .vote_progress,
.poll-card .vote_list .progress {
  position: relative;
  width: 100%;
  height: 12px;
  margin: 7px 0 0;
  overflow: hidden;
  background: rgba(255, 138, 31, 0.12);
  border-radius: 999px;
}

.poll-card .pollprogress span,
.poll-card__list .pollprogress span,
.poll-card .vote_list .pollprogress span,
.poll-card__list .poll-progress span,
.poll-card__list .voteprogress span,
.poll-card__list .vote_progress span,
.poll-card__list .progress span,
.poll-card__list .progress-bar,
.poll-card .vote_list .poll-progress span,
.poll-card .vote_list .voteprogress span,
.poll-card .vote_list .vote_progress span,
.poll-card .vote_list .progress span,
.poll-card .vote_list .progress-bar {
  height: 100%;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 7px;
  background: var(--poll-accent);
  border-radius: inherit;
  color: #fff;
  text-align: right;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.poll-card .pollprogress .poll1,
.poll-card .pollprogress .poll2,
.poll-card .pollprogress .poll3,
.poll-card .pollprogress .poll4,
.poll-card .pollprogress .poll5 {
  background: var(--poll-accent);
}

.poll-card__list .poll-percent,
.poll-card__list .votepercent,
.poll-card__list .vote_percent,
.poll-card__list .poll-votes,
.poll-card__list .vote_votes,
.poll-card .vote_list .poll-percent,
.poll-card .vote_list .votepercent,
.poll-card .vote_list .vote_percent,
.poll-card .vote_list .poll-votes,
.poll-card .vote_list .vote_votes {
  color: var(--poll-accent);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

/* =========================
   META
   ========================= */

.poll-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.poll-card__pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  background: rgba(255, 138, 31, 0.10);
  border: 1px solid rgba(255, 138, 31, 0.14);
  border-radius: 999px;
  color: var(--poll-accent);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.poll-card .vote_votes,
.poll-card .grey {
  color: var(--poll-accent);
}

/* =========================
   ACTIONS
   ========================= */

.poll-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.poll-card__btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.poll-card__btn b {
  font: inherit;
}

.poll-card__btn:active {
  transform: scale(0.985);
}

.poll-card__btn--primary {
  background: var(--poll-accent);
  border-color: var(--poll-accent);
  color: #fff;
}

.poll-card__btn--primary:hover {
  background: var(--poll-accent-hover);
  border-color: var(--poll-accent-hover);
  color: #fff;
}

.poll-card__btn--ghost {
  background: var(--surface);
  border-color: rgba(255, 138, 31, 0.22);
  color: var(--poll-accent);
}

.poll-card__btn--ghost:hover {
  background: rgba(255, 138, 31, 0.10);
  border-color: rgba(255, 138, 31, 0.30);
  color: var(--poll-accent-hover);
}

.poll-card__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.poll-card__btn-icon .i-svg,
.poll-card__btn .i-svg {
  width: 16px;
  height: 16px;
}

/* =========================
   DARK
   ========================= */

.theme-dark .poll-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 138, 31, 0.13), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(255, 197, 90, 0.07), transparent 30%),
    linear-gradient(180deg, var(--surface), var(--surface));
  border-color: rgba(255, 138, 31, 0.18);
}

.theme-dark .poll-card__list label,
.theme-dark .poll-card .vote_list label,
.theme-dark .poll-card__list .pollanswer,
.theme-dark .poll-card__list .voteanswer,
.theme-dark .poll-card__list .vote_answer,
.theme-dark .poll-card__list .poll-result,
.theme-dark .poll-card__list .poll-result-item,
.theme-dark .poll-card .vote_list .pollanswer,
.theme-dark .poll-card .vote_list .voteanswer,
.theme-dark .poll-card .vote_list .vote_answer,
.theme-dark .poll-card .vote_list .poll-result,
.theme-dark .poll-card .vote_list .poll-result-item {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 138, 31, 0.13);
}

.theme-dark .poll-card__list input[type="radio"],
.theme-dark .poll-card__list input[type="checkbox"],
.theme-dark .poll-card .vote_list input[type="radio"],
.theme-dark .poll-card .vote_list input[type="checkbox"] {
  background: rgba(255, 255, 255, 0.04);
}

.theme-dark .poll-card__btn--ghost {
  background: rgba(255, 138, 31, 0.10);
  border-color: rgba(255, 138, 31, 0.18);
  color: #ffb56f;
}

.theme-dark .poll-card__btn--ghost:hover {
  background: rgba(255, 138, 31, 0.16);
  border-color: rgba(255, 138, 31, 0.26);
  color: #ffc58d;
}

/* =========================
   RESPONSIVE
   ========================= */

@media screen and (max-width: 768px) {
  .poll-card {
    border-radius: 20px;
  }

  .poll-card__inner {
    padding: 15px;
  }

  .poll-card__head {
    gap: 12px;
  }

  .poll-card__title {
    font-size: 17px;
  }

  .poll-card__more {
    min-height: 31px;
    padding: 0 10px;
    font-size: 11px;
  }

  .poll-card__list label,
  .poll-card .vote_list label {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 13px;
  }

  .poll-card__btn {
    min-height: 40px;
    border-radius: 13px;
    font-size: 13px;
  }
}

@media screen and (max-width: 640px) {
  .poll-card {
    border-radius: 18px;
  }

  .poll-card__inner {
    padding: 14px;
  }

  .poll-card__head {
    display: grid;
    gap: 10px;
  }

  .poll-card__more {
    width: max-content;
  }

  .poll-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .poll-card__btn {
    width: 100%;
  }
}

/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .poll-card__more,
  .poll-card__list label,
  .poll-card .vote_list label,
  .poll-card__list input[type="radio"],
  .poll-card__list input[type="checkbox"],
  .poll-card .vote_list input[type="radio"],
  .poll-card .vote_list input[type="checkbox"],
  .poll-card__btn {
    transition: none !important;
  }
}

/* =========================================================
   4HE / GALLERY
   VK-like inline DLE gallery
   ========================================================= */

.pk-gallery {
  --pk-gallery-gap: 4px;
  --pk-gallery-radius: 18px;
  --pk-gallery-height: clamp(260px, 48vw, 520px);

  display: block;
  width: 100%;
  margin: 16px 0 22px;
  overflow: hidden;
  border-radius: var(--pk-gallery-radius);
  background: var(--surface-2);
}

.pk-gallery > br,
.pk-gallery meta {
  display: none !important;
}

.pk-gallery ul,
.pk-gallery ol,
.pk-gallery li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pk-gallery__grid {
  display: grid !important;
  gap: var(--pk-gallery-gap);
  width: 100%;
  height: var(--pk-gallery-height);
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pk-gallery__cell {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-3);
}

.pk-gallery__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--surface-3);
}

.pk-gallery__link:hover {
  color: inherit;
  text-decoration: none;
}

.pk-gallery__link img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border: 0;
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

.pk-gallery__link:hover img {
  transform: scale(1.025);
  filter: brightness(0.96);
}

/* =========================
   Gallery: 1 image
   ========================= */

.pk-gallery--1 {
  background: transparent;
}

.pk-gallery--1 .pk-gallery__grid {
  display: block !important;
  height: auto;
}

.pk-gallery--1 .pk-gallery__cell,
.pk-gallery--1 .pk-gallery__link {
  height: auto;
  border-radius: var(--pk-gallery-radius);
}

.pk-gallery--1 .pk-gallery__link img {
  width: 100% !important;
  height: auto !important;
  max-height: 680px;
  object-fit: contain;
  background: var(--surface-2);
}

/* =========================
   Gallery: 2 images
   ========================= */

.pk-gallery--2 .pk-gallery__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
}

/* =========================
   Gallery: 3 images
   ========================= */

.pk-gallery--3 .pk-gallery__grid {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pk-gallery--3 .pk-gallery__cell:nth-child(1),
.pk-gallery--3 .pk-gallery__link:nth-child(1) {
  grid-row: 1 / 3;
}

.pk-gallery--3.pk-gallery--wide-first .pk-gallery__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 2fr 1fr;
}

.pk-gallery--3.pk-gallery--wide-first .pk-gallery__cell:nth-child(1),
.pk-gallery--3.pk-gallery--wide-first .pk-gallery__link:nth-child(1) {
  grid-column: 1 / 3;
  grid-row: 1;
}

/* =========================
   Gallery: 4 images
   ========================= */

.pk-gallery--4 .pk-gallery__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pk-gallery--4.pk-gallery--wide-first .pk-gallery__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 2fr 1fr;
}

.pk-gallery--4.pk-gallery--wide-first .pk-gallery__cell:nth-child(1),
.pk-gallery--4.pk-gallery--wide-first .pk-gallery__link:nth-child(1) {
  grid-column: 1 / 4;
  grid-row: 1;
}

/* =========================
   Gallery: 5 images
   ========================= */

.pk-gallery--5 .pk-gallery__grid {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pk-gallery--5 .pk-gallery__cell:nth-child(1),
.pk-gallery--5 .pk-gallery__link:nth-child(1) {
  grid-row: 1 / 3;
}

/* =========================
   Gallery: 6 images
   ========================= */

.pk-gallery--6 .pk-gallery__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

/* =========================
   Gallery inside feed / full story
   ========================= */

.feed-card .pk-gallery {
  margin-top: 14px;
}

.feed-card--full .pk-gallery {
  margin-top: 16px;
  margin-bottom: 20px;
}

/* =========================
   Gallery dark
   ========================= */

.theme-dark .pk-gallery {
  background: var(--surface-2);
}

.theme-dark .pk-gallery__cell,
.theme-dark .pk-gallery__link {
  background: var(--surface-3);
}

.theme-dark .pk-gallery__link:hover img {
  filter: brightness(0.92);
}

/* =========================================================
   4HE / NSFW
   Sensitive content overlay: blurred media + soft center pulse
   ========================================================= */

.nsfw {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  isolation: isolate;
  background: #111318;
}

/* Заблюренный контент под оверлеем */
.nsfw > :not(.nsfw__overlay) {
  position: relative;
  z-index: 0;
  filter: blur(15px) saturate(0.9) brightness(0.78);
  transform: scale(1.04);
  transform-origin: center;
  transition:
    filter 0.42s ease,
    transform 0.42s ease;
}

/* Основной слой поверх контента */
.nsfw__overlay {
  position: absolute;
  inset: 0;
  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  padding: 18px;

  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.10), transparent 42%),
    linear-gradient(180deg, rgba(12, 14, 18, 0.20), rgba(12, 14, 18, 0.34)),
    rgba(12, 14, 18, 0.24);

  cursor: pointer;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 0.42s ease,
    visibility 0.42s ease,
    background 0.42s ease;
}

/* Живая мягкая пульсация от центра */
.nsfw__overlay::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 1;
  pointer-events: none;

  background:
    radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 255, 255, 0.16) 18%,
      rgba(255, 255, 255, 0.06) 34%,
      rgba(255, 255, 255, 0.00) 58%
    );

  opacity: 0.46;
  transform: scale(0.78);
  filter: blur(10px);
  mix-blend-mode: screen;

  animation: nsfwCenterPulse 2.8s ease-in-out infinite;
}

/* Едва заметная световая волна, чтобы фон не был статичным */
.nsfw__overlay::after {
  content: "";
  position: absolute;
  inset: -24%;
  z-index: 2;
  pointer-events: none;

  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 36%),
    radial-gradient(circle at 38% 42%, rgba(45, 123, 255, 0.10), transparent 32%),
    radial-gradient(circle at 62% 58%, rgba(155, 234, 60, 0.08), transparent 34%);

  opacity: 0.42;
  transform: scale(1);
  filter: blur(18px);
  mix-blend-mode: screen;

  animation: nsfwSoftBreath 4.8s ease-in-out infinite;
}

/* Контент внутри overlay */
.nsfw__overlay > * {
  position: relative;
  z-index: 3;
}

/* Убираем любые карточки/плашки внутри overlay */
.nsfw__box,
.nsfw__content,
.nsfw__inner {
  position: relative;
  z-index: 3;

  max-width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;

  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  color: #fff;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.52);
}

.nsfw__badge {
  min-width: 46px;
  height: 30px;
  margin-bottom: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  text-shadow: none;
}

.nsfw__title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nsfw__text,
.nsfw__subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.nsfw__subtitle {
  margin-top: 4px;
}

.nsfw__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 8px;
  margin-top: 8px;
}

.nsfw__btn,
.nsfw__button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;

  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-shadow: none;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.nsfw__btn:hover,
.nsfw__button:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.46);
}

.nsfw__btn:active,
.nsfw__button:active {
  transform: scale(0.98);
}

.nsfw__btn--primary,
.nsfw__button--primary,
.nsfw__btn--yes {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.92);
  color: #111318;
}

.nsfw__btn--primary:hover,
.nsfw__button--primary:hover,
.nsfw__btn--yes:hover {
  background: #fff;
  border-color: #fff;
}

.nsfw__btn--no {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}

/* Открытое состояние */
.nsfw.is-unlocked > :not(.nsfw__overlay),
.nsfw.nsfw--unlocked > :not(.nsfw__overlay),
.nsfw.nsfw--open > :not(.nsfw__overlay) {
  filter: none;
  transform: none;
}

.nsfw.is-unlocked .nsfw__overlay,
.nsfw.nsfw--unlocked .nsfw__overlay,
.nsfw.nsfw--open .nsfw__overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Анимации */
@keyframes nsfwCenterPulse {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.72);
  }

  45% {
    opacity: 0.58;
    transform: scale(1.12);
  }

  70% {
    opacity: 0.36;
    transform: scale(1.34);
  }
}

@keyframes nsfwSoftBreath {
  0%,
  100% {
    opacity: 0.30;
    transform: scale(1) translate3d(0, 0, 0);
  }

  35% {
    opacity: 0.48;
    transform: scale(1.08) translate3d(-1.5%, 1%, 0);
  }

  70% {
    opacity: 0.38;
    transform: scale(1.14) translate3d(1.5%, -1%, 0);
  }
}

@media screen and (max-width: 640px) {
  .nsfw > :not(.nsfw__overlay) {
    filter: blur(13px) saturate(0.9) brightness(0.78);
    transform: scale(1.045);
  }

  .nsfw__overlay {
    padding: 14px;
  }

  .nsfw__overlay::before {
    opacity: 0.52;
    filter: blur(8px);
    animation-duration: 2.5s;
  }

  .nsfw__overlay::after {
    opacity: 0.46;
    filter: blur(16px);
    animation-duration: 4.2s;
  }

  .nsfw__badge {
    height: 28px;
    margin-bottom: 7px;
    font-size: 13px;
  }

  .nsfw__title {
    font-size: 14px;
  }

  .nsfw__text,
  .nsfw__subtitle {
    font-size: 12px;
  }

  .nsfw__btn,
  .nsfw__button {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nsfw__overlay::before,
  .nsfw__overlay::after {
    animation: none !important;
  }

  .nsfw,
  .nsfw__overlay,
  .nsfw > :not(.nsfw__overlay),
  .nsfw__btn,
  .nsfw__button {
    transition: none !important;
  }
}

/* =========================
   LEGACY UI FALLBACKS
   ========================= */

.ui-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: none;
}

.ui-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.ui-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
}

.ui-btn:active {
  transform: scale(0.985);
}

.ui-btn--primary {
  background: var(--accent-main);
  color: #fff;
  font-weight: 600;
}

.ui-btn--primary:hover {
  background: var(--accent-main-hover);
  color: #fff;
}

.ui-btn--ghost {
  background: transparent;
  color: var(--text-soft);
}

.ui-btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ui-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  color: var(--text-soft);
  white-space: nowrap;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
}

.ui-badge--accent {
  background: var(--accent-main-soft);
  color: var(--accent-main);
}

.ui-badge--success {
  background: var(--success-soft);
  color: var(--success);
}

.ui-badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.ui-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.08);
}

.theme-dark .ui-dropdown {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

/* =========================
   RESPONSIVE
   ========================= */

@media screen and (max-width: 768px) {
  .share2026 {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1010;
    width: 100%;
    max-width: none;
    padding: 15px 15px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100%);
  }

  .share2026.active {
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .share2026__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pagination-card {
    margin: 6px 0 12px;
  }

  .pagination-card__pages {
    gap: 6px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .pagination-card__pages a,
  .pagination-card__pages span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
  }

  .bottom-nav {
    margin: 8px 0 14px;
  }

  .bottom-nav__load a,
  .bottom-nav__load-btn {
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 16px;
    font-size: 13px;
  }

  .ui-btn {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 11px;
    font-size: 12px;
  }
}

@media screen and (max-width: 640px) {
  .share2026 {
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 16px 16px 0 0;
  }

  .share2026__grid {
    gap: 8px;
  }

  .share2026-item__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .share2026-item__label {
    font-size: 11px;
  }

  .pagination-card__pages {
    justify-content: flex-start;
  }

  .bottom-nav__load a,
  .bottom-nav__load-btn {
    min-height: 44px;
    border-radius: 14px;
  }

  .pk-gallery {
    --pk-gallery-radius: 14px;
    --pk-gallery-height: clamp(220px, 72vw, 420px);

    margin: 14px 0 20px;
  }

  .pk-gallery__grid {
    gap: 3px;
  }

  .pk-gallery--5 .pk-gallery__grid {
    grid-template-columns: 1.35fr 1fr 1fr;
  }

  .nsfw__overlay {
    padding: 14px;
  }

  .nsfw__box,
  .nsfw__content,
  .nsfw__inner {
    padding: 15px;
    border-radius: 16px;
  }

  .nsfw__title {
    font-size: 14px;
  }

  .nsfw__text {
    font-size: 12px;
  }

  .nsfw__btn,
  .nsfw__button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
}

/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .ui-burst__item,
  .bottom-nav__load.is-loading .bottom-nav__load-icon,
  .nsfw__overlay::before,
  .nsfw__overlay::after {
    animation: none !important;
  }

  .share2026,
  .share2026__close,
  .share2026__copy,
  .share2026-item__icon,
  .pagination-card__pages a,
  .bottom-nav__load a,
  .bottom-nav__load-btn,
  .pk-gallery__link img,
  .nsfw__overlay,
  .nsfw__btn,
  .nsfw__button,
  .ui-btn {
    transition: none !important;
  }

  .pk-gallery__link:hover img {
    transform: none;
  }
}