/* =========================================================
   FeetDex — base styles
   ========================================================= */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --surface-3: #e8e8ed;
  --text: #111114;
  --muted: #6c6c78;
  --border: #e6e6eb;
  --accent: #ff3d68;
  --accent-hover: #f02a57;
  --accent-soft: rgba(255, 61, 104, 0.12);
  --star: #ffb020;
  --star-empty: #dcdce2;
  --shadow: 0 1px 2px rgba(17, 17, 20, 0.04), 0 4px 14px rgba(17, 17, 20, 0.05);
  --shadow-lg: 0 2px 6px rgba(17, 17, 20, 0.06), 0 18px 48px rgba(17, 17, 20, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 60px;
  --gap: 8px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #0b0b0e;
  --surface: #141418;
  --surface-2: #1c1c22;
  --surface-3: #26262e;
  --text: #f3f3f6;
  --muted: #9b9ba8;
  --border: #24242c;
  --accent-soft: rgba(255, 61, 104, 0.16);
  --star-empty: #34343e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --header-h: 68px; --gap: 12px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.15; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }

.muted { color: var(--muted); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.97); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn[data-fav][aria-pressed='true'] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn[data-fav][aria-pressed='true'] .icon { fill: currentColor; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; flex: none;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--surface-2); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }

.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; flex: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.logo-mark .icon { width: 20px; height: 20px; }
.logo b { color: var(--accent); font-weight: 800; }

.site-header .search { flex: 1; max-width: 520px; margin: 0 auto; }

.header-nav { display: flex; align-items: center; gap: 4px; }
.ico-accent { color: var(--accent); }
.ico-star { color: var(--star); }

/* Visible discovery links (Trending / Top rated) */
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; transition: color 0.15s, background 0.15s; }
.nav-link .icon { width: 16px; height: 16px; }
.nav-link:hover, .nav-link[aria-current='page'] { color: var(--text); background: var(--surface-2); }

/* Browse dropdown (categories) — a bordered button so it reads as a control */
.nav-browse { position: relative; }
.nav-browse-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.nav-browse-btn:hover, .nav-browse-btn[aria-expanded='true'] { background: var(--surface-2); border-color: var(--surface-3); }
.nav-browse-ico { width: 16px; height: 16px; color: var(--accent); }
.nav-chev { width: 15px; height: 15px; margin-left: -1px; transition: transform 0.18s ease; }
.nav-browse-btn[aria-expanded='true'] .nav-chev { transform: rotate(180deg); }
.nav-browse-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 236px; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.nav-browse-panel[hidden] { display: none; } /* [hidden] must win over display:flex */
.nav-browse-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--text); font-size: 14px; font-weight: 500;
}
.nav-browse-panel a:hover, .nav-browse-panel a[aria-current='page'] { background: var(--surface-2); }
.nav-count { color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.nav-sep { height: 1px; margin: 5px 8px; background: var(--border); }

/* Explore group — shown inside the dropdown on mobile (visible as bar links on desktop) */
.nav-explore { display: none; }
.nav-explore a { justify-content: flex-start; gap: 10px; }
.nav-explore a .icon { width: 16px; height: 16px; flex: none; }

.search-toggle { display: none; }
.theme-icon-sun { display: none; }
[data-theme='dark'] .theme-icon-sun { display: block; }
[data-theme='dark'] .theme-icon-moon { display: none; }

/* ---------- Search ---------- */

.search { position: relative; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.search input {
  width: 100%; height: 42px;
  padding: 0 44px 0 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-2);
  font: inherit; color: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search kbd {
  position: absolute; right: 12px;
  font: 600 12px var(--font); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px;
  background: var(--surface); pointer-events: none;
}
.search input:focus ~ kbd { opacity: 0; }
.search-close { display: none; }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: min(440px, 70vh); overflow-y: auto;
}
.sr-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); }
.sr-item[aria-selected='true'], .sr-item:hover { background: var(--surface-2); }
.sr-item img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: var(--surface-3); }
.sr-text { display: flex; flex-direction: column; min-width: 0; }
.sr-name { font-weight: 600; }
.sr-name mark { background: none; color: var(--accent); }
.sr-meta { color: var(--muted); font-size: 13px; }
.sr-go { margin-left: auto; color: var(--muted); opacity: 0; }
.sr-item[aria-selected='true'] .sr-go { opacity: 1; }
.sr-empty { padding: 16px 12px; color: var(--muted); }

