/* ============================================================
   LUNA — Instagram clone (pixel-faithful)
   Tokens, layout, components.
   ============================================================ */

:root {
  --ig-bg: #FAFAFA;
  --ig-card: #FFFFFF;
  --ig-border: #DBDBDB;
  --ig-border-soft: #EFEFEF;
  --ig-text: #262626;
  --ig-text-2: #8E8E8E;
  --ig-text-3: #C7C7C7;
  --ig-blue: #0095F6;
  --ig-blue-hover: #1877F2;
  --ig-red: #ED4956;
  --ig-link: #00376B;
  --ig-overlay: rgba(0, 0, 0, .65);
  --ig-story-gradient: linear-gradient(45deg, #F09433 0%, #E6683C 25%, #DC2743 50%, #CC2366 75%, #BC1888 100%);

  --ig-shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --ig-radius: 8px;

  --ig-sidebar-w: 245px;
  --ig-sidebar-w-mini: 72px;
  --ig-topbar-h: 60px;

  --ig-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", Helvetica, "Apple Color Emoji", Arial, sans-serif,
    "Segoe UI Emoji", "Segoe UI Symbol";
  --ig-font-logo: "Grand Hotel", "Billabong", "Lobster", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ig-bg);
  color: var(--ig-text);
  font-family: var(--ig-font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
a { color: var(--ig-link); text-decoration: none; }
img { display: block; max-width: 100%; }

/* hide scrollbars for horizontal scrollers */
.scroller { scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }

/* ============================================================
   SIDEBAR (desktop)
   ============================================================ */
.ig-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--ig-sidebar-w);
  background: var(--ig-card);
  border-right: 1px solid var(--ig-border);
  padding: 8px 12px 20px;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: width .2s ease;
}
.ig-logo {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 25px 12px 16px;
  color: var(--ig-text);
}
.ig-logo-full {
  font-family: var(--ig-font-logo);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: .2px;
  line-height: 1;
}
.ig-logo-mini { display: none; }

.ig-nav {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 8px; flex: 1;
}
.ig-nav-foot { margin-top: auto; padding-bottom: 8px; }

.ig-nav-item {
  display: flex; align-items: center; gap: 16px;
  padding: 12px;
  border-radius: 12px;
  color: var(--ig-text);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  transition: background .15s ease, transform .1s ease;
}
.ig-nav-item:hover { background: rgba(0, 0, 0, .05); }
.ig-nav-item:active { transform: scale(.98); }
.ig-nav-item.is-active { font-weight: 700; }

.ig-nav-icon {
  width: 24px; height: 24px; flex: 0 0 24px;
  color: var(--ig-text);
}
.ig-nav-item.is-active .ig-nav-icon {
  stroke-width: 2.5;
}

.ig-nav-avatar {
  width: 24px; height: 24px; flex: 0 0 24px;
  border-radius: 50%;
  background-color: #eee;
  background-size: cover;
  background-position: center;
  outline: 2px solid #000;
  outline-offset: -2px;
}

/* mini sidebar at smaller-desktop breakpoint */
@media (max-width: 1263px) and (min-width: 768px) {
  .ig-sidebar { width: var(--ig-sidebar-w-mini); padding: 8px 12px; align-items: center; }
  .ig-logo { padding: 25px 0 16px; }
  .ig-logo-full { display: none; }
  .ig-logo-mini { display: inline-flex; color: var(--ig-text); }
  .ig-nav-item > span { display: none; }
  .ig-nav-item { padding: 12px; }
}

/* ============================================================
   MOBILE TOP BAR (< 768)
   ============================================================ */
.ig-topbar {
  display: none;
  position: sticky; top: 0; z-index: 60;
  height: var(--ig-topbar-h);
  background: var(--ig-card);
  border-bottom: 1px solid var(--ig-border);
  padding: 0 16px;
  align-items: center; justify-content: space-between;
}
.ig-topbar .ig-logo-full { font-size: 26px; }
.ig-topbar-actions { display: flex; align-items: center; gap: 18px; }
.ig-iconbtn {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  width: 24px; height: 24px; color: var(--ig-text);
}
.ig-iconbtn svg { width: 24px; height: 24px; display: block; }

@media (max-width: 767px) {
  .ig-sidebar { display: none; }
  .ig-topbar { display: flex; }
}

/* ============================================================
   MAIN COLUMN
   ============================================================ */
.ig-main {
  margin-left: var(--ig-sidebar-w);
  max-width: 935px;
  padding: 30px 20px 60px;
  margin-right: auto;
  /* center within the remaining viewport */
  margin-inline: auto;
  padding-left: calc(var(--ig-sidebar-w) + 20px);
}
@media (max-width: 1263px) and (min-width: 768px) {
  .ig-main { padding-left: calc(var(--ig-sidebar-w-mini) + 20px); }
}
@media (max-width: 767px) {
  .ig-main { padding: 0 0 80px; max-width: 100%; }
}

/* ============================================================
   PROFILE HEADER
   ============================================================ */
.ig-profile {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 30px;
  padding: 16px 20px 44px;
  align-items: start;
}
.ig-profile[aria-busy="true"] { min-height: 200px; }

.ig-avatar-wrap {
  display: flex; align-items: center; justify-content: center;
}
.ig-avatar-ring {
  width: 168px; height: 168px;
  border-radius: 50%;
  padding: 5px;
  background: var(--ig-story-gradient);
  display: grid; place-items: center;
}
.ig-avatar-ring::before {
  content: ""; position: absolute; /* placeholder */
}
.ig-avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--ig-card);
  padding: 4px;
  display: grid; place-items: center;
}
.ig-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background-color: #eee;
  background-size: cover;
  background-position: center top;
}

.ig-profile-meta { padding-top: 8px; }

.ig-username-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.ig-username {
  font-size: 20px; font-weight: 400; line-height: 25px;
  color: var(--ig-text);
  display: inline-flex; align-items: center; gap: 6px;
}
.ig-verified {
  width: 18px; height: 18px; display: inline-block; vertical-align: -3px;
}
.ig-btn {
  background: #EFEFEF;
  border: 0; cursor: pointer;
  color: var(--ig-text);
  font-weight: 600; font-size: 14px;
  padding: 7px 16px;
  border-radius: 8px;
  line-height: 18px;
  transition: background .15s ease, transform .1s ease;
}
.ig-btn:hover { background: #DBDBDB; }
.ig-btn:active { transform: scale(.97); }
.ig-btn.is-primary {
  background: var(--ig-blue); color: #fff;
}
.ig-btn.is-primary:hover { background: var(--ig-blue-hover); }
.ig-btn-icon {
  background: #EFEFEF; border: 0; cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-grid; place-items: center;
  color: var(--ig-text);
}
.ig-btn-icon svg { width: 16px; height: 16px; }

.ig-stats {
  display: flex; gap: 40px;
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--ig-text);
}
.ig-stats b { font-weight: 600; }

.ig-display-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ig-bio { white-space: pre-line; line-height: 1.5; font-size: 14px; }
.ig-bio .ig-tag { color: var(--ig-link); }
.ig-category { color: var(--ig-text-2); font-size: 14px; margin-top: 4px; }

/* mobile profile */
@media (max-width: 767px) {
  .ig-profile {
    grid-template-columns: 86px 1fr;
    gap: 28px;
    padding: 16px;
  }
  .ig-avatar-ring { width: 86px; height: 86px; padding: 3px; }
  .ig-avatar-inner { padding: 2.5px; }
  .ig-username-row { margin-bottom: 12px; gap: 8px; }
  .ig-username { font-size: 18px; }
  .ig-btn { padding: 5px 12px; font-size: 13px; }
  .ig-stats { display: none; } /* moved to mobile-bar below */
  /* desktop bio/category in profile-meta are replicated by .ig-profile-meta-mobile */
  .ig-profile-meta .ig-display-name,
  .ig-profile-meta .ig-bio,
  .ig-profile-meta .ig-category { display: none; }
  .ig-mobile-stats {
    display: flex; justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid var(--ig-border-soft);
    border-bottom: 1px solid var(--ig-border-soft);
    text-align: center;
  }
  .ig-mobile-stats span b { display: block; font-weight: 600; font-size: 15px; }
  .ig-mobile-stats span { color: var(--ig-text-2); font-size: 12px; }
  .ig-profile-meta-mobile {
    padding: 0 16px 16px;
    font-size: 14px;
  }
  .ig-profile-meta-mobile .ig-display-name { margin-top: 8px; }
  .ig-btn-message-hide { display: none !important; }
}
@media (min-width: 768px) {
  .ig-mobile-stats, .ig-profile-meta-mobile { display: none; }
}

/* ============================================================
   STORY HIGHLIGHTS
   ============================================================ */
.ig-highlights {
  display: flex; gap: 36px;
  padding: 24px 24px 36px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.ig-highlight {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  scroll-snap-align: start;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ig-text);
  flex-shrink: 0;
  width: 86px;
}
.ig-highlight-cover {
  width: 77px; height: 77px;
  border-radius: 50%;
  padding: 3px;
  background: var(--ig-card);
  border: 1px solid var(--ig-border);
  display: grid; place-items: center;
  transition: transform .15s ease;
}
.ig-highlight:hover .ig-highlight-cover { transform: scale(1.03); }
.ig-highlight-cover-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background-color: #eee;
  background-size: cover;
  background-position: center;
}
.ig-highlight-label {
  font-size: 12px;
  max-width: 86px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 767px) {
  .ig-highlights { padding: 16px 16px 24px; gap: 16px; }
}

/* ============================================================
   TABS
   ============================================================ */
.ig-tabs {
  display: flex; justify-content: center; gap: 60px;
  border-top: 1px solid var(--ig-border);
  margin: 0 16px;
}
.ig-tab {
  background: transparent; border: 0; cursor: pointer;
  padding: 16px 0; margin-top: -1px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ig-text-2);
  border-top: 1px solid transparent;
}
.ig-tab.is-active {
  color: var(--ig-text);
  border-top-color: var(--ig-text);
}
@media (max-width: 767px) {
  .ig-tabs { gap: 0; margin: 0; }
  .ig-tab { flex: 1; justify-content: center; }
  .ig-tab span { display: none; } /* show icons only on mobile, like real IG */
  .ig-tab svg { width: 24px !important; height: 24px !important; }
}

/* ============================================================
   GRID
   ============================================================ */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 28px 0 0;
}
@media (max-width: 767px) {
  .ig-grid { gap: 2px; padding-top: 2px; }
}

.ig-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #eee;
  overflow: hidden;
  cursor: pointer;
}
.ig-tile img,
.ig-tile video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s ease;
}
.ig-tile-badge {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}
.ig-tile-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 28px;
  opacity: 0; transition: opacity .2s ease;
  font-weight: 700; font-size: 16px;
  pointer-events: none;
}
.ig-tile-overlay .ig-stat { display: inline-flex; align-items: center; gap: 8px; }
.ig-tile-overlay svg { width: 19px; height: 19px; fill: #fff; color: #fff; stroke: #fff; }
.ig-tile:hover .ig-tile-overlay { opacity: 1; }
.ig-tile:focus-visible { outline: 2px solid var(--ig-blue); outline-offset: 2px; }
@media (hover: none) {
  .ig-tile-overlay { display: none; }
}

/* empty placeholder for tabs */
.ig-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ig-text);
}
.ig-empty-circle {
  width: 64px; height: 64px;
  border: 2px solid var(--ig-text);
  border-radius: 50%;
  margin: 0 auto 16px;
}
.ig-empty h2 { font-size: 28px; font-weight: 800; margin: 8px 0 4px; }
.ig-empty p { color: var(--ig-text-2); }

/* ============================================================
   LANGUAGE TOGGLE (floating)
   ============================================================ */
