:root {
  /* Пастельная палитра в стиле Apple */
  --swipe-bg: #f8f9fe;
  --swipe-surface: rgba(255, 255, 255, 0.68);
  --swipe-surface-strong: rgba(255, 255, 255, 0.92);
  --swipe-border: rgba(15, 23, 42, 0.06);
  --swipe-shadow: 0 24px 48px -20px rgba(15, 23, 42, 0.25);
  --swipe-shadow-card: 0 8px 32px -12px rgba(15, 23, 42, 0.18);
  
  /* Пастельные акценты */
  --swipe-accent: #a8c5ff;
  --swipe-accent-strong: #7ba3ff;
  --swipe-like: #86efac;
  --swipe-like-bg: rgba(134, 239, 172, 0.14);
  --swipe-dislike: #fca5a5;
  --swipe-dislike-bg: rgba(252, 165, 165, 0.14);
  
  /* Текст */
  --swipe-muted: rgba(15, 23, 42, 0.42);
  --swipe-text: #1e293b;
  --swipe-text-light: rgba(15, 23, 42, 0.65);
  
  /* Градиентный фон */
  --swipe-gradient: radial-gradient(140% 120% at 18% 0%, rgba(168, 197, 255, 0.15), transparent 52%), 
                     radial-gradient(130% 110% at 82% 8%, rgba(252, 165, 165, 0.12), transparent 58%), 
                     linear-gradient(165deg, #fafbff 0%, #f5f7ff 100%);
  
  /* Фиксированная высота карточки */
  --swipe-card-height: 440px;
  
  /* Анимации */
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html,
body {
  min-height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

body.swipe-page {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--swipe-text);
  background: var(--swipe-gradient);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  position: fixed;
  inset: 0;
}

body.swipe-page main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  min-height: 0;
  overflow: hidden;
}

body.swipe-page > nav {
  display: none;
}

.swipe-app {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.swipe-app__inner {
  width: min(100%, 420px);
  height: calc(100dvh - 24px);
  max-height: 750px;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.5vh, 20px);
  padding: clamp(20px, 2.5vh, 32px) clamp(20px, 3vw, 32px);
  border-radius: 48px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--swipe-shadow), 
              0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  position: relative;
}

.swipe-header {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vh, 16px);
  flex-shrink: 0;
}

.swipe-progress {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vh, 12px);
}

.swipe-progress__track {
  width: 100%;
  height: clamp(6px, 0.8vh, 8px);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) inset;
}

.swipe-progress__bar {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #a8c5ff, #c4d9ff);
  border-radius: inherit;
  transition: width 0.5s var(--ease-smooth);
  box-shadow: 0 0 12px rgba(168, 197, 255, 0.25);
}

.swipe-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--swipe-muted);
}

.swipe-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(168, 197, 255, 0.22);
  background: rgba(255, 255, 255, 0.88);
  color: var(--swipe-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.swipe-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 197, 255, 0.22);
  border-color: rgba(168, 197, 255, 0.35);
}

.swipe-chip.is-active {
  border-color: rgba(168, 197, 255, 0.5);
  background: rgba(168, 197, 255, 0.12);
  box-shadow: 0 4px 12px rgba(168, 197, 255, 0.25);
}

.swipe-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--swipe-accent);
  box-shadow: 0 0 0 3px rgba(168, 197, 255, 0.16);
}

.card-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-stack {
  position: relative;
  width: 100%;
  max-width: 330px;
  height: 100%;
  margin: 0 auto;
}

.swipe-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 36px;
  background: var(--swipe-surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--swipe-shadow-card),
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  transition: transform 0.4s var(--ease-smooth), opacity 0.4s ease, box-shadow 0.4s ease;
  touch-action: none;
  will-change: transform;
  opacity: 0;
  cursor: grab;
}

.swipe-card.is-ready {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.swipe-card.is-dragging {
  transition: none;
  cursor: grabbing;
  box-shadow: 0 16px 48px -16px rgba(15, 23, 42, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.swipe-card.is-like::after,
.swipe-card.is-nope::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--swipe-like-bg), transparent);
  pointer-events: none;
  opacity: 0.8;
}

.swipe-card.is-nope::after {
  background: linear-gradient(135deg, var(--swipe-dislike-bg), transparent);
}

.idea-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.5vh, 28px);
  gap: clamp(12px, 1.8vh, 20px);
  overflow: hidden;
}

.idea-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--swipe-muted);
}

.idea-card__channel {
  border-radius: 999px;
  padding: 6px 13px;
  background: rgba(168, 197, 255, 0.16);
  color: var(--swipe-accent-strong);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.idea-card__meta {
  font-variant-numeric: tabular-nums;
}

.idea-card__title {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--swipe-text);
  text-align: center;
}

.idea-card__excerpt {
  color: var(--swipe-text-light);
  line-height: 1.55;
  font-size: clamp(0.9rem, 1.8vw, 0.975rem);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  line-clamp: 5;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  text-align: center;
}

.idea-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--swipe-muted);
  font-size: 0.92rem;
}

.idea-card__author-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.idea-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(168, 197, 255, 0.2), rgba(168, 197, 255, 0.1));
  border: 1.5px solid rgba(168, 197, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.idea-card__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.idea-card__avatar-initial {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--swipe-accent-strong);
}

.idea-card__author-name {
  font-weight: 500;
  color: var(--swipe-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.idea-card__stats {
  display: flex;
  gap: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.idea-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.idea-card__stat-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.idea-card__stat--like {
  color: #22c55e;
}

.idea-card__stat--like .idea-card__stat-icon {
  stroke: currentColor;
}

.idea-card__stat--dislike {
  color: #ef4444;
}

.idea-card__stat--dislike .idea-card__stat-icon {
  stroke: currentColor;
}

.idea-card__stat span {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.swipe-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 22px 42px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.03em;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  z-index: 150;
  will-change: transform, opacity;
  transform: translateX(-50%) translateY(-50%);
}

.swipe-badge--like {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.96), rgba(5, 150, 105, 0.92));
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 12px 48px rgba(16, 185, 129, 0.45),
    0 4px 16px rgba(16, 185, 129, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 2px 4px rgba(255, 255, 255, 0.2) inset;
  text-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.15);
}

.swipe-badge--nope {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.96), rgba(220, 38, 38, 0.92));
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 12px 48px rgba(239, 68, 68, 0.45),
    0 4px 16px rgba(239, 68, 68, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 2px 4px rgba(255, 255, 255, 0.2) inset;
  text-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.15);
}

.swipe-badge--like.is-flash {
  animation: badge-appear-like 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.swipe-badge--nope.is-flash {
  animation: badge-appear-nope 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes badge-appear-like {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(0.75) rotate(0deg);
    filter: blur(4px);
  }
  40% {
    opacity: 0.9;
    transform: translateX(-50%) translateY(-50%) scale(1.08) rotate(0deg);
    filter: blur(0px);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(0.98) rotate(0deg);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(1) rotate(0deg);
    filter: blur(0px);
  }
}

@keyframes badge-appear-nope {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(0.75) rotate(0deg);
    filter: blur(4px);
  }
  40% {
    opacity: 0.9;
    transform: translateX(-50%) translateY(-50%) scale(1.08) rotate(0deg);
    filter: blur(0px);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(0.98) rotate(0deg);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(1) rotate(0deg);
    filter: blur(0px);
  }
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 36px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px dashed rgba(168, 197, 255, 0.28);
  color: var(--swipe-text-light);
}

.empty-state[hidden] {
  display: none !important;
}

.empty-state h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--swipe-text);
}

.swipe-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.swipe-undo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(168, 197, 255, 0.25);
  background: rgba(255, 255, 255, 0.88);
  color: var(--swipe-accent-strong);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  align-self: center;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.swipe-undo svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  transition: transform 0.25s var(--ease-smooth);
}

.swipe-undo:not(:disabled) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.swipe-undo:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 197, 255, 0.25);
  border-color: rgba(168, 197, 255, 0.4);
  background: rgba(168, 197, 255, 0.08);
}

.swipe-undo:hover:not(:disabled) svg {
  transform: translateX(-2px);
}

.swipe-undo:active:not(:disabled) {
  transform: scale(0.96);
}

.swipe-undo:disabled {
  opacity: 0;
  cursor: not-allowed;
  pointer-events: none;
}

.swipe-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.5vw, 16px);
}

.swipe-action {
  width: clamp(54px, 11vw, 64px);
  height: clamp(54px, 11vw, 64px);
  border-radius: 50%;
  border: none;
  background: var(--swipe-surface-strong);
  box-shadow: var(--swipe-shadow-card),
              0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  color: var(--swipe-text);
}

.swipe-action svg {
  width: clamp(22px, 4.5vw, 26px);
  height: clamp(22px, 4.5vw, 26px);
  stroke-width: 2.5;
  transition: transform 0.2s var(--ease-smooth);
}

.swipe-action--dislike {
  color: #ef4444;
}

.swipe-action--dislike:hover {
  background: rgba(252, 165, 165, 0.15);
}

.swipe-action--details {
  width: clamp(62px, 13vw, 74px);
  height: clamp(62px, 13vw, 74px);
  background: linear-gradient(145deg, rgba(168, 197, 255, 0.2), rgba(168, 197, 255, 0.12));
  border: 1px solid rgba(168, 197, 255, 0.25);
  color: var(--swipe-accent-strong);
}

.swipe-action--details svg {
  width: clamp(24px, 5vw, 28px);
  height: clamp(24px, 5vw, 28px);
}

.swipe-action--restart {
  color: #22c55e;
}

.swipe-action--restart:hover {
  background: rgba(134, 239, 172, 0.15);
}

.swipe-action:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.25);
}

.swipe-action:hover svg {
  transform: scale(1.1);
}

.swipe-action:active {
  transform: scale(0.95);
  box-shadow: var(--swipe-shadow-card);
}

.swipe-action:active svg {
  transform: scale(1);
}

.swipe-action:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.2); }

.swipe-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--swipe-shadow-card),
              0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  /* Фиксируем минимальную высоту контейнера, чтобы не прыгало */
  min-height: 44px;
  box-sizing: border-box;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Центрируем навигацию в контейнере и фиксируем внизу */
  align-self: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  margin-top: auto;
  flex-shrink: 0;
}

.swipe-tabs::-webkit-scrollbar {
  display: none;
}

.swipe-tabs__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 8px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--swipe-muted);
  font-size: 0.825rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s var(--ease-smooth), background-color 0.25s var(--ease-smooth); /* Убрали transition: all, чтобы не было прыжков */
  white-space: nowrap;
  box-sizing: border-box;
  /* Фиксируем размеры, чтобы элементы не изменялись при hover */
  min-height: 34px;
  flex-shrink: 0;
}

/* Убрали hover эффект, чтобы элементы не прыгали */

.swipe-tabs__item--active {
  background: rgba(168, 197, 255, 0.18);
  color: var(--swipe-accent-strong);
  box-shadow: 0 2px 6px rgba(168, 197, 255, 0.15),
              inset 0 0 0 1px rgba(168, 197, 255, 0.2);
}

/* Скрываем элементы разворачивающегося меню - теперь все кнопки всегда видны */
.swipe-tabs__item--trigger,
.swipe-tabs__switch,
.swipe-tabs__dropdown {
  display: none !important;
}

/* Убрали transform при active, чтобы элементы не прыгали на маленьких экранах */
@media (min-width: 641px) {
  .swipe-tabs__item:active {
    transform: scale(0.96);
  }
}

.ghost-button,
.primary-button {
  padding: 12px 20px;
  border-radius: 16px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ghost-button svg,
.primary-button svg {
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-smooth);
}

.ghost-button:hover:not(:disabled) svg,
.primary-button:hover:not(:disabled) svg {
  transform: scale(1.1);
}

.ghost-button:active:not(:disabled) svg,
.primary-button:active:not(:disabled) svg {
  transform: scale(0.95);
}

.global-nav {
  margin: 20px auto;
  max-width: 960px;
  padding: 0 16px;
}

.global-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 10px 18px;
  box-shadow: var(--swipe-shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.global-nav__primary,
.global-nav__secondary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--swipe-muted);
  text-decoration: none;
  transition: all 0.25s var(--ease-smooth);
}

.global-nav__link:hover,
.global-nav__link.is-active {
  color: var(--swipe-accent-strong);
  background: rgba(168, 197, 255, 0.18);
}

.global-nav__link--button {
  background: rgba(255, 255, 255, 0.65);
  color: var(--swipe-text);
}

.view-switch {
  position: relative;
  min-height: 38px; /* Фиксируем высоту контейнера */
  display: flex;
  align-items: center;
}

.view-switch__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: rgba(168, 197, 255, 0.15);
  color: var(--swipe-accent-strong);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s var(--ease-smooth), background-color 0.25s var(--ease-smooth); /* Убрали transition: all */
  box-sizing: border-box;
  min-height: 38px; /* Фиксируем высоту */
}

.view-switch__trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.view-switch.is-open .view-switch__trigger svg {
  transform: rotate(0deg); /* Стрелка не поворачивается, так как меню открывается вверх */
}

.view-switch__menu {
  position: absolute;
  bottom: calc(100% + 8px); /* Открывается вверх */
  left: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--swipe-shadow-card);
  border: 1px solid rgba(15, 23, 42, 0.06);
  z-index: 50;
  min-width: 160px;
}

.view-switch.is-open .view-switch__menu {
  display: flex;
}

.view-switch__option {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--swipe-muted);
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease; /* Убрали transition: all */
  box-sizing: border-box;
  min-height: 36px; /* Фиксируем высоту */
}

.view-switch__option.is-active {
  background: rgba(168, 197, 255, 0.18);
  color: var(--swipe-accent-strong);
}

/* Убрали hover эффект, чтобы элементы не прыгали */

.list-app .swipe-app__inner {
  gap: 20px;
  min-height: 0;
  overflow: hidden;
}

/* Прокручиваемый контент списка, чтобы нижние табы всегда были видимы */
.list-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.list-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-header__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-header__title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0;
  color: var(--swipe-text);
}

.list-header__subtitle {
  margin: 0;
  color: var(--swipe-text-light);
  font-size: 0.95rem;
}

.list-header__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.list-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--swipe-shadow-card);
}

.list-search svg {
  width: 18px;
  height: 18px;
  color: var(--swipe-muted);
}

.list-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--swipe-text);
  min-width: 220px;
}

.list-search input::placeholder {
  color: var(--swipe-muted);
}

.list-filters-group {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.list-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--swipe-shadow-card);
  font-size: 0.85rem;
  color: var(--swipe-text-light);
  transition: all 0.2s ease;
}

.list-filters-group .list-sort {
  padding: 6px 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  flex: 1;
  min-width: 0;
  gap: 4px;
}

.list-filters-group .list-sort:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.list-sort select {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--swipe-text);
  cursor: pointer;
  padding-right: 12px;
  min-width: 0;
  flex: 1;
}

.list-filters-group .list-sort select {
  font-size: 0.75rem;
  padding-right: 6px;
}

.list-filters-group .list-sort span {
  font-size: 0.75rem;
  white-space: nowrap;
}

.list-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--swipe-text-light);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.list-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.list-grid[aria-hidden="true"] {
  display: none !important;
}


.list-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--swipe-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--swipe-shadow-card), 0 10px 30px rgba(15, 23, 42, 0.08);
}

.list-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--swipe-muted);
}

.list-card__channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--swipe-accent-strong);
  cursor: pointer;
}

.list-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--swipe-text);
}

.list-card__excerpt {
  margin: 0;
  color: var(--swipe-text-light);
  font-size: 0.95rem;
  line-height: 1.55;
}

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

.list-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.list-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 197, 255, 0.2);
  color: var(--swipe-accent-strong);
  font-weight: 600;
}

.list-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.list-card__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 14px;
  border: 1.5px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--swipe-text);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

.list-card__action[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.list-card__action svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.25s var(--ease-smooth);
  flex-shrink: 0;
}

.list-card__action--like {
  background: linear-gradient(135deg, rgba(168, 197, 255, 0.2), rgba(168, 197, 255, 0.12));
  border-color: rgba(123, 163, 255, 0.28);
  color: var(--swipe-accent-strong);
  box-shadow: 0 2px 12px rgba(168, 197, 255, 0.18);
}

.list-card__action--like:hover:not([disabled]) {
  background: linear-gradient(135deg, rgba(168, 197, 255, 0.3), rgba(168, 197, 255, 0.22));
  border-color: rgba(123, 163, 255, 0.38);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168, 197, 255, 0.28);
}

.list-card__action--like:hover:not([disabled]) svg {
  transform: scale(1.15);
}

.list-card__action--like:active:not([disabled]) {
  transform: translateY(0) scale(0.96);
}

.list-card--liked .list-card__action--like {
  background: linear-gradient(135deg, rgba(168, 197, 255, 0.4), rgba(168, 197, 255, 0.3));
  border-color: rgba(123, 163, 255, 0.5);
  box-shadow: 0 4px 16px rgba(168, 197, 255, 0.35), 0 0 0 3px rgba(168, 197, 255, 0.15);
}

.list-card__action--dislike {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.32), rgba(203, 213, 225, 0.2));
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(71, 85, 105, 0.85);
  box-shadow: 0 2px 12px rgba(148, 163, 184, 0.15);
}

.list-card__action--dislike:hover:not([disabled]) {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.42), rgba(203, 213, 225, 0.3));
  border-color: rgba(148, 163, 184, 0.38);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.25);
}

.list-card__action--dislike:hover:not([disabled]) svg {
  transform: scale(1.15);
}

.list-card__action--dislike:active:not([disabled]) {
  transform: translateY(0) scale(0.96);
}

.list-card--disliked .list-card__action--dislike {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.52), rgba(203, 213, 225, 0.4));
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.3), 0 0 0 3px rgba(203, 213, 225, 0.25);
}

.list-card__action--details {
  background: rgba(255, 255, 255, 0.95);
  color: var(--swipe-text-light);
  padding: 7px 10px;
  font-size: 0.75rem;
}

.list-card__action--details:hover:not([disabled]) {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  color: var(--swipe-text);
}

.list-card--liked {
  border-color: rgba(168, 197, 255, 0.4);
}

.list-card--disliked {
  border-color: rgba(248, 113, 113, 0.45);
}

.list-empty {
  margin: 40px auto;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
  text-align: center;
  color: var(--swipe-text-light);
  display: grid;
  place-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: calc(100% - 40px);
  max-width: 400px;
}

.list-empty[hidden] {
  display: none !important;
}

.list-empty svg {
  width: 48px;
  height: 48px;
  color: var(--swipe-accent);
}

.list-footer {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-bottom: 0;
  flex-shrink: 0;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--swipe-text-light);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--swipe-text);
}

.ghost-button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Стили для кнопок лайка и дизлайка в модальном окне */
#more-like.primary-button {
  background: linear-gradient(135deg, rgba(168, 197, 255, 0.88), rgba(168, 197, 255, 0.75));
  color: var(--swipe-text);
  border: 1.5px solid rgba(168, 197, 255, 0.4);
  box-shadow: 0 4px 16px rgba(168, 197, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

#more-like.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(168, 197, 255, 0.95), rgba(168, 197, 255, 0.85));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 197, 255, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

#more-like.primary-button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 16px rgba(168, 197, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

#more-dislike.ghost-button {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.32), rgba(203, 213, 225, 0.2));
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(71, 85, 105, 0.85);
  box-shadow: 0 2px 12px rgba(148, 163, 184, 0.15);
}

#more-dislike.ghost-button:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.42), rgba(203, 213, 225, 0.3));
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.25);
  color: rgba(71, 85, 105, 0.9);
}

#more-dislike.ghost-button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 12px rgba(148, 163, 184, 0.2);
}

.primary-button {
  background: linear-gradient(135deg, #a8c5ff, #c4d9ff);
  color: var(--swipe-text);
  box-shadow: 0 4px 16px rgba(168, 197, 255, 0.35);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168, 197, 255, 0.45);
  background: linear-gradient(135deg, #92b0ff, #b5d0ff);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(15, 23, 42, 0.55);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.icon-button:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.95);
}

.glass-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 6vw, 32px);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 1000;
}

.glass-modal[hidden] {
  display: none;
}

.glass-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-modal__panel {
  position: relative;
  width: min(100%, 420px);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 48px -24px rgba(15, 23, 42, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  backdrop-filter: blur(40px) saturate(170%);
  -webkit-backdrop-filter: blur(40px) saturate(170%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateY(32px) scale(0.96);
  transition: all 0.4s var(--ease-smooth);
}

.glass-modal__panel--wide {
  width: min(100%, 520px);
}

.glass-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.glass-modal__header--pill {
  flex-wrap: wrap;
}

.glass-modal__channel {
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(168, 197, 255, 0.18);
  color: var(--swipe-accent-strong);
  font-weight: 600;
  font-size: 0.875rem;
}

.glass-modal__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: rgba(15, 23, 42, 0.78);
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}

.glass-modal__body h3 {
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--swipe-text);
}

.idea-description {
  white-space: pre-line;
  line-height: 1.6;
}

.idea-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.45);
}

.idea-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 14px;
  color: rgba(15, 23, 42, 0.65);
}

.idea-meta dt {
  font-weight: 600;
  color: var(--swipe-text);
}

.idea-meta dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.glass-modal__footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.glass-modal__footer-left {
  margin-right: auto;
}

.glass-modal__footer-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.glass-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.glass-modal.is-visible .glass-modal__panel {
  transform: translateY(0) scale(1);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.7);
}

.filter-option + .filter-option {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

@media (max-width: 640px) {
  body.swipe-page main {
    padding: 8px;
    min-height: 0;
    overflow: hidden;
  }

  .swipe-app__inner {
    border-radius: 40px;
    padding: clamp(16px, 2vh, 24px) clamp(16px, 3vw, 20px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    gap: clamp(10px, 1.2vh, 16px);
    overflow: hidden;
  }

  .list-app .swipe-app__inner {
    padding-bottom: clamp(16px, 2vh, 24px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .card-stack {
    width: 100%;
    max-width: 100%;
  }

  .swipe-undo {
    padding: 8px 16px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .swipe-undo svg {
    width: 16px;
    height: 16px;
  }

  .swipe-action {
    width: 52px;
    height: 52px;
  }
  
  .swipe-action svg {
    width: 18px;
    height: 18px;
  }

  .swipe-action--details {
    width: 60px;
    height: 60px;
  }
  
  .swipe-action--details svg {
    width: 20px;
    height: 20px;
  }

  .glass-modal__panel {
    width: 100%;
    max-height: 94vh;
    border-radius: 28px;
    padding: 24px;
  }
  
  .swipe-tabs {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-self: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
  }

  .swipe-tabs::-webkit-scrollbar {
    display: none;
  }

  .swipe-tabs__item {
    padding: 10px 8px;
    font-size: 0.75rem;
    min-height: 38px; /* Фиксируем минимальную высоту */
    box-sizing: border-box;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .idea-card {
    padding: clamp(16px, 2vh, 24px);
    gap: clamp(10px, 1.5vh, 16px);
  }
  
  .idea-card__title {
    font-size: clamp(1.3rem, 6vw, 1.6rem);
  }
  
  .idea-card__excerpt {
    font-size: 0.95rem;
  }
  
  .idea-card__avatar {
    width: 28px;
    height: 28px;
  }
  
  .idea-card__avatar-initial {
    font-size: 0.8rem;
  }
  
  .idea-card__stat {
    padding: 3px 6px;
  }
  
  .idea-card__stat-icon {
    width: 12px;
    height: 12px;
  }
  
  .idea-card__stat span {
    font-size: 0.8rem;
  }

  .swipe-badge {
    font-size: 1.8rem;
    padding: 18px 34px;
    border-radius: 20px;
    border-width: 2px;
  }

  .swipe-tabs__item--trigger {
    flex-shrink: 0;
    min-width: fit-content;
    padding: 10px 12px;
    justify-content: space-between;
    min-height: 38px; /* Фиксируем высоту, чтобы не прыгало */
  }

  .swipe-tabs__dropdown {
    position: absolute; /* Используем absolute вместо static, чтобы не влиять на layout */
    bottom: calc(100% + 8px); /* Открывается вверх */
    left: 0;
    right: 0;
    display: none;
    width: 100%;
    z-index: 30; /* Убеждаемся, что dropdown поверх других элементов */
  }

  .swipe-tabs__switch.is-open .swipe-tabs__dropdown {
    display: flex;
  }
  
  /* Фиксируем размеры элементов, чтобы они не изменялись при hover */
  .swipe-tabs__item {
    min-height: 38px;
    box-sizing: border-box;
  }

  .global-nav {
    padding: 0 8px;
  }

  .global-nav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .global-nav__primary {
    flex-wrap: wrap;
    justify-content: center;
  }

  .view-switch__menu {
    right: 0;
    left: auto;
  }

  .list-header__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .list-filters-group {
    width: 100%;
    flex-direction: row;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(15, 23, 42, 0.04);
    padding: 3px;
    gap: 3px;
    flex-wrap: nowrap;
  }

  .list-filters-group .list-sort {
    flex: 1;
    padding: 6px 6px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    min-width: 0;
    gap: 3px;
  }

  .list-search {
    width: 100%;
    justify-content: space-between;
  }

  .list-filters-group .list-sort {
    width: auto;
    flex: 1;
  }

  .list-search input {
    width: 100%;
    min-width: 0;
  }

  .list-grid {
    grid-template-columns: 1fr;
  }

  .list-content {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .list-app .swipe-app__inner {
    padding-bottom: clamp(16px, 2vh, 24px);
  }

  .list-grid {
    margin-bottom: 0;
  }

  .list-footer {
    margin-top: 12px;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 420px) {
  .swipe-app__inner {
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    padding: clamp(14px, 1.8vh, 20px) clamp(14px, 2.5vw, 18px);
    overflow: hidden;
  }

  .list-app .swipe-app__inner {
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    padding-bottom: clamp(14px, 1.8vh, 20px);
  }

  .swipe-undo {
    padding: 7px 14px;
    font-size: 0.8rem;
  }

  .idea-card__excerpt {
    -webkit-line-clamp: 4;
    line-clamp: 4;
    font-size: 0.875rem;
  }
  
  .idea-card__title {
    font-size: 1.25rem;
  }
  
  .swipe-progress__meta {
    font-size: 0.85rem;
  }
  
  .swipe-action {
    width: 48px;
    height: 48px;
  }
  
  .swipe-action svg {
    width: 16px;
    height: 16px;
  }

  .swipe-action--details {
    width: 56px;
    height: 56px;
  }
  
  .swipe-action--details svg {
    width: 18px;
    height: 18px;
  }
  
  .swipe-badge {
    font-size: 1.6rem;
    padding: 16px 32px;
    border-radius: 18px;
    border-width: 2px;
  }
}

/* Показываем переключатель видов как две отдельные вкладки на широких экранах */
@media (min-width: 600px) {
  .swipe-tabs__item--trigger { display: none; }
  .swipe-tabs__dropdown {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: 6px;
    /* Убираем фон/рамку у контейнера переключателя, чтобы элементы выглядели как остальные */
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  /* Чуть расширяем саму «строчку» с кнопками и увеличиваем промежутки */
  .swipe-tabs {
    padding: 8px 12px;
    gap: 8px;
    justify-content: center;
    align-self: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
  }
  /* Вкладыш-переключатель ведёт себя как прозрачный контейнер */
  .swipe-tabs__switch { display: contents; }
}

/* Очень маленькие экраны (iPhone SE и меньше) */
@media (max-width: 375px) {
  body.swipe-page main {
    padding: 6px;
    overflow: hidden;
  }

  .swipe-app__inner {
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 32px;
    padding: 12px 14px;
    gap: 8px;
    overflow: hidden;
  }

  .list-app .swipe-app__inner {
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    padding-bottom: 12px;
  }
  
  .idea-card {
    padding: 14px;
    gap: 10px;
  }
  
  .idea-card__title {
    font-size: 1.2rem;
  }
  
  .idea-card__excerpt {
    font-size: 0.85rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  
  .swipe-tabs {
    gap: 2px;
    padding: 3px;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-self: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
  }

  .swipe-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .swipe-tabs__item {
    padding: 8px 6px;
    font-size: 0.7rem;
    min-height: 36px; /* Фиксируем минимальную высоту */
    box-sizing: border-box;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .swipe-tabs__item--trigger {
    min-height: 36px; /* Фиксируем высоту триггера */
    padding: 8px 10px;
    flex-shrink: 0;
  }
  
  .swipe-action {
    width: 46px;
    height: 46px;
  }

  .swipe-action--details {
    width: 54px;
    height: 54px;
  }
  
  .swipe-badge {
    font-size: 1.5rem;
    padding: 14px 28px;
    border-radius: 16px;
    border-width: 2px;
  }
}

/* Средние экраны (планшеты в портретной ориентации) */
@media (min-width: 641px) and (max-width: 1024px) {
  body.swipe-page main {
    padding: 16px;
  }

  .swipe-app__inner {
    height: calc(100dvh - 32px);
    max-height: 840px;
  }
}

/* Большие экраны (десктопы и планшеты в альбомной ориентации) */
@media (min-width: 1025px) {
  body.swipe-page main {
    padding: 20px 16px;
  }

  .swipe-app__inner {
    height: calc(100dvh - 40px);
    max-height: 790px;
  }
}

/* Высокие узкие экраны (некоторые современные смартфоны) */
@media (max-width: 640px) and (min-height: 800px) {
  .swipe-app__inner {
    height: calc(100dvh - 20px);
    max-height: 730px;
  }
  
  .idea-card__excerpt {
    -webkit-line-clamp: 6;
    line-clamp: 6;
  }
}

/* Низкие экраны */
@media (max-height: 700px) {
  .swipe-app__inner {
    gap: clamp(8px, 1vh, 14px);
    padding: clamp(16px, 2vh, 24px) clamp(16px, 2.5vw, 24px);
  }
  
  .idea-card {
    padding: clamp(16px, 2vh, 22px);
    gap: clamp(10px, 1.2vh, 16px);
  }
  
  .idea-card__title {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  }
  
  .idea-card__excerpt {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 0.9rem;
  }
  
  .swipe-footer {
    gap: 6px;
  }
}

/* Очень низкие экраны */
@media (max-height: 600px) {
  .swipe-app__inner {
    padding: 12px 16px;
    gap: 6px;
  }
  
  .swipe-header {
    gap: 6px;
  }
  
  .swipe-progress {
    gap: 6px;
  }
  
  .idea-card {
    padding: 12px;
    gap: 8px;
  }
  
  .idea-card__title {
    font-size: 1.15rem;
  }
  
  .idea-card__excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .swipe-action {
    width: 48px;
    height: 48px;
  }

  .swipe-action--details {
    width: 56px;
    height: 56px;
  }
  
  .swipe-tabs__item {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Фокус для доступности */
.swipe-action:focus-visible,
.swipe-undo:focus-visible,
.swipe-tabs__item:focus-visible,
.ghost-button:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid var(--swipe-accent);
  outline-offset: 3px;
}

.swipe-chip:focus-visible {
  outline: 2px solid var(--swipe-accent);
  outline-offset: 2px;
}

/* Плавность скролла */
.glass-modal__body {
  scroll-behavior: smooth;
}

.glass-modal__body::-webkit-scrollbar {
  width: 6px;
}

.glass-modal__body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
}

.glass-modal__body::-webkit-scrollbar-thumb {
  background: rgba(168, 197, 255, 0.3);
  border-radius: 999px;
}

.glass-modal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 197, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