@media (max-width: 767px) {
  .nav-link { display: none; }        /* discovery links move into the Browse dropdown */
  .nav-explore { display: block; }    /* …which gains All / Trending / Top rated on mobile */
  .header-nav { order: 1; }           /* Browse goes last — far right, after the search + theme icons */
  .search-toggle { margin-left: auto; } /* push the whole right cluster to the right */
  .site-header .search { display: none; }
  .search-toggle { display: grid; }
  .site-header.search-open .header-inner > :not(.search) { display: none; }
  .site-header.search-open .search { display: flex; flex: 1; max-width: none; }
  .site-header.search-open .search kbd { display: none; }
  .site-header.search-open .search-close { display: grid; margin-left: 6px; }
  .site-header .search-results {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    border-radius: 0 0 var(--radius) var(--radius); border-width: 0 0 1px;
    max-height: calc(100dvh - var(--header-h));
  }
}

/* ---------- Breadcrumbs ---------- */

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 16px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: 0.5; }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }

/* ---------- Celeb profile ---------- */

.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 0 16px;
}
.avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: 50% 20%;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
  margin: 5px;
}
.profile h1 { font-size: clamp(26px, 4.4vw, 44px); font-weight: 800; }
.profile-sub { margin: 4px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.profile-sub .dot { opacity: 0.5; }
.profile-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.profile-actions .btn { flex: 1; }

@media (min-width: 768px) {
  .profile { grid-template-columns: auto 1fr auto; gap: 24px; padding: 24px 0; }
  .avatar { width: 112px; height: 112px; }
  .profile-actions { grid-column: auto; }
  .profile-actions .btn { flex: none; }
}

.facts {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 0;
}
.fact dt { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; white-space: nowrap; }
.fact dd { margin: 0; font-weight: 650; font-size: 14px; line-height: 1.35; }
.fact dd .muted { font-weight: 500; }
.fact-rating { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fact-rating dd { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; justify-content: flex-end; }
.fact-photos { display: none; }
.age-sep { display: block; }

@media (min-width: 768px) {
  .facts { grid-template-columns: 1.6fr repeat(var(--nd, 4), minmax(0, 1fr)); gap: 12px; }
  .fact { padding: 14px 16px; }
  .fact dd { font-size: 15px; }
  .fact-photos { display: block; }
  .age-sep { display: inline; }
  .fact-rating { grid-column: auto; display: block; }
  .fact-rating dd { justify-content: flex-start; }
}

/* Star rating widget */
.stars { position: relative; display: inline-flex; line-height: 0; }
.stars-row { display: flex; }
.stars-row .icon { width: 24px; height: 24px; }
.stars-base { color: var(--star-empty); }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); transition: width 0.15s; }
.stars-hit { position: absolute; inset: 0; display: flex; }
.stars-hit button { flex: 1; height: 100%; border-radius: 4px; }
.stars.is-previewing .stars-fill { color: var(--accent); }
.rating-label { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.rating-label b { color: var(--text); font-size: 15px; }

/* ---------- Gallery toolbar ---------- */

.toolbar {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  margin: 0 -16px;
  padding-inline: 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
@media (min-width: 768px) { .toolbar { margin: 0 -28px; padding-inline: 28px; } }

.chips {
  display: flex; gap: 6px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  padding-right: 28px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px; font-weight: 600;
  white-space: nowrap; flex: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--surface-3); background: var(--surface-2); }
.chip span { color: var(--muted); font-weight: 500; font-size: 12px; }
.chip[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-pressed='true'] span { color: inherit; opacity: 0.65; }

.select { position: relative; flex: none; display: inline-flex; align-items: center; }
.select select {
  appearance: none; -webkit-appearance: none;
  height: 36px; padding: 0 32px 0 14px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: inherit;
  font: 600 14px var(--font);
  cursor: pointer;
}
.select .icon { position: absolute; right: 10px; width: 16px; height: 16px; pointer-events: none; color: var(--muted); }

/* ---------- Masonry gallery ---------- */

.masonry { display: flex; gap: var(--gap); align-items: flex-start; min-height: 60vh; }
/* Pre-rendered grid in the HTML (for search engines / before JS). JS swaps in the real masonry. */
.masonry.is-static { display: block; columns: 2; column-gap: var(--gap); }
.masonry.is-static .tile { margin-bottom: var(--gap); break-inside: avoid; }
.masonry.is-static .tile img { opacity: 1; }
.masonry.is-static .tile::before { display: none; }
@media (min-width: 560px) { .masonry.is-static { columns: 3; } }
@media (min-width: 900px) { .masonry.is-static { columns: 4; } }
@media (min-width: 1240px) { .masonry.is-static { columns: 5; } }
.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }

.tile {
  position: relative; display: block; overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  isolation: isolate;
}
.tile::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface-3) 70%, transparent) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: shimmer 1.4s infinite linear;
}
.tile.is-loaded::before { display: none; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease, transform 0.5s ease; }
.tile.is-loaded img { opacity: 1; }
.tile-meta {
  position: absolute; inset: auto 0 0 0;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 28px 10px 9px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  opacity: 0; transition: opacity 0.2s;
}
.tile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tile-meta .icon { width: 14px; height: 14px; }
.tile-liked {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(0, 0, 0, 0.45); color: #fff;
}
.tile-liked .icon { width: 15px; height: 15px; fill: var(--accent); stroke: var(--accent); }
.tile.is-liked .tile-liked { display: grid; }

@media (hover: hover) {
  .tile:hover img { transform: scale(1.035); }
  .tile:hover .tile-meta { opacity: 1; }
}

.gallery-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0 8px; }
.gallery-status { margin: 0; font-size: 13px; }
.sentinel { width: 100%; height: 1px; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- Sections ---------- */

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; font-weight: 750; }
.related { padding: 40px 0 8px; }

.hscroll {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: 42%;
  gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px;
  scroll-padding: 0 16px;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 600px) { .hscroll { grid-auto-columns: 26%; } }
@media (min-width: 900px) { .hscroll { grid-auto-columns: calc((100% - 5 * 12px) / 6); margin: 0; padding: 0 0 4px; } }

.celeb-card { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.celeb-img { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-bottom: 8px; }
.celeb-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform 0.5s ease; }
.celeb-grid .celeb-card { content-visibility: auto; contain-intrinsic-size: auto 280px; }
.credit { margin-top: 10px !important; font-size: 12.5px; }
.credit a { text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) { .celeb-card:hover .celeb-img img { transform: scale(1.04); } }
.celeb-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celeb-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.celeb-meta .icon { width: 13px; height: 13px; color: var(--star); }

.about { padding: 32px 0 0; max-width: 760px; color: var(--muted); font-size: 14px; }
.about h2 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.about p { margin: 0; }

/* ---------- Home ---------- */

.hero { padding: 48px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(34px, 7vw, 64px); font-weight: 800; letter-spacing: -0.04em; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: clamp(15px, 2vw, 18px); margin: 12px auto 0; max-width: 560px; }
.hero-search { max-width: 600px; margin: 28px auto 0; text-align: left; }
.hero-search .search input { height: 56px; font-size: 16px; padding-left: 50px; box-shadow: var(--shadow); background: var(--surface); border-color: var(--border); }
.hero-search .search > .icon { left: 18px; width: 20px; height: 20px; }
.hero-search .search kbd { right: 16px; }
.hero-popular { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin-top: 16px; font-size: 13px; color: var(--muted); align-items: center; }
.hero-popular a { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 500; }
.hero-popular a:hover { background: var(--surface-3); }
@media (min-width: 768px) { .hero { padding: 80px 0 48px; } }

.browse { padding-bottom: 24px; }
.browse .chips { margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.celeb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
@media (min-width: 768px) { .celeb-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 18px; } }

/* ---------- Category pages ---------- */

.page-head { padding: 16px 0 20px; }
.page-head h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; letter-spacing: -0.035em; }
.page-sub { margin: 6px 0 0; color: var(--muted); }
.browse-bar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 18px; }
.browse-bar .chips { flex: 1 1 260px; }
a.chip[aria-current='page'] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Info pages (about, legal, forms) ---------- */

