/* Premium SnapSave layout — reference-style hero, blue theme */
.snap-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  padding-top: calc(0.85rem + env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(14px);
}
.snap-logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.snap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}
.snap-tab {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.15s;
}
.snap-tab:hover,
.snap-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #bfdbfe;
}
.snap-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
}
.snap-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #bfdbfe;
  margin-bottom: 1rem;
}
.snap-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}
.snap-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
}
.snap-lead {
  margin: 0 auto 1.35rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}
.snap-search {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
}
.snap-search-ico {
  display: none;
}
.snap-search input {
  flex: 1 1 200px;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-radius: 14px;
  background: var(--surface-2);
}
.snap-btn-paste {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
}
.snap-btn-dl {
  flex: 0 0 auto;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: 14px;
  padding: 0 1.35rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  min-height: 48px;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}
.snap-btn-dl.wide { width: 100%; }
.snap-btn-dl:hover { filter: brightness(1.05); }
.snap-tip {
  margin: 0.85rem auto 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 36rem;
}
.snap-status {
  margin: 1rem auto 0;
  max-width: 820px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
}
.snap-status.idle { color: var(--muted); }
.snap-status.loading { color: var(--accent); background: var(--accent-soft); }
.snap-status.ok { color: var(--ok); background: var(--ok-bg); }
.snap-status.err { color: var(--err); background: var(--err-bg); }
.snap-result {
  max-width: 820px;
  margin: 0.75rem auto 0;
  text-align: left;
}
.snap-page-flow {
  width: 100%;
  padding-bottom: 2.5rem;
}
.snap-page-flow .pf-article-wrap {
  width: 100%;
  max-width: none;
  padding-left: clamp(1rem, 4vw, 2.25rem);
  padding-right: clamp(1rem, 4vw, 2.25rem);
}
.snap-page-flow .pf-article-inner {
  max-width: min(1320px, 100%);
  margin: 0 auto;
}
.snap-content-max {
  max-width: min(1320px, calc(100vw - clamp(1.5rem, 6vw, 3.5rem)));
  margin: 0 auto;
  padding: 0 clamp(0.85rem, 3.5vw, 1.75rem) 2rem;
  box-sizing: border-box;
}
.snap-content-max section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem clamp(1rem, 3vw, 1.65rem);
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.snap-content-max section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  letter-spacing: -0.02em;
}
.ivd-steps {
  max-width: min(980px, calc(100vw - clamp(1.5rem, 6vw, 3.5rem)));
  margin: 0.5rem auto 2rem;
  padding: 0 clamp(0.85rem, 3.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-sizing: border-box;
}
.ivd-step-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  position: relative;
}
.ivd-step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, #e91e63, #833ab4, #405de6, #2563eb);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.ivd-step-left { grid-template-columns: 0.9fr 1.1fr; }
.ivd-step-copy {
  padding: 1.5rem 1.6rem;
  color: #1f2937;
}
.ivd-step-title {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 800;
  color: #e91e63;
  line-height: 1.25;
}
.ivd-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ivd-step-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
}
.ivd-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #833ab4, #405de6);
}
.ivd-step-media-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
  min-height: 220px;
}
.ivd-step-glyph {
  font-size: 2.75rem;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}
.ivd-step-media {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ivd-step-media img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}
.ivd-step-media-empty {
  color: var(--muted);
  font-size: 2rem;
  opacity: 0.55;
}
@media (max-width: 768px) {
  .ivd-step-card,
  .ivd-step-left { grid-template-columns: 1fr; }
  .ivd-step-media img { max-height: 240px; }
  .ivd-step-copy { padding: 1.15rem 1.1rem 1.35rem; }
}
.ad-embed {
  margin: 1rem 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-embed:empty { display: none; min-height: 0; margin: 0; }
/* Reference-style dark footer (full width) */
.snap-footer-premium {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 2.5rem;
  background: #0a1629;
  color: #b4beca;
  font-family: var(--font, 'Segoe UI', system-ui, sans-serif);
}
.snap-footer-accent {
  height: 6px;
  width: 100%;
  background: var(--primary, #178f82);
}
.snap-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 1.35rem;
}
.snap-footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3.5rem;
  max-width: 620px;
  margin: 0 auto 1.75rem;
  justify-content: center;
}
.snap-footer-col h4 {
  margin: 0 0 0.85rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #f3f5f8;
  letter-spacing: 0.01em;
}
.snap-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.snap-footer-links li { margin: 0; }
.snap-footer-links a {
  display: inline-block;
  padding: 0.12rem 0;
  color: #b4beca;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.75;
  text-decoration: none;
  transition: color 0.15s ease;
}
.snap-footer-links a:hover {
  color: #ffffff;
}
.snap-footer-premium .footer-ad {
  margin: 0.5rem auto 1.25rem;
  max-width: 728px;
}
.snap-footer-bar {
  border-top: 1px solid #1a2740;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
  max-width: 920px;
  margin: 0 auto;
  font-size: 0.78rem;
  color: #8a96a8;
}
.snap-footer-copy,
.snap-footer-tagline {
  line-height: 1.45;
}
@media (max-width: 640px) {
  .snap-footer-columns {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 1.75rem;
  }
  .snap-footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
.ad-sticky-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  min-height: 0;
  pointer-events: none;
}
.ad-sticky-bottom:not(:empty) {
  min-height: 50px;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--line);
  pointer-events: auto;
}
.snap-top-ad { max-width: 970px; margin: 0.5rem auto; padding: 0 1rem; }
@media (max-width: 768px) {
  .snap-header { flex-wrap: wrap; position: sticky; }
  .nav-toggle { display: block; margin-left: auto; }
  .snap-tabs {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-left: 0;
    padding-bottom: 0.5rem;
  }
  .snap-tabs.open { display: flex; }
  .snap-hero { padding: 1.25rem 0.85rem 1rem; }
  .snap-title { font-size: 1.55rem; }
  .snap-lead { font-size: 0.92rem; margin-bottom: 1rem; }
  .snap-search {
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
  }
  .snap-search input {
    flex: 1 1 100%;
    width: 100%;
    font-size: 16px;
    padding: 0.65rem 0.75rem;
    min-height: 44px;
  }
  .snap-btn-paste, .snap-btn-dl {
    flex: 1 1 calc(50% - 0.25rem);
    width: auto;
    min-height: 44px;
    padding: 0 0.75rem;
    font-size: 0.9rem;
  }
  .step-card-img { height: 110px; }
}

/* Reference hero — full teal band (image layout) */
body.snap-ref-theme {
  background: var(--hero-bg, #178f82);
}
.snap-hero-shell {
  background: var(--hero-bg, #178f82);
  color: #fff;
  padding-bottom: 1.75rem;
}
.snap-header-ref {
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
  padding: 1rem 1.5rem 0.5rem;
}
.snap-logo-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.05rem;
}
.snap-logo-img { border-radius: 50%; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.snap-tabs-ref .snap-tab {
  color: rgba(255,255,255,.92);
  border-color: transparent;
  font-weight: 600;
  font-size: 0.88rem;
}
.snap-tabs-ref .snap-tab:hover,
.snap-tabs-ref .snap-tab.active {
  color: #fff;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.25);
}
.snap-nav-toggle {
  color: #fff;
  border-color: rgba(255,255,255,.35);
  background: rgba(0,0,0,.12);
}
.snap-hero-ref {
  max-width: 980px;
  padding: 1.25rem 1.25rem 0.5rem;
}
.snap-title-ref {
  color: #fff;
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 800;
  margin: 0 0 1.35rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.snap-search-card {
  background: #fff;
  border-radius: 22px;
  padding: 0.65rem;
  box-shadow: 0 22px 55px rgba(0,0,0,.18);
  max-width: 900px;
  margin: 0 auto;
}
.snap-search-ref {
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  background: transparent;
}
.snap-search-ref .snap-search-ico {
  display: flex;
  align-items: center;
  padding: 0 0.35rem 0 0.65rem;
  font-size: 1.1rem;
  opacity: 0.55;
}
.snap-search-ref input {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.snap-search-ref .snap-btn-paste {
  border-radius: 12px;
  background: #f8fafc;
}
.snap-search-ref .snap-btn-dl,
.snap-btn-dl {
  background: linear-gradient(135deg, var(--download, #f97316) 0%, #ea580c 100%);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.45);
  border-radius: 12px;
}
.snap-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  max-width: 920px;
  margin: 1.15rem auto 0;
  padding: 0 0.5rem;
}
.snap-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  transition: transform 0.15s, box-shadow 0.15s;
}
.snap-pill-btn:hover { transform: translateY(-2px); color: #fff; }
.snap-pill-btn.active { box-shadow: 0 0 0 2px #fff; }
.snap-pill-home, .snap-pill-all { background: rgba(255,255,255,.22); }
.snap-pill-youtube { background: #ff0000; }
.snap-pill-facebook { background: #1877f2; }
.snap-pill-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.snap-pill-tiktok { background: #111; }
.snap-pill-x { background: #0f1419; }
.snap-pill-reddit { background: #ff4500; }
.snap-pill-snapchat { background: #fffc00; color: #111 !important; border-color: #e6e600; }
.snap-tip-ref { color: rgba(255,255,255,.88); }
.snap-page-flow {
  background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 120px);
  border-radius: 28px 28px 0 0;
  margin-top: -0.5rem;
  position: relative;
  z-index: 2;
}
@media (max-width: 768px) {
  .snap-tabs-ref.open {
    background: rgba(0,0,0,.35);
    border-radius: 12px;
    padding: 0.5rem;
  }
  .snap-platform-pills { gap: 0.35rem; }
  .snap-pill-btn { font-size: 0.72rem; padding: 0.45rem 0.65rem; }
}
