:root {
  --ink: #0e1110;
  --ink-2: #2a2f2c;
  --muted: #7a817c;
  --line: #dde2dc;
  --line-2: #c5cdc6;
  --bg: #eef1ee;
  --surface: #f8faf8;
  --white: #ffffff;
  --accent: #1f6b4a;
  --accent-soft: #e3f0ea;
  --danger: #a33a3a;
  --ok: #1f6b4a;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --display: "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 0 rgba(14, 17, 16, 0.04), 0 18px 40px rgba(14, 17, 16, 0.07);
  --shadow-offer: 0 2px 0 rgba(14, 17, 16, 0.04), 0 24px 50px rgba(14, 17, 16, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: -0.015em;
}

body.pay-modal-open {
  overflow: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(165deg, #f7f9f7 0%, var(--bg) 42%, #e6ebe7 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 56px,
      rgba(14, 17, 16, 0.025) 56px,
      rgba(14, 17, 16, 0.025) 57px
    );
  mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
}

.bg-glow {
  position: fixed;
  top: -12%;
  left: 50%;
  z-index: -1;
  width: min(560px, 120vw);
  height: 420px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(31, 107, 74, 0.12) 0%,
    rgba(31, 107, 74, 0.04) 42%,
    transparent 70%
  );
  animation: glow-soft 6s ease-in-out infinite alternate;
}

.page-home .bg-glow {
  display: none;
}

.page-home .bg-grid {
  background: linear-gradient(180deg, #f4f6f4 0%, var(--bg) 100%);
  mask-image: none;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.shell {
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 26px 0 10px;
  animation: rise 0.6s var(--ease) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(227, 240, 234, 0.85);
  border: 1px solid rgba(31, 107, 74, 0.16);
  border-radius: 999px;
  padding: 7px 11px 7px 9px;
  backdrop-filter: blur(8px);
}

.site-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(31, 107, 74, 0.45);
  animation: pulse-dot 2.2s var(--ease) infinite;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.nav-back__icon {
  display: block;
  width: 22px;
  height: 22px;
}

.site-main {
  flex: 1;
  padding: 20px 0 48px;
}

/* ——— Home — formal minimal ——— */
.site-header--home {
  justify-content: flex-start;
  padding-top: 22px;
}

.site-badge--formal {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--ink-2);
  background: var(--white);
  border-color: var(--line);
  padding: 6px 12px;
}

.site-badge--formal .site-badge__dot {
  display: none;
}

.site-main--home {
  padding-top: 28px;
}

.hero--formal {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: rise 0.55s var(--ease) both;
}

.hero-brand__icon {
  width: clamp(64px, 18vw, 80px);
  height: clamp(64px, 18vw, 80px);
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 16px;
}

.hero-brand__copy {
  min-width: 0;
}

.hero-brand__name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 6vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.hero-brand__desc {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.page-home .hero-offer {
  margin: 20px 0 0;
  padding-left: 0;
  border-left: 0;
  animation: rise 0.55s var(--ease) 0.08s both;
}

.page-home .offer-line {
  gap: 12px;
}

.page-home .offer-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}

.page-home .offer-sep {
  width: 1px;
  height: 14px;
  border-radius: 0;
  background: var(--line-2);
  opacity: 1;
}

.page-home .offer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
}

.page-home .offer-meta {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
}

.search--formal {
  animation: rise 0.55s var(--ease) 0.14s both;
}

.search-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 14px;
}