.prose { max-width: 720px; padding: 8px 0 24px; font-size: 16px; line-height: 1.65; }
.prose h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; letter-spacing: -0.035em; margin: 12px 0 14px; }
.prose h2 { font-size: 20px; font-weight: 750; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose .lead { font-size: 18px; color: var(--muted); }
.small { font-size: 13px; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; font-size: 15px; }

.form { display: flex; flex-direction: column; gap: 18px; margin: 20px 0 28px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field > label:not(.dropzone), .field .label { font-weight: 600; font-size: 14px; padding: 0; }
.field input:not([type='checkbox']):not([type='file']), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: inherit;
  font: 16px/1.4 var(--font); /* 16px stops iOS zooming on focus */
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hint { font-size: 13px; color: var(--muted); }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 160px; padding: 24px; text-align: center;
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 28px; height: 28px; color: var(--accent); }
.dropzone-text { font-weight: 600; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.previews img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 8px; }

.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chips label { position: relative; }
.check-chips input { position: absolute; opacity: 0; inset: 0; }
.check-chips span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.check-chips input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.check-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-actions .btn { height: 46px; padding: 0 24px; font-size: 15px; }
.form-status { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { margin-top: 56px; border-top: 1px solid var(--border); padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.footer-tagline { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 22px 32px; }
@media (min-width: 440px) and (max-width: 679px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-col:first-child { grid-row: span 2; } }
.footer-col-title { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover, .footer-links a[aria-current='page'] { color: var(--text); }
.footer-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.footer-note a { text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 680px) {
  .footer-inner { grid-template-columns: 1.3fr 2.2fr; gap: 32px 48px; align-items: start; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-note { grid-column: 1 / -1; }
}

/* ---------- Lightbox ---------- */

html.lb-lock, html.lb-lock body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: auto 1fr auto;
  background: #060608;
  color: #fff;
  animation: lb-in 0.18s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } }

.lb-top, .lb-bottom { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.lb-top { padding-top: calc(10px + env(safe-area-inset-top)); }
.lb-counter { font-size: 14px; font-weight: 600; opacity: 0.8; padding-left: 6px; font-variant-numeric: tabular-nums; }
.lb-actions { margin-left: auto; display: flex; gap: 4px; }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.lb-like { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; transition: background 0.15s; }
.lb-like:hover { background: rgba(255, 255, 255, 0.16); }
.lb-like[aria-pressed='true'] { background: var(--accent); }
.lb-like[aria-pressed='true'] .icon { fill: currentColor; }
.lb-like.pop .icon { animation: pop 0.35s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }

.lb-stage { position: relative; margin: 0; min-height: 0; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; }
.lb-stage.is-zoomed { cursor: grab; }
.lb-stage.is-zoomed:active { cursor: grabbing; }
.lb-zoom .lb-zoom-out, .lb-zoom[aria-pressed='true'] .lb-zoom-in { display: none; }
.lb-zoom[aria-pressed='true'] .lb-zoom-out { display: block; }
.lb-stage.is-zoomed .lb-nav { opacity: 0.35; }
.lb-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
  transition: opacity 0.2s;
}
.lb-img.is-swiping { transition: none; }
.lb-img.is-settling { transition: transform 0.2s ease, opacity 0.2s; }
.lb-spinner {
  position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px;
  border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.8s linear infinite; opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.lb-stage.is-loading .lb-spinner { opacity: 1; transition-delay: 0.3s; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: #fff;
  transition: background 0.15s;
}
.lb-nav:hover { background: rgba(255, 255, 255, 0.18); }
.lb-nav .icon { width: 24px; height: 24px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-bottom { justify-content: space-between; flex-wrap: wrap; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.lb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-tags button { height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 600; }
.lb-tags button:hover { background: rgba(255, 255, 255, 0.2); }
.lb-info { font-size: 13px; opacity: 0.6; }
.lb-hint { font-size: 12px; opacity: 0.45; }

@media (min-width: 768px) {
  .lb-img { inset: 0 84px; width: calc(100% - 168px); }
  .lb-top, .lb-bottom { padding-inline: 20px; }
}
@media (max-width: 767px) {
  .lb-nav, .lb-hint { display: none; }
}

/* ---------- Toast & to-top ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 200;
  transform: translate(-50%, 16px);
  background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.to-top {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* =========================================================
   Affiliate offer units (native gallery tile, lightbox CTA, sticky bar)
   ========================================================= */
.offer-label {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); color: #fff; backdrop-filter: blur(2px);
}
/* Native-looking gallery tile that links out to the affiliate. */
.offer-tile {
  display: flex; text-decoration: none; color: #fff;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-hover) 55%, #c81d49 100%);
}
.offer-tile::before { display: none; }
.offer-tile .offer-body {
  position: relative; z-index: 1; margin-top: auto;
  display: flex; flex-direction: column; gap: 7px;
  padding: 14px 13px; width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.28));
}
.offer-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; opacity: 0.92; }
.offer-text { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.offer-cta {
  display: inline-flex; align-items: center; gap: 3px; align-self: flex-start;
  margin-top: 2px; padding: 7px 12px; border-radius: 999px;
  background: #fff; color: var(--accent); font-size: 12.5px; font-weight: 700;
}
.offer-cta .icon { width: 14px; height: 14px; }
@media (hover: hover) { .offer-tile:hover .offer-cta { background: rgba(255, 255, 255, 0.9); } }

/* Lightbox CTA — a slim bar on its own row below the tags/info line. */
.lb-offer-wrap { order: 1; flex-basis: 100%; display: flex; justify-content: center; margin-top: 4px; }
.lb-offer {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 14px; border-radius: 12px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 600; line-height: 1.3;
}
.lb-offer .offer-label { position: static; flex: none; background: rgba(255, 255, 255, 0.22); }
.lb-offer-text {
  flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lb-offer-cta { flex: none; font-weight: 800; white-space: nowrap; }
.lb-offer .icon { flex: none; width: 16px; height: 16px; }
@media (hover: hover) { .lb-offer:hover { background: var(--accent-hover); } }
/* Desktop: size the bar to its content (one line) instead of a fixed narrow block. */
@media (min-width: 600px) {
  .lb-offer { width: auto; max-width: min(92vw, 860px); padding: 9px 18px; }
  .lb-offer-text { flex: 0 1 auto; display: block; overflow: visible; }
}
@media (max-width: 560px) {
  .lb-offer { gap: 8px; padding: 9px 12px; font-size: 12.5px; }
  .lb-offer-cta { display: none; } /* the whole bar is the tap target; arrow signals the action */
}

/* "Creators like her" card in the Similar-celebrities rail. */
.offer-card { text-decoration: none; color: inherit; }
.offer-card-img {
  position: relative; display: grid; place-items: center; padding: 14px; text-align: center;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-hover) 55%, #c81d49 100%);
}
.offer-card-hook { color: #fff; font-size: 14px; font-weight: 700; line-height: 1.25; }
.offer-card .celeb-name { color: var(--text); }
.offer-card-cta { color: var(--accent) !important; font-weight: 700; }
.offer-card-cta .icon { width: 13px; height: 13px; color: var(--accent); }
@media (hover: hover) { .offer-card:hover .offer-card-img { filter: brightness(1.05); } }

/* Sitewide dismissible sticky bar. */
.aff-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(17, 17, 20, 0.1);
  transform: translateY(110%); transition: transform 0.28s ease;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.aff-sticky.is-in { transform: none; }
.aff-sticky-in {
  display: flex; align-items: center; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
}
.aff-sticky .offer-label { position: static; background: var(--accent-soft); color: var(--accent); }
.aff-sticky-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text); }
.aff-sticky-cta { flex: none; white-space: nowrap; }
.aff-sticky-x {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface-2); color: var(--muted);
}
.aff-sticky-x .icon { width: 16px; height: 16px; }
@media (max-width: 560px) {
  .aff-sticky-in { gap: 9px; padding: 9px 12px; }
  .aff-sticky-text { font-size: 12.5px; }
  .aff-sticky .offer-label { display: none; }
}

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