.ifr-feed {
  --ifr-ink: #111827;
  --ifr-muted: #6b7280;
  --ifr-line: rgba(17, 24, 39, 0.08);
  --ifr-accent: #e11d48;
  --ifr-ig: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ifr-ink);
  max-width: 1120px;
  margin: 0 auto;
  background: transparent;
}

.ifr-kicker,
.ifr-section-head .ifr-kicker,
.ifr-home-user span,
.ifr-home-stats,
.ifr-stat,
.ifr-home-follow,
.ifr-caption {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.ifr-kicker {
  margin: 0 0 6px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  color: var(--ifr-accent);
}

.ifr-section-head {
  margin: 0 0 22px;
}

.ifr-section-head h3,
.ifr-marquee-heading h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.ifr-section-head h3 {
  font-size: clamp(28px, 4vw, 42px);
}

.ifr-tile {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: #ece7e1;
}

.ifr-tile a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.ifr-tile-media {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ifr-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.ifr-tile:hover img {
  transform: scale(1.08);
}

.ifr-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.ifr-badge-video::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
}

.ifr-badge-carousel::before,
.ifr-badge-carousel::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid #fff;
  border-radius: 2px;
}

.ifr-badge-carousel::before {
  top: 7px;
  left: 7px;
}

.ifr-badge-carousel::after {
  top: 10px;
  left: 10px;
  opacity: 0.7;
}

.ifr-tile-overlay {
  display: none;
}

.ifr-caption {
  display: none;
}

/* Homepage */
.ifr-style-homepage {
  padding: 8px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.08);
}

.ifr-home-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 18px 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ifr-line);
}

.ifr-home-avatar-wrap {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  border-radius: 50%;
  background: var(--ifr-ig);
  padding: 3px;
  box-sizing: border-box;
  overflow: hidden;
}

.ifr-feed .ifr-home-avatar,
.ifr-home-avatar-wrap img.ifr-home-avatar,
.ifr-home-avatar-fallback {
  width: 78px !important;
  height: 78px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50% !important;
  display: block !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #fff;
  box-sizing: border-box;
}

.ifr-home-meta {
  flex: 1 1 240px;
}

.ifr-home-user strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.ifr-home-user span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ifr-muted);
}

.ifr-home-stats {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--ifr-muted);
}

.ifr-home-stats strong {
  color: var(--ifr-ink);
  margin-right: 4px;
  font-size: 15px;
}

.ifr-home-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ifr-ig);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 11px 22px;
  min-width: 108px;
  box-shadow: 0 10px 24px rgba(238, 42, 123, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ifr-home-follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(238, 42, 123, 0.35);
}

.ifr-home-gallery {
  position: relative;
  padding: 10px;
}

.ifr-home-viewport {
  overflow: hidden;
  border-radius: 18px;
}

.ifr-home-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.ifr-home-page {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ifr-style-homepage .ifr-tile {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.ifr-feed button.ifr-nav,
.ifr-feed .ifr-nav {
  all: unset;
  box-sizing: border-box !important;
  position: absolute !important;
  top: 50% !important;
  z-index: 20 !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18) !important;
  cursor: pointer !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  overflow: hidden !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transform: translateY(-50%) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.ifr-feed button.ifr-nav:hover,
.ifr-feed .ifr-nav:hover,
.ifr-feed button.ifr-nav:focus,
.ifr-feed .ifr-nav:focus {
  background: #ffffff !important;
  color: transparent !important;
  transform: translateY(-50%) scale(1.06) !important;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.22) !important;
  outline: none !important;
}

.ifr-feed button.ifr-nav::before,
.ifr-feed button.ifr-nav::after,
.ifr-feed .ifr-nav::before,
.ifr-feed .ifr-nav::after {
  content: none !important;
  display: none !important;
  background: none !important;
  font-family: inherit !important;
}

.ifr-feed .ifr-nav-icon,
.ifr-feed .ifr-nav-icon::before,
.ifr-feed .ifr-nav-icon::after {
  font-family: inherit !important;
  background: none !important;
}

.ifr-feed .ifr-nav-icon {
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  border: 0 !important;
  border-bottom: 2px solid #111827 !important;
  border-left: 2px solid #111827 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ifr-feed .ifr-nav-prev .ifr-nav-icon {
  transform: rotate(45deg) !important;
  margin-left: 3px !important;
}

.ifr-feed .ifr-nav-next .ifr-nav-icon {
  transform: rotate(-135deg) !important;
  margin-right: 3px !important;
}

.ifr-feed .ifr-nav-prev { left: 10px !important; right: auto !important; }
.ifr-feed .ifr-nav-next { right: 10px !important; left: auto !important; }

@media (max-width: 767px) {
  .ifr-home-page { grid-template-columns: repeat(2, 1fr); }
  .ifr-home-stats { gap: 12px; }
}

/* Marquee */
.ifr-style-marquee {
  overflow: hidden;
  padding: 36px 0 20px;
  background:
    radial-gradient(circle at top left, rgba(238, 42, 123, 0.08), transparent 32%),
    linear-gradient(180deg, #faf7f2 0%, #fff 48%);
  border-radius: 32px;
}

.ifr-marquee-heading {
  display: grid;
  justify-items: start;
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto 28px;
  padding: 0 32px;
}

.ifr-marquee-heading h2 {
  font-size: clamp(40px, 7vw, 72px);
}

.ifr-marquee-heading a {
  font-size: 18px;
  text-decoration: none;
  color: var(--ifr-accent);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 600;
}

.marquee-row {
  overflow: hidden;
  width: 100%;
  margin-bottom: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-content {
  display: flex;
  width: max-content;
}

.animate-marquee { animation: ifr-marquee 42s linear infinite; }
.animate-marquee-reverse { animation: ifr-marquee-reverse 42s linear infinite; }
.marquee-row:hover .marquee-content { animation-play-state: paused; }

@keyframes ifr-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes ifr-marquee-reverse {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.ifr-tile-marquee {
  flex: 0 0 auto;
  width: 210px;
  height: 270px;
  margin: 0 10px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}

@media (min-width: 768px) {
  .ifr-tile-marquee {
    width: 280px;
    height: 340px;
  }
}

/* Classic grid */
.ifr-style-grid,
.ifr-style-overlay,
.ifr-style-masonry {
  padding: 28px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.06);
}

.ifr-grid {
  display: grid;
  gap: 14px;
}

.ifr-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ifr-style-grid .ifr-tile,
.ifr-style-overlay .ifr-tile {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.ifr-style-grid .ifr-tile:hover {
  box-shadow: 0 22px 40px rgba(17, 24, 39, 0.14);
}

/* Masonry */
.ifr-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 92px;
  gap: 12px;
}

.ifr-style-masonry .ifr-tile {
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.1);
}

.ifr-style-masonry .ifr-caption {
  display: block;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  font-size: 12px;
  line-height: 1.35;
  color: var(--ifr-ink);
}

.ifr-masonry-1 { grid-row: span 3; }
.ifr-masonry-2 { grid-row: span 4; }
.ifr-masonry-3 { grid-row: span 3; }
.ifr-masonry-4 { grid-row: span 3; }
.ifr-masonry-5 { grid-row: span 4; }

@media (max-width: 767px) {
  .ifr-grid-3,
  .ifr-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Slider */
.ifr-style-slider {
  position: relative;
  padding: 28px 52px;
  background: linear-gradient(180deg, #1c1917 0%, #292524 100%);
  border-radius: 32px;
}

.ifr-slider-viewport { overflow: hidden; }
.ifr-slider-track {
  display: flex;
  gap: 18px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.ifr-tile-slider {
  flex: 0 0 min(72vw, 340px);
  height: 430px;
  border-radius: 28px;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.35);
}

.ifr-style-slider .ifr-caption {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 48px 20px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
}

.ifr-feed.ifr-style-slider .ifr-nav {
  background: rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.ifr-feed.ifr-style-slider .ifr-nav-icon {
  border-bottom-color: #fff !important;
  border-left-color: #fff !important;
}

/* Overlay */
.ifr-style-overlay .ifr-tile {
  isolation: isolate;
}

.ifr-grid-hover .ifr-tile-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.62));
  color: #fff;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ifr-grid-hover .ifr-tile:hover .ifr-tile-overlay {
  opacity: 1;
}

.ifr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ifr-stat strong {
  font-size: 22px;
  letter-spacing: -0.04em;
  font-family: Georgia, serif;
  font-weight: 500;
}

.ifr-style-overlay .ifr-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--ifr-ig);
  opacity: 0;
  transition: opacity 0.3s ease;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.ifr-style-overlay .ifr-tile:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .animate-marquee-reverse,
  .ifr-tile img {
    animation: none;
    transition: none;
  }
}