.search--formal .search-label {
  margin-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

.search-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.search-field:focus-within {
  background: var(--white);
  border-color: var(--ink-2);
}

.search-prefix {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.search--formal #username {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 13px 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.search--formal #username::placeholder {
  color: #a3aba5;
  font-weight: 500;
}

.search--formal .search-submit {
  flex-shrink: 0;
  min-width: 96px;
  height: auto;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.search--formal .search-submit:hover {
  background: #1c221f;
}

.search--formal .search-dropdown {
  margin-top: 12px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding-top: 12px;
  padding-bottom: 0;
}

.search--formal .search-hint {
  margin-top: 10px;
  font-size: 0.8125rem;
}

/* ——— Logo as headline (profile etc.) ——— */
.hero {
  margin-bottom: 40px;
}

.logo-hero {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: rise 0.7s var(--ease) both;
}

.logo-hero__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(14, 17, 16, 0.06);
  box-shadow: 0 10px 28px rgba(14, 17, 16, 0.08);
  flex-shrink: 0;
}

.logo-hero__icon {
  width: 40px;
  height: 40px;
  display: block;
}

.logo-hero__name {
  font-family: var(--display);
  font-size: clamp(2rem, 7.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
}

.hero-offer {
  margin: 22px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  animation: rise 0.6s var(--ease) 0.1s both;
}

.offer-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px 10px;
  line-height: 1.4;
}

.offer-price {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.offer-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.45;
  flex-shrink: 0;
  align-self: center;
}

.offer-title {
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.offer-meta {
  margin: 7px 0 0;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--muted);
}

@keyframes glow-soft {
  from { opacity: 0.7; transform: translateX(-50%) scale(1); }
  to { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 107, 74, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(31, 107, 74, 0); }
}

/* ——— Search ——— */
.search {
  animation: rise 0.65s var(--ease) 0.12s both;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-shell {
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 6px 6px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search-bar:focus-within {
  border-color: var(--ink);
  box-shadow: var(--shadow), 0 0 0 4px rgba(14, 17, 16, 0.06);
}

.search-at {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

#username {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 12px 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

#username::placeholder {
  color: #a8b0aa;
  font-weight: 500;
}

.search-submit {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.search-submit:hover {
  background: #1c221f;
}

.search-submit:active {
  transform: scale(0.98);
}

.search-hint {
  min-height: 1.2em;
  margin: 10px 2px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.search-hint.is-error {
  color: var(--danger);
}

.search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-offer);
  overflow: hidden;
  animation: drop 0.25s var(--ease) both;
}

.dropdown-label {
  margin: 0;
  padding: 12px 14px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-empty {
  padding: 18px 16px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* Skeleton / blur loading */
.skeleton-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  pointer-events: none;
}

.skeleton-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    #e4e8e5 0%,
    #f2f4f2 45%,
    #e4e8e5 100%
  );
  background-size: 200% 100%;
  filter: blur(0.4px);
  animation: shimmer 1.1s ease-in-out infinite;
}

.skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.skeleton-line {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #e4e8e5 0%,
    #f2f4f2 45%,
    #e4e8e5 100%
  );
  background-size: 200% 100%;
  filter: blur(0.5px);
  animation: shimmer 1.1s ease-in-out infinite;
}

.skeleton-line--name {
  width: 58%;
}

.skeleton-line--sub {
  width: 38%;
  height: 9px;
  opacity: 0.85;
  animation-delay: 0.12s;
}

.skeleton-item:nth-child(2) .skeleton-line--name { width: 48%; }
.skeleton-item:nth-child(2) .skeleton-avatar,
.skeleton-item:nth-child(2) .skeleton-line { animation-delay: 0.08s; }
.skeleton-item:nth-child(3) .skeleton-line--name { width: 64%; }
.skeleton-item:nth-child(3) .skeleton-avatar,
.skeleton-item:nth-child(3) .skeleton-line { animation-delay: 0.16s; }
.skeleton-item:nth-child(4) .skeleton-line--name { width: 42%; }
.skeleton-item:nth-child(4) .skeleton-avatar,
.skeleton-item:nth-child(4) .skeleton-line { animation-delay: 0.24s; }

.search-dropdown.is-loading .dropdown-label {
  opacity: 0.55;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 4px 6px 8px;
  max-height: 300px;
  overflow-y: auto;
}

.result-list--static {
  max-height: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.result-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s var(--ease);
}

.result-item:hover,
.result-item:focus {
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  outline: none;
}

.result-list--static .result-item {
  background: var(--white);
  border: 1px solid var(--line);
}

.result-list--static .result-item:hover {
  border-color: var(--line-2);
  background: #fff;
}

.result-item img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--line);
}

.result-body {
  min-width: 0;
}

.result-user {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.result-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-user .ig-verified {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  font-size: 0.58rem;
}

.result-body > span:not(.result-user) {
  display: block;
  margin-top: 1px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.result-body > span:not(.result-user):empty {
  display: none;
}

.result-arrow {
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.result-item:hover .result-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

/* ——— Panel ——— */
.panel {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  animation: rise 0.55s var(--ease) both;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ghost-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.ghost-btn:hover {
  color: var(--ink);
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-list a {
  display: inline-flex;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.pill-list a::before {
  content: "@";
  color: var(--muted);
}

.pill-list a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ——— Instagram-style profile ——— */
.shell--profile {
  max-width: 480px;
}

.site-header--profile {
  justify-content: space-between;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.site-header--profile .nav-back {
  min-width: 28px;
  padding: 4px 0;
}

.profile-top-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: calc(100% - 120px);
}

.profile-top-user {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-spacer {
  min-width: 28px;
}

.site-main--profile {
  padding-top: 18px;
}

.ig-profile {
  animation: rise 0.55s var(--ease) both;
}

.ig-profile__head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
}

.avatar {
  position: relative;
  flex-shrink: 0;
}

.avatar img {
  display: block;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  border: 2.5px solid var(--white);
  position: relative;
  z-index: 1;
}

.avatar--ig img {
  width: 86px;
  height: 86px;
}

/* Instagram story ring */
.avatar--story {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  animation: story-pop 0.75s var(--ease) both;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.avatar--story:active {
  transform: scale(0.96);
}

.story-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #f58529,
    #feda77,
    #dd2a7b,
    #8134af,
    #515bd4,
    #f58529
  );
  animation: story-spin 3.2s linear infinite;
  pointer-events: none;
}

.story-ring::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: #fff;
}

.avatar--story:hover .story-ring {
  animation-duration: 1.5s;
}

.avatar--story:focus-visible {
  outline: 2px solid #dd2a7b;
  outline-offset: 3px;
  border-radius: 50%;
}

.avatar.is-fetching::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: rgba(14, 17, 16, 0.35);
  animation: spin 0.7s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes story-spin {
  to { transform: rotate(360deg); }
}

@keyframes story-pop {
  0% {
    transform: scale(0.86);
    opacity: 0;
  }
  60% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.ig-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  text-align: center;
}

.ig-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ig-stats strong {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ig-stats span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.ig-profile__info {
  margin-top: 14px;
}

.ig-username {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ig-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3897f0;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}

.ig-verified[hidden] {
  display: none !important;
}

.ig-fullname {
  margin: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.ig-bio {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  white-space: pre-wrap;
  line-height: 1.45;
}

.ig-private {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.ig-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.ig-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.12s var(--ease);
}

.ig-btn:active {
  transform: scale(0.98);
}

.ig-btn--primary {
  border: 0;
  background: #0095f6;
  color: #fff;
}

.ig-btn--primary:hover {
  background: #1877f2;
}

.ig-btn--secondary {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.ig-btn--secondary:hover {
  background: var(--bg);
}

/* ——— Posts grid (Instagram-style) ——— */
.ig-posts {
  margin-top: 22px;
  margin-left: -24px;
  margin-right: -24px;
  animation: rise 0.55s var(--ease) 0.08s both;
}

.ig-posts__tabs {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 0 24px;
}

.ig-posts__tab {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px solid var(--ink);
  margin-top: -1px;
  cursor: default;
}

.ig-grid-wrap {
  position: relative;
}

.ig-grid-wrap.is-locked .ig-cell--blur {
  pointer-events: none;
}

.ig-grid__overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px 16px;
  border: 0;
  cursor: pointer;
  background:
    linear-gradient(
      180deg,
      rgba(238, 241, 238, 0.18) 0%,
      rgba(14, 17, 16, 0.18) 100%
    );
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  transition: background 0.35s var(--ease);
}

.ig-grid__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 55% at 50% 48%,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 72%
  );
  pointer-events: none;
}

.ig-grid__overlay:hover {
  background:
    linear-gradient(
      180deg,
      rgba(238, 241, 238, 0.22) 0%,
      rgba(14, 17, 16, 0.24) 100%
    );
}

.ig-grid__overlay:focus-visible {
  outline: none;
}

.ig-grid__overlay:focus-visible .ig-grid__unlock {
  box-shadow:
    0 0 0 2px var(--white),
    0 0 0 4px var(--accent);
}

.ig-grid__unlock {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 11px 18px 11px 11px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 10px 28px rgba(14, 17, 16, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: unlockIn 0.55s var(--ease) both;
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.ig-grid__overlay:hover .ig-grid__unlock {
  transform: translateY(-1px) scale(1.015);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 34px rgba(14, 17, 16, 0.16);
}

.ig-grid__overlay:active .ig-grid__unlock {
  transform: translateY(0) scale(0.985);
}

.ig-grid__unlock-ring {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.ig-grid__unlock-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  padding-right: 4px;
  text-align: left;
}

.ig-grid__unlock-title {
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}

.ig-grid__unlock-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.2;
}

@keyframes unlockIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 2px;
}

.ig-grid__skel {
  aspect-ratio: 1;
  background: linear-gradient(90deg, #e8ebe9 25%, #f3f5f4 50%, #e8ebe9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}

.ig-cell {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #dfe3e1;
}

.ig-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.ig-cell:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

.ig-cell__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.ig-cell__pin {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.ig-cell--blur {
  cursor: default;
}

.ig-cell--blur img {
  filter: blur(var(--blur-amount, 16px)) brightness(0.97) saturate(0.82) contrast(1.02);
  transform: scale(var(--blur-scale, 1.18));
  transform-origin: center;
}

.ig-cell--blur:nth-child(3n) img,
.ig-cell--blur:nth-child(3n + 1) img,
.ig-cell--blur:nth-child(3n + 2) img {
  filter: blur(var(--blur-amount, 16px)) brightness(0.97) saturate(0.82) contrast(1.02);
  transform: scale(var(--blur-scale, 1.18));
}

.ig-cell--blur::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(14, 17, 16, 0.1);
  pointer-events: none;
}

.ig-posts__empty {
  margin: 28px 0 8px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toast {
  margin: 10px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ok);
  text-align: center;
}

.site-footer {
  padding: 0 0 32px;
  margin-top: auto;
}

.site-footer p {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@media (max-width: 520px) {
  .shell {
    padding: 0 18px;
  }

  .hero-brand__name {
    font-size: 1.65rem;
  }

  .search-row {
    flex-direction: column;
  }

  .search--formal .search-submit {
    width: 100%;
    min-height: 44px;
  }

  .search-panel {
    padding: 16px;
  }

  .offer-price {
    font-size: 1.125rem;
  }

  .offer-title {
    font-size: 1rem;
  }

  .offer-meta {
    font-size: 0.78rem;
  }

  .logo-hero__mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .logo-hero__icon {
    width: 34px;
    height: 34px;
  }

  .logo-hero__name {
    font-size: 2rem;
  }

  .search-bar {
    flex-wrap: wrap;
    border-radius: 14px;
    padding: 8px;
  }

  .search-at {
    padding-left: 8px;
  }

  #username {
    flex: 1 1 calc(100% - 2rem);
  }

  .search-submit {
    width: 100%;
  }

  .result-arrow {
    display: none;
  }

  .ig-profile__head {
    grid-template-columns: 88px 1fr;
    gap: 14px;
  }

  .avatar--story {
    width: 88px;
    height: 88px;
  }

  .avatar--ig img,
  .avatar img {
    width: 78px;
    height: 78px;
  }

  .ig-stats strong {
    font-size: 0.95rem;
  }

  .ig-posts {
    margin-left: -18px;
    margin-right: -18px;
  }

  .ig-posts__tabs {
    padding: 0 18px;
  }

  .ig-grid__unlock {
    gap: 10px;
    padding: 10px 14px 10px 10px;
    border-radius: 16px;
  }

  .ig-grid__unlock-ring {
    width: 36px;
    height: 36px;
  }

  .ig-grid__unlock-title {
    font-size: 0.8rem;
  }
}

/* ——— Payment modal — minimal ——— */
.pay-modal {
  --pay-display: "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
  --pay-body: "Manrope", system-ui, sans-serif;
  --pay-ink: #0e1110;
  --pay-muted: #7a817c;
  --pay-line: #e4e8e4;
  --pay-surface: #f6f8f6;
  --pay-radius: 14px;
  --pay-radius-sm: 10px;

  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--pay-body);
}

.pay-modal[hidden] {
  display: none !important;
}

.pay-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 17, 16, 0.22);
  backdrop-filter: blur(4px);
}

.pay-modal__dialog {
  position: relative;
  width: min(100%, 400px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 28px 24px 22px;
  background: #fff;
  border: 1px solid var(--pay-line);
  border-radius: var(--pay-radius);
  box-shadow: 0 20px 48px rgba(14, 17, 16, 0.12);
  animation: pay-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pay-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.pay-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pay-surface);
  color: var(--pay-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.pay-modal__close:hover {
  color: var(--pay-ink);
  background: #eef1ee;
}

.pay-modal__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: 0;
  margin-bottom: 22px;
}

.pay-modal__logo {
  width: clamp(72px, 22vw, 88px);
  height: clamp(72px, 22vw, 88px);
  object-fit: contain;
  border-radius: 18px;
  margin-bottom: 8px;
}

.pay-modal__brand {
  margin: 0 0 6px;
  font-family: var(--pay-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pay-ink);
}

.pay-modal__amount {
  margin: 0;
  font-family: var(--pay-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--pay-ink);
  font-variant-numeric: tabular-nums;
}

.pay-modal__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pay-muted);
  font-variant-numeric: tabular-nums;
}

.pay-modal__meta-sep {
  opacity: 0.5;
}

.pay-form__heading {
  margin: 0 0 14px;
  font-family: var(--pay-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pay-ink);
}

.pay-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pay-form__row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
}

.pay-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pay-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pay-muted);
}

.pay-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--pay-line);
  border-radius: var(--pay-radius-sm);
  background: #fff;
  font-family: var(--pay-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--pay-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pay-input--card {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.pay-input::placeholder {
  color: #b4bab5;
  font-weight: 400;
}

.pay-input:focus {
  outline: none;
  border-color: #b8c0b9;
  box-shadow: 0 0 0 3px rgba(14, 17, 16, 0.06);
}

.pay-form__error {
  margin: -2px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pay-ink);
}

.pay-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  height: 46px;
  border: 0;
  border-radius: var(--pay-radius-sm);
  background: var(--pay-ink);
  color: #fff;
  font-family: var(--pay-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

.pay-form__submit-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pay-btn-spin 0.65s linear infinite;
  flex-shrink: 0;
}

.pay-form__submit-spin[hidden] {
  display: none !important;
}

@keyframes pay-btn-spin {
  to { transform: rotate(360deg); }
}

.pay-form__submit:hover {
  background: #1c221f;
}

.pay-form__submit:active {
  transform: scale(0.99);
}

.pay-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pay-modal__trust {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(228, 232, 228, 0.8);
}

.pay-trust__logos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 0;
}

.pay-trust__badge {
  display: block;
  width: auto;
  height: 28px;
  max-height: 28px;
  object-fit: contain;
  opacity: 0.95;
}

.pay-trust__badge--a1,
.pay-trust__badge--a2 {
  margin: 0;
  object-position: center;
}

.pay-trust__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0;
  text-align: center;
}

.pay-trust__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--pay-ink);
}

@media (max-width: 520px) {
  .pay-modal__dialog {
    padding: 24px 18px 20px;
  }

  .pay-form__row {
    grid-template-columns: 1fr 80px;
  }

  .pay-modal__amount {
    font-size: 1.75rem;
  }
}

/* ——— Payment steps: 3DS + OTP ——— */
.pay-step[hidden] {
  display: none !important;
}

.pay-modal__dialog:has(.pay-step--3ds:not([hidden])) {
  min-height: 380px;
  padding: 40px 28px 36px;
}

.pay-step--3ds {
  padding: 56px 0 60px;
  min-height: 300px;
}

.pay-step--otp {
  padding: 8px 0 4px;
}

.pay-3ds,
.pay-otp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pay-3ds {
  min-height: 280px;
}

.pay-3ds__logo {
  width: auto;
  height: 68px;
  max-width: 240px;
  margin-bottom: 0;
  object-fit: contain;
}

.pay-3ds__logo--pulse {
  animation: pay-logo-fade 2.6s ease-in-out infinite;
}

@keyframes pay-logo-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

.pay-otp__logo {
  width: auto;
  height: 40px;
  max-width: 160px;
  margin-bottom: 18px;
  object-fit: contain;
}

.pay-otp__title {
  margin: 0;
  font-family: var(--pay-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1d4ed8;
}

.pay-otp__text {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pay-muted);
  line-height: 1.5;
}

.pay-otp__form {
  width: 100%;
  margin-top: 22px;
}

.pay-otp__digits {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-otp__digit {
  width: 44px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--pay-line);
  border-radius: var(--pay-radius-sm);
  background: #fff;
  font-family: var(--pay-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--pay-ink);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pay-otp__digit:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

@media (max-width: 520px) {
  .pay-otp__digit {
    width: 40px;
    height: 46px;
    font-size: 1.125rem;
  }

  .pay-otp__digits {
    gap: 6px;
  }
}