.ig-lang {
  position: fixed; right: 20px; bottom: 24px; z-index: 70;
  background: var(--ig-card);
  border: 1px solid var(--ig-border);
  padding: 10px 14px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--ig-text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transition: transform .15s ease, background .15s ease;
}
.ig-lang:hover { background: #f4f4f4; transform: translateY(-1px); }
.ig-lang-globe { font-size: 15px; line-height: 1; }
.ig-lang-label { display: inline-flex; align-items: center; gap: 4px; }
.ig-lang-label #langOther { color: var(--ig-text-2); }

/* ============================================================
   MODAL
   ============================================================ */
.ig-modal {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ig-overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: ig-fade .15s ease;
}
@keyframes ig-fade { from { opacity: 0; } to { opacity: 1; } }
.ig-modal[hidden] { display: none !important; }
.ig-modal-close {
  position: fixed; top: 16px; right: 22px;
  background: transparent; border: 0; cursor: pointer;
  color: #fff;
}
.ig-modal-close svg { width: 22px; height: 22px; }

.ig-modal-shell {
  background: var(--ig-card);
  border-radius: 6px;
  width: 100%;
  max-width: 1100px;
  height: min(900px, calc(100vh - 60px));
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  overflow: hidden;
  animation: ig-pop .18s ease;
}
@keyframes ig-pop { from { transform: scale(.98); opacity: .6; } to { transform: scale(1); opacity: 1; } }

.ig-media-stage {
  position: relative;
  background: #000;
  display: grid; place-items: center;
  overflow: hidden;
  min-width: 0;
}
.ig-media-stage img,
.ig-media-stage video {
  width: 100%; height: 100%; object-fit: contain;
}
.ig-stage-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, .9);
  border: 0; border-radius: 50%;
  width: 30px; height: 30px;
  cursor: pointer;
  display: grid; place-items: center;
  color: #262626;
}
.ig-stage-arrow:disabled { opacity: 0; cursor: default; }
.ig-stage-arrow.is-prev { left: 12px; }
.ig-stage-arrow.is-next { right: 12px; }
.ig-stage-arrow.is-next svg { transform: rotate(180deg); }
.ig-stage-arrow svg { width: 16px; height: 16px; color: #262626; }
.ig-stage-arrow svg use { stroke: #262626 !important; }
.ig-stage-arrow svg polyline { stroke: #262626 !important; }

.ig-stage-dots {
  position: absolute; bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 4px;
  pointer-events: none;
}
.ig-stage-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}
.ig-stage-dot.is-active { background: var(--ig-blue); }

/* Right column */
.ig-side {
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  min-width: 0;
  border-left: 1px solid var(--ig-border-soft);
}
.ig-side-head {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--ig-border-soft);
}
.ig-side-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background-color: #eee;
  background-size: cover; background-position: center;
}
.ig-side-user {
  font-size: 14px; line-height: 18px;
}
.ig-side-user b { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ig-side-user b .ig-verified { width: 14px; height: 14px; }
.ig-side-location { font-size: 12px; color: var(--ig-text); }
.ig-side-more {
  background: transparent; border: 0; cursor: pointer; color: var(--ig-text);
  width: 24px; height: 24px;
}
.ig-side-more svg { width: 24px; height: 24px; }

.ig-side-body {
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
}
.ig-comment {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.ig-comment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #f8d3e4, #c8b6ff);
}
.ig-comment-body { font-size: 14px; line-height: 18px; }
.ig-comment-body b { font-weight: 600; margin-right: 6px; }
.ig-comment-meta { color: var(--ig-text-2); font-size: 12px; margin-top: 4px; }

/* Pinned caption (first comment-style block) */
.ig-caption {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.ig-caption-body { font-size: 14px; line-height: 18px; }
.ig-caption-body b { font-weight: 600; margin-right: 6px; }
.ig-caption-body .ig-tag { color: var(--ig-link); }
.ig-caption-meta { color: var(--ig-text-2); font-size: 12px; margin-top: 6px; }

.ig-actions {
  border-top: 1px solid var(--ig-border-soft);
  padding: 6px 16px 4px;
}
.ig-actions-row {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 0 4px;
}
.ig-action {
  background: transparent; border: 0; cursor: pointer;
  width: 24px; height: 24px;
  color: var(--ig-text);
  transition: transform .12s ease;
}
.ig-action:active { transform: scale(.88); }
.ig-action svg { width: 24px; height: 24px; display: block; }
.ig-action.is-save { margin-left: auto; }
.ig-action.is-liked { color: var(--ig-red); }
.ig-action.is-liked svg use { fill: var(--ig-red); stroke: var(--ig-red); }
.ig-action.is-saved { color: var(--ig-text); }
.ig-action.is-liked svg { animation: ig-heart-pop .35s ease; }
@keyframes ig-heart-pop {
  0% { transform: scale(.5); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.ig-likes { padding: 4px 16px 6px; font-weight: 600; font-size: 14px; }
.ig-timestamp { padding: 0 16px 12px; color: var(--ig-text-2); font-size: 10px; letter-spacing: .2px; text-transform: uppercase; }

.ig-addcomment {
  border-top: 1px solid var(--ig-border-soft);
  padding: 6px 16px;
  display: flex; align-items: center; gap: 12px;
  color: var(--ig-text-2); font-size: 14px;
}
.ig-addcomment input {
  border: 0; outline: 0;
  flex: 1; background: transparent;
  font-family: inherit; font-size: 14px;
  color: var(--ig-text);
}
.ig-addcomment .ig-post-btn {
  background: transparent; border: 0; cursor: pointer;
  color: var(--ig-blue); font-weight: 600; font-size: 14px;
  opacity: .5;
}

/* mobile modal */
@media (max-width: 767px) {
  .ig-modal { padding: 0; }
  .ig-modal-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh; max-height: 100vh;
    border-radius: 0;
  }
  .ig-media-stage { aspect-ratio: 1 / 1; height: auto; max-height: 60vh; }
  .ig-side { border-left: 0; border-top: 1px solid var(--ig-border-soft); }
}

/* ============================================================
   EXPLORE LANDING (index.html)
   Scoped to .explore-page on <body> so nothing leaks into
   the profile pages.
   ============================================================ */
.explore-page .ig-main { max-width: 1100px; }
.explore-main {
  padding-top: 48px;
}

.explore-hero {
  text-align: center;
  padding: 8px 16px 40px;
}
.explore-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--ig-text-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.explore-title {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 300;
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -.5px;
  color: var(--ig-text);
}
.explore-title em {
  font-family: var(--ig-font-logo);
  font-style: normal;
  font-weight: 400;
  background: var(--ig-story-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 4px;
}
.explore-title-dot {
  color: var(--ig-text-3);
  margin: 0 6px;
  font-weight: 300;
}
.explore-sub {
  color: var(--ig-text-2);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}
.explore-rule {
  margin: 28px auto 0;
  height: 1px;
  width: 96px;
  position: relative;
}
.explore-rule span {
  position: absolute; inset: 0;
  background: var(--ig-story-gradient);
  border-radius: 1px;
  opacity: .9;
}

/* ----- Grid ----- */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0 56px;
}
@media (max-width: 1023px) { .explore-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px)  {
  .explore-grid { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .explore-main { padding-top: 24px; }
}

/* ----- Card ----- */
.explore-card {
  --accent: #DBDBDB;
  display: block;
  background: var(--ig-card);
  border: 1px solid var(--ig-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ig-text);
  position: relative;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  isolation: isolate;
}
.explore-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--accent);
  opacity: .85;
  z-index: 2;
}
.explore-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  border-color: var(--accent);
}
.explore-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.explore-card-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #f2f2f2;
  overflow: hidden;
}
.explore-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.explore-card:hover .explore-card-cover img { transform: scale(1.04); }
.explore-card-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.18));
  pointer-events: none;
}
.explore-card-cover-empty {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(45deg, #fafafa 0 12px, #f1f1f1 12px 24px);
}
.explore-card-empty-mark {
  font-family: var(--ig-font-logo);
  font-size: 38px;
  color: var(--accent);
  letter-spacing: 1px;
  opacity: .55;
}

/* ----- Badge ----- */
.explore-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--ig-text);
  backdrop-filter: blur(4px);
  z-index: 3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.explore-badge-tier1 { color: #fff; background: #0095F6; }
.explore-badge-tier2 { color: #fff; background: #1c1c1f; }
.explore-badge-zoo   { color: #B9306C; background: #FFE7F1; }

/* ----- Card body ----- */
.explore-card-body { padding: 14px 16px 18px; }
.explore-card-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.explore-card-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background-color: #eee;
  background-size: cover; background-position: center;
  flex: 0 0 32px;
  outline: 1.5px solid var(--accent);
  outline-offset: 1px;
}
.explore-card-avatar-empty {
  background: var(--ig-story-gradient);
  opacity: .25;
}
.explore-card-handle {
  display: flex; flex-direction: column;
  font-size: 13px; min-width: 0;
}
.explore-card-handle b {
  font-weight: 600; color: var(--ig-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.explore-card-stats {
  color: var(--ig-text-2);
  font-size: 12px;
  margin-top: 1px;
}
.explore-card-coming {
  color: var(--ig-text-2);
  font-size: 12px;
  font-style: italic;
}
.explore-card-name {
  font-weight: 600;
  font-size: 15px;
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 4px;
}
.explore-card-name .ig-verified { width: 14px; height: 14px; }
.explore-card-bio {
  color: var(--ig-text-2);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* pending state — slightly desaturated */
.explore-card.is-pending {
  background: #fbfbfb;
}
.explore-card.is-pending .explore-card-name,
.explore-card.is-pending .explore-card-handle b {
  color: var(--ig-text-2);
}

/* ----- Skeleton state ----- */
.explore-card.is-skeleton {
  pointer-events: none;
}
.explore-card.is-skeleton .explore-card-cover {
  background: linear-gradient(110deg, #f2f2f2 30%, #ececec 50%, #f2f2f2 70%);
  background-size: 200% 100%;
  animation: explore-shimmer 1.4s ease-in-out infinite;
}
.explore-card.is-skeleton .explore-card-avatar {
  outline: 0;
  background: #eee;
}
.skel-line {
  height: 10px; border-radius: 4px;
  background: #ececec;
  margin: 6px 0;
  width: 60%;
}
.skel-line-lg { width: 78%; height: 12px; margin-top: 12px; }
.skel-line-sm { width: 44%; }
@keyframes explore-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- Footer ----- */
.explore-foot {
  text-align: center;
  padding: 32px 16px 0;
  color: var(--ig-text-2);
  font-size: 12px;
  border-top: 1px solid var(--ig-border-soft);
  margin-top: 16px;
}
.explore-foot-muted { color: var(--ig-text-3); }
