/* ============================================================
   GramSetu Village Market — design system v3
   Fresh palette: emerald teal + marigold + cream, playful motion,
   mobile-first. All prior class names preserved so PHP templates
   keep working; new utility hooks added (.hero-shell, .marquee,
   .divider, .btn-shine, .badge-pop) for the refreshed homepage.
   ============================================================ */

:root {
  /* palette — fresh market */
  --cream-50:  #FBF8F1;
  --cream-100: #F4EFE1;
  --cream-200: #E8DFC7;
  --ink-900:  #0F172A;
  --ink-700:  #334155;
  --ink-500:  #64748B;
  --ink-300:  #CBD5E1;

  --teal-500: #0F766E;   /* primary emerald teal */
  --teal-600: #115E59;
  --teal-100: #CCFBF1;

  --marigold-500: #F59E0B;
  --marigold-600: #D97706;
  --marigold-100: #FEF3C7;

  --coral-500: #F43F5E;
  --coral-100: #FFE4E6;

  --sky-400: #38BDF8;
  --sky-100: #E0F2FE;

  --forest-500: #16A34A;
  --forest-100: #DCFCE7;

  --red-500:  #DC2626;
  --red-100:  #FEE2E2;

  /* semantic */
  --bg:            var(--cream-50);
  --surface:       #ffffff;
  --surface-2:     var(--cream-100);
  --border:        rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text:          var(--ink-900);
  --text-muted:    var(--ink-500);
  --primary:       var(--teal-500);
  --primary-hover: var(--teal-600);
  --primary-soft:  var(--teal-100);
  --accent:        var(--marigold-500);
  --accent-soft:   var(--marigold-100);

  /* radii, shadows, motion */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.05);
  --shadow-md: 0 4px 10px rgba(15,23,42,.06), 0 12px 28px -10px rgba(15,23,42,.14);
  --shadow-lg: 0 18px 45px -18px rgba(15,23,42,.28), 0 6px 14px rgba(15,23,42,.06);
  --shadow-glow: 0 12px 32px -12px rgba(15, 118, 110, .55);
  --shadow-focus: 0 0 0 3px rgba(15, 118, 110, .28);
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --dur: 200ms;

  /* fluid type */
  --fs-xs:  clamp(0.78rem, 0.75rem + 0.15vw, 0.85rem);
  --fs-sm:  clamp(0.88rem, 0.85rem + 0.2vw, 0.95rem);
  --fs-md:  clamp(1rem, 0.95rem + 0.25vw, 1.06rem);
  --fs-lg:  clamp(1.15rem, 1.05rem + 0.6vw, 1.35rem);
  --fs-xl:  clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --fs-2xl: clamp(2.1rem, 1.5rem + 3vw, 3.3rem);

  --wrap: 1120px;
  --gutter: clamp(1rem, 2vw, 1.5rem);
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 110% -10%, var(--marigold-100) 0%, transparent 55%),
    radial-gradient(900px 460px at -10% 0%, var(--teal-100) 0%, transparent 60%),
    radial-gradient(700px 400px at 50% 120%, var(--coral-100) 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------- typography ------- */
h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 0 0 .55em;
  line-height: 1.12;
}
h1 { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 1em; }
a  { color: var(--primary); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--primary-hover); }
small, .hint { font-size: var(--fs-xs); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

.gradient-text {
  background: linear-gradient(100deg, var(--teal-600) 10%, var(--marigold-500) 55%, var(--coral-500) 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* section divider (decorative) */
.divider {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin: 2.2rem 0 1rem; color: var(--text-muted);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.divider-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ------- layout wrap ------- */
.page-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.25rem) var(--gutter) 5rem;
  min-height: 60vh;
  animation: page-in .4s var(--ease) both;
}
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------- header ------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 40;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  background: color-mix(in oklab, var(--surface) 94%, transparent);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 1rem;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800; font-size: 1.3rem;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: .55rem;
}
.brand::before {
  content: ""; width: 22px; height: 22px; border-radius: 8px;
  background:
    conic-gradient(from 180deg at 50% 50%, var(--teal-500), var(--marigold-500), var(--coral-500), var(--teal-500));
  box-shadow: 0 3px 10px -2px rgba(15,118,110,.5);
  animation: brand-spin 12s linear infinite;
}
@keyframes brand-spin { to { transform: rotate(360deg); } }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.main-nav a {
  position: relative;
  color: var(--ink-700);
  padding: .55rem .85rem;
  border-radius: var(--r-md);
  font-weight: 500; font-size: var(--fs-sm);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.main-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 6px; height: 2px;
  background: var(--primary); border-radius: 2px;
  transform: scaleX(0); transform-origin: right; transition: transform 260ms var(--ease);
}
.main-nav a:not(.nav-cta):hover { color: var(--ink-900); }
.main-nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.main-nav .nav-cta {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: #fff; padding: .6rem 1.15rem;
  margin-left: .5rem;
  box-shadow: var(--shadow-glow);
}
.main-nav .nav-cta:hover { transform: translateY(-1px); color: #fff; }
.main-nav .nav-logout { color: var(--red-500); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink-700); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), top var(--dur) var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    padding: .5rem var(--gutter) 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: .95rem 1rem; border-radius: var(--r-md); }
  .main-nav a:not(.nav-cta)::after { display: none; }
  .main-nav .nav-cta { margin: .5rem 0 0; text-align: center; }
}

/* ------- emergency FAB ------- */
.emergency-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  background: var(--red-500); color: #fff;
  padding: .85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700; font-size: var(--fs-sm);
  box-shadow: 0 10px 30px -8px rgba(220,38,38,.55), 0 2px 6px rgba(0,0,0,.15);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.emergency-fab::before { content: "🆘 "; }
.emergency-fab::after {
  content: ""; position: absolute; inset: -6px; border-radius: 999px;
  border: 2px solid rgba(220,38,38,.35); animation: pulse-ring 2s var(--ease) infinite;
}
.emergency-fab:hover { color: #fff; transform: translateY(-3px) scale(1.03); }
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ------- flash / toast ------- */
.flash {
  position: fixed; top: calc(var(--header-h) + 10px); left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(560px, 92vw);
  padding: .85rem 2.4rem .85rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  display: flex; align-items: center; gap: .6rem;
  animation: flash-in .35s var(--ease) both;
}
.flash-success { border-left: 4px solid var(--forest-500); }
.flash-error   { border-left: 4px solid var(--red-500); }
.flash-info    { border-left: 4px solid var(--primary); }
.flash-close {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; font-size: 1.4rem; line-height: 1;
  color: var(--text-muted); cursor: pointer; padding: .25rem .55rem;
  border-radius: var(--r-sm);
}
.flash-close:hover { background: var(--surface-2); color: var(--ink-900); }
.flash-hide { animation: flash-out .3s var(--ease) forwards; }
@keyframes flash-in  { from { opacity: 0; transform: translate(-50%, -10px);} to { opacity: 1; transform: translate(-50%, 0);} }
@keyframes flash-out { to   { opacity: 0; transform: translate(-50%, -10px);} }

/* ============================================================
   HERO shell (wraps the first content block on the homepage)
   ============================================================ */
.hero-shell {
  position: relative;
  margin: .5rem 0 1.5rem;
  padding: clamp(1.8rem, 4vw, 3.4rem) clamp(1.4rem, 3.5vw, 2.6rem);
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, color-mix(in oklab, var(--teal-100) 55%, #fff) 55%, color-mix(in oklab, var(--marigold-100) 70%, #fff) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.hero-shell::before,
.hero-shell::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1; filter: blur(2px);
  animation: float 9s ease-in-out infinite;
}
.hero-shell::before {
  width: 260px; height: 260px; right: -60px; top: -80px;
  background: radial-gradient(closest-side, var(--marigold-500), transparent 70%);
  opacity: .35;
}
.hero-shell::after {
  width: 220px; height: 220px; left: -60px; bottom: -80px;
  background: radial-gradient(closest-side, var(--teal-500), transparent 70%);
  opacity: .3; animation-delay: -4.5s;
}
.hero-shell .hero-blob {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  width: 120px; height: 120px; right: 22%; top: 12%;
  background: radial-gradient(closest-side, var(--coral-500), transparent 70%);
  opacity: .25; animation: float 11s ease-in-out infinite -2s;
}
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-14px) translateX(6px); }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--surface); border: 1px solid var(--border);
  padding: .35rem .75rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-700);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--forest-500);
  box-shadow: 0 0 0 4px var(--forest-100);
  animation: heartbeat 1.6s var(--ease) infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}
.hero-shell h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 1.4rem + 3.4vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: .55em;
}
.hero-shell p { max-width: 58ch; font-size: var(--fs-lg); color: var(--ink-700); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ------- content section blocks ------- */
.section-block { margin-top: 1.75rem; }
.section-block.type-notice,
.section-block.type-highlight {
  padding: 1.15rem 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}
.section-block.type-highlight {
  background: linear-gradient(135deg, color-mix(in oklab, var(--teal-100) 55%, #fff), #fff);
  border-left-color: var(--primary);
}

/* ------- search ------- */
.search-bar {
  display: flex; gap: .5rem; margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .4rem .4rem .4rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); transform: translateY(-1px); }
.search-bar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; padding: .6rem 0; color: var(--text);
}
.search-bar input::placeholder { color: var(--ink-300); }
.search-bar button { border-radius: 999px; padding: .6rem 1.3rem; flex: 0 0 auto; }
.search-bar select {
  width: auto; flex: 0 0 auto;
  border: 0; border-left: 1px solid var(--border); border-radius: 0;
  background: transparent; font: inherit; color: var(--text);
  padding: .6rem .6rem .6rem .8rem;
}
@media (max-width: 480px) {
  .search-bar { flex-wrap: wrap; border-radius: var(--r-lg); padding: .5rem; }
  .search-bar input { flex: 1 1 100%; padding: .5rem .3rem; min-width: 0; }
  .search-bar select { flex: 1 1 auto; border-left: 0; border-top: 1px solid var(--border); padding: .5rem .3rem; }
  .search-bar button { flex: 0 0 auto; }
}

/* ------- chips ------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: .5rem 0 .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  background: var(--surface);
  color: var(--ink-700);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600;
  transition: transform var(--dur) var(--ease-bounce), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.chip.is-active, .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ------- marquee (category ticker) ------- */
.marquee {
  position: relative;
  overflow: hidden;
  margin: 1rem 0 .5rem;
  padding: .35rem 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface), color-mix(in oklab, var(--teal-100) 50%, var(--surface)), var(--surface));
  border: 1px solid var(--border);
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.marquee::after  { right: 0; background: linear-gradient(-90deg, var(--surface), transparent); }
.marquee-track {
  display: inline-flex; gap: 2.2rem; padding: .35rem 1rem;
  white-space: nowrap; animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { color: var(--ink-700); font-weight: 600; font-size: var(--fs-sm); }
.marquee-item .emoji { margin-right: .35rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ------- how it works ------- */
.how-it-works {
  margin: 2rem 0;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--r-xl);
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--teal-100) 70%, #fff) 0%, var(--surface) 60%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.how-it-works h2 { text-align: center; margin-bottom: 1.4rem; }
.step-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  counter-reset: step;
}
@media (max-width: 640px) {
  .step-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .step-tile { padding: 1.5rem .5rem .8rem; }
  .step-tile::before { width: 24px; height: 24px; font-size: .78rem; top: -12px; }
  .step-emoji { font-size: 1.5rem; margin: 0 0 .2rem; }
  .step-title { font-size: var(--fs-xs); margin-bottom: .15rem; }
  .step-desc { display: none; }
}
@media (max-width: 380px) {
  .step-tile { padding: 1.4rem .3rem .6rem; }
}
.step-tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.1rem 1.2rem;
  text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.step-tile::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--marigold-500));
  color: #fff; font-weight: 800; font-size: .9rem;
  display: grid; place-items: center;
  box-shadow: 0 6px 14px -4px rgba(15,118,110,.5);
}
.step-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-soft); }
.step-emoji { font-size: 2.2rem; display: block; margin: .3rem 0 .35rem; transition: transform 400ms var(--ease-bounce); }
.step-tile:hover .step-emoji { transform: scale(1.15) rotate(-5deg); }
.step-title { font-weight: 700; margin-bottom: .3rem; color: var(--ink-900); }
.step-desc  { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }

/* ------- section head ------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin: 1.75rem 0 .75rem;
}
.section-head h2 { margin: 0; }
.section-head .see-all {
  font-size: var(--fs-sm); font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: .25rem;
}
.section-head .see-all::after {
  content: "→"; transition: transform var(--dur) var(--ease);
}
.section-head .see-all:hover::after { transform: translateX(4px); }

/* ------- product cards ------- */
.card-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
/* Homepage preview grid - denser than the full products page, mobile-first */
.card-grid-compact { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.card-grid-compact .card-body { padding: .55rem .6rem .7rem; }
.card-grid-compact .card-title { font-size: var(--fs-sm); margin: .1rem 0 .2rem; }
.card-grid-compact .card-meta { font-size: .7rem; }
.card-grid-compact .price-tag { font-size: .78rem; padding: .15rem .5rem; }
@media (min-width: 460px) {
  .card-grid-compact { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .card-grid-compact { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .card-grid-compact .card-body { padding: .9rem 1rem 1.05rem; }
  .card-grid-compact .card-title { font-size: inherit; }
  .card-grid-compact .card-meta { font-size: var(--fs-xs); }
  .card-grid-compact .price-tag { font-size: var(--fs-sm); padding: .22rem .65rem; }
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
  position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, transparent 40%, var(--primary-soft) 70%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); color: inherit; }
.card:hover::before { opacity: 1; }
.card:active { transform: translateY(-2px); }
.card-img {
  display: block; width: 100%;
  aspect-ratio: 4/3; object-fit: cover;
  background: var(--surface-2);
  transition: transform 500ms var(--ease);
}
.card:hover .card-img { transform: scale(1.06); }
.card-body { padding: .9rem 1rem 1.05rem; }
.card-title { font-weight: 700; color: var(--ink-900); margin: .15rem 0 .3rem; line-height: 1.3; }
.card-meta  { font-size: var(--fs-xs); color: var(--text-muted); }
.card-rating {
  margin-top: .4rem;
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--marigold-600);
  background: var(--marigold-100);
  padding: .15rem .55rem; border-radius: 999px; font-weight: 700;
}
.price-tag {
  display: inline-block;
  font-weight: 800;
  color: var(--primary-hover);
  background: var(--primary-soft);
  padding: .22rem .65rem;
  border-radius: 999px;
  font-size: var(--fs-sm);
}
.card[data-sold-out] { opacity: .78; }
.card[data-sold-out]::after {
  content: "Sold out";
  position: absolute; top: .65rem; left: .65rem;
  background: rgba(15,23,42,.86); color: #fff;
  font-size: var(--fs-xs); font-weight: 700;
  padding: .22rem .6rem; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ------- buttons ------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .78rem 1.3rem;
  font: inherit; font-weight: 700;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-decoration: none; line-height: 1.2;
  min-height: 46px;
  position: relative; overflow: hidden;
  isolation: isolate;
}
.btn:focus-visible { outline: 0; box-shadow: var(--shadow-focus); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: .55rem .95rem; min-height: 38px; font-size: var(--fs-sm); }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: #fff; box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 16px 40px -14px rgba(15,118,110,.7); }
/* shine sweep on primary buttons */
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.45) 45%, transparent 65%);
  transform: translateX(-120%); transition: transform 700ms var(--ease);
  z-index: -1;
}
.btn-primary:hover::before { transform: translateX(120%); }

.btn-accent {
  background: linear-gradient(135deg, var(--marigold-500), var(--marigold-600));
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(245,158,11,.55);
}
.btn-accent:hover { transform: translateY(-2px); color: #fff; }

.btn-outline {
  background: var(--surface); color: var(--ink-900);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary-hover); }

.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger { background: var(--red-500); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-success { background: var(--forest-500); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }

.link-btn {
  background: transparent; border: 0;
  color: var(--primary); font-weight: 600; padding: .5rem 0;
  cursor: pointer; font-size: var(--fs-sm);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--primary-hover); }

/* ------- UPI payment card ------- */
.upi-pay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
  margin: 1rem 0;
  position: relative; overflow: hidden;
}
.upi-pay-card::before {
  content: ""; position: absolute; top: -50%; right: -20%;
  width: 60%; height: 200%; opacity: .07;
  background: radial-gradient(closest-side, var(--forest-500), transparent);
  pointer-events: none;
}
.upi-pay-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.upi-pay-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--forest-500), #4ade80);
  color: #fff; font-weight: 800; font-size: 1.3rem;
  box-shadow: 0 6px 14px -4px rgba(22,163,74,.55);
}
.upi-pay-title { font-weight: 700; color: var(--ink-900); }
.upi-pay-sub   { font-size: var(--fs-sm); color: var(--text-muted); }
.upi-primary-row .btn-primary { flex: 1; min-width: 140px; }
.upi-hint { margin-top: .5rem; }
.upi-details { margin-top: .8rem; border-top: 1px dashed var(--border); padding-top: .55rem; }
.upi-details summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--ink-700); }
.upi-details summary::-webkit-details-marker { display: none; }
.upi-details summary::after { content: " ▾"; color: var(--text-muted); font-size: .8rem; }
.upi-details[open] summary::after { content: " ▴"; }
.upi-qr { margin: .6rem auto 0; display: block; border-radius: var(--r-md); border: 1px solid var(--border); background: #fff; padding: 8px; }

.app-btn-row { display: grid; gap: .55rem; margin-top: .6rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .app-btn-row { grid-template-columns: 1fr; } }
.app-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--ink-900); font-weight: 600; font-size: var(--fs-sm);
  transition: transform var(--dur) var(--ease-bounce), background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.app-btn:hover { transform: translateY(-2px); background: var(--surface-2); color: var(--ink-900); border-color: var(--primary-soft); box-shadow: var(--shadow-sm); }
.app-btn-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #4285f4; color: #fff; font-weight: 800; font-size: .9rem;
}
.app-icon-purple { background: #5f259f; }
.app-icon-orange { background: #ee7d31; }

/* ------- empty state ------- */
.empty-state {
  text-align: center; padding: 2.8rem 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--text-muted);
}
.empty-state h3 { color: var(--ink-900); margin-bottom: .3em; }
.empty-state p { margin: 0 0 1em; }

/* ------- auth / form cards ------- */
.auth-card {
  max-width: 460px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.8rem clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg);
  animation: page-in .4s var(--ease) both;
}
.auth-card h1 { text-align: center; }

/* ------- forms ------- */
label { display: block; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-700); margin: .9rem 0 .4rem; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=url], input[type=search], input[type=date],
select, textarea {
  width: 100%; box-sizing: border-box;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: .75rem .95rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
textarea { min-height: 118px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: var(--shadow-focus); }
input:invalid:not(:placeholder-shown) { border-color: var(--red-500); }
.char-count { font-size: var(--fs-xs); color: var(--text-muted); float: right; margin-top: -.25rem; }

/* ------- footer ------- */
.site-footer {
  margin-top: 4rem;
  padding: 3rem var(--gutter) 2.4rem;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(15,118,110,.4), transparent 65%),
    radial-gradient(500px 260px at 85% 100%, rgba(245,158,11,.28), transparent 65%),
    var(--ink-900);
  color: color-mix(in oklab, #fff 80%, transparent);
  position: relative;
}
.footer-inner { max-width: var(--wrap); margin: 0 auto; text-align: center; }
.footer-brand { font-family: "Fraunces", serif; font-weight: 800; font-size: 1.4rem; color: #fff; margin: 0 0 .3rem; }
.footer-tagline { color: color-mix(in oklab, #fff 65%, transparent); margin: 0 0 1.2rem; font-size: var(--fs-sm); }
.footer-links { display: inline-flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: color-mix(in oklab, #fff 80%, transparent); font-size: var(--fs-sm); transition: color var(--dur) var(--ease); }
.footer-links a:hover { color: var(--marigold-500); }

/* ------- misc used across pages ------- */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
th { background: var(--surface-2); font-weight: 700; color: var(--ink-700); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: color-mix(in oklab, var(--teal-100) 30%, transparent); }

hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; }

details[open] > summary { margin-bottom: .5rem; }

/* generic tiles used on admin/seller pages */
.tier-card, .stat-card, .data-row, .section-block {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tier-card:hover, .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Badge */
.badge {
  display: inline-block; padding: .2rem .55rem;
  font-size: var(--fs-xs); font-weight: 700;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-700);
}
.badge-green { background: var(--forest-100); color: #166534; }
.badge-amber { background: var(--marigold-100); color: #92400E; }
.badge-gray  { background: var(--surface-2); color: var(--ink-700); }
.badge-pop { animation: pop-in .35s var(--ease-bounce) both; }
@keyframes pop-in { from { transform: scale(.6); opacity: 0;} to { transform: scale(1); opacity: 1; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 550ms var(--ease), transform 550ms var(--ease); }
.reveal.revealed { opacity: 1; transform: none; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------- product detail gallery ------- */
.product-gallery { margin: 0 0 1.25rem; }
.pg-hero {
  width: 100%;
  aspect-ratio: 4/3;
  max-height: min(60vh, 520px);
  background: var(--surface-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
}
.pg-hero img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 400ms var(--ease), opacity 200ms var(--ease);
}
.pg-hero img.is-swapping { opacity: 0; }
.pg-thumbs {
  display: flex; gap: .55rem; margin-top: .65rem;
  overflow-x: auto; padding-bottom: .25rem;
  scrollbar-width: thin;
}
.pg-thumb {
  flex: 0 0 auto; width: 72px; height: 72px;
  padding: 0; border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: var(--surface-2);
  overflow: hidden; cursor: pointer;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumb:hover { transform: translateY(-2px); }
.pg-thumb.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
@media (min-width: 720px) {
  .pg-hero { max-height: 480px; }
}

/* ============================================================
   Gap-fill pass — components the templates reference that had
   no rules yet (form groups, data rows, tier/stat cards, switches,
   filters, file drop, star input, contact buttons). Uses the same
   tokens as the rest of the file.
   ============================================================ */

/* form layout */
.form-group { margin-bottom: 1.1rem; }
.checkbox-row { display: flex; align-items: center; gap: .55rem; margin: .6rem 0; }
.checkbox-row input[type=checkbox] { width: 1.1em; height: 1.1em; accent-color: var(--primary); }
.checkbox-row label { margin: 0; font-weight: 500; }

/* toggle switch (Settings page) */
.switch-row { display: flex; align-items: center; gap: .7rem; margin: .9rem 0 .3rem; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; background: var(--ink-300); border-radius: 999px; transition: background var(--dur) var(--ease); }
.switch-track::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease);
}
.switch input:checked ~ .switch-track { background: var(--primary); }
.switch input:checked ~ .switch-track::before { transform: translateX(18px); }
.switch input:focus-visible ~ .switch-track { box-shadow: var(--shadow-focus); }

/* data rows — admin list items (sellers, products, places, ratings…) */
.data-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: .9rem 1rem; margin-bottom: .65rem; box-shadow: var(--shadow-sm);
}
.data-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.data-row-sub { font-size: var(--fs-sm); color: var(--text-muted); }
.data-row-actions { display: flex; flex-wrap: wrap; gap: .4rem; flex: 0 0 auto; }
@media (max-width: 560px) {
  .data-row { flex-direction: column; align-items: stretch; }
  .data-row-actions { justify-content: flex-start; }
}

/* subscription tier cards (seller dashboard, admin seller detail) */
.tier-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1rem 0; }
.tier-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.2rem; box-shadow: var(--shadow-sm); text-align: center;
}
.tier-card.tier-claimed { border-color: var(--marigold-500); box-shadow: 0 0 0 3px var(--marigold-100); }
.tier-name { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: var(--fs-lg); color: var(--ink-900); }
.tier-range { color: var(--text-muted); font-size: var(--fs-sm); margin: .2rem 0 .6rem; }
.tier-price { font-weight: 800; font-size: var(--fs-xl); color: var(--primary-hover); margin-bottom: .8rem; }
.tier-price span { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }

/* dashboard stat cards */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 1.2rem 0; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.2rem 1rem; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-card .num { font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: var(--fs-2xl); color: var(--primary-hover); line-height: 1.1; }
.stat-card .label { font-size: var(--fs-sm); color: var(--text-muted); margin-top: .3rem; }

/* admin search/filter rows */
.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: .3rem 0 1rem; }
.filter-row select { width: auto; min-width: 160px; flex: 1 1 160px; }

/* file upload + image previews */
.file-drop { border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); padding: 1rem; text-align: center; background: var(--surface-2); }
.file-drop input[type=file] { width: 100%; }
.preview-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.preview-row img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--border); display: block; }

/* star rating input (product page) + read-only star display */
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; font-size: 1.9rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { display: inline-block; margin: 0; cursor: pointer; color: var(--ink-300); transition: color var(--dur) var(--ease); }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--marigold-500); }
.stars-display { color: var(--marigold-500); letter-spacing: 1px; }

/* misc small components */
.location-line { display: flex; align-items: center; gap: .3rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0; }
.badge-red { background: var(--red-100); color: #991B1B; }

/* call / whatsapp / gold CTA buttons */
.btn-call { background: var(--sky-400); color: #fff; }
.btn-call:hover { background: #0ea5e9; color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1DA851; color: #fff; }
.btn-gold {
  background: linear-gradient(135deg, var(--marigold-500), var(--marigold-600));
  color: #fff; box-shadow: 0 12px 30px -10px rgba(217,119,6,.55);
}
.btn-gold:hover { transform: translateY(-2px); color: #fff; }

/* ============================================================
   Second pass — notification bar, featured badge, support section
   ============================================================ */

/* featured badge on product cards (#6) */
.card { position: relative; }
.card-featured-badge {
  position: absolute; top: .65rem; right: .65rem; z-index: 1;
  background: linear-gradient(135deg, var(--marigold-500), var(--marigold-600));
  color: #fff; font-size: var(--fs-xs); font-weight: 700;
  padding: .22rem .6rem; border-radius: 999px;
  box-shadow: 0 4px 10px -2px rgba(217,119,6,.5);
}

/* admin-configurable notification bar (#8) */
.notice-bar {
  background: linear-gradient(135deg, var(--marigold-100), var(--teal-100));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: .7rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  animation: page-in .4s var(--ease) both;
}
.notice-bar-inner { display: flex; align-items: center; gap: .6rem; }
.notice-bar-icon { font-size: 1.1rem; flex: 0 0 auto; }
.notice-bar-text { flex: 1 1 auto; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-900); }
.notice-bar-link { color: var(--primary-hover); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; margin-left: .3rem; white-space: nowrap; }
.notice-bar-close {
  flex: 0 0 auto; background: transparent; border: 0;
  font-size: 1.3rem; line-height: 1; color: var(--text-muted);
  cursor: pointer; padding: .2rem .5rem; border-radius: var(--r-sm);
}
.notice-bar-close:hover { background: rgba(15,23,42,.06); color: var(--ink-900); }
.notice-bar.is-dismissed { display: none; }

/* homepage "help us grow" section (#5) */
.support-section { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 1.4rem 1.25rem; }
.support-tip-jar { max-width: 420px; margin: 0 auto; text-align: left; }

/* ============================================================
   Third pass — in-app messaging (replaces public phone exposure)
   ============================================================ */

.back-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
  margin-bottom: .8rem;
}
.back-link:hover { color: var(--primary); }

.message-thread-page { max-width: 560px; margin: 0 auto; }

.phone-reveal-card {
  background: var(--teal-100); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: .8rem 1rem; margin-top: .9rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-900);
}

.message-list {
  display: flex; flex-direction: column; gap: .6rem;
  max-height: 55vh; overflow-y: auto; padding: .4rem .2rem;
}
.message-bubble {
  max-width: 80%; padding: .6rem .85rem; border-radius: var(--r-lg);
  font-size: var(--fs-sm); line-height: 1.4;
}
.message-bubble.from-buyer {
  align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border);
  border-bottom-left-radius: .3rem;
}
.message-bubble.from-seller {
  align-self: flex-end; background: var(--primary); color: #fff;
  border-bottom-right-radius: .3rem;
}
.message-bubble .message-text { white-space: pre-wrap; word-break: break-word; }
.message-bubble .message-time {
  font-size: .68rem; opacity: .7; margin-top: .25rem; text-align: right;
}

.message-form {
  display: flex; gap: .5rem; align-items: flex-end;
  margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border);
}
.message-form textarea {
  flex: 1 1 auto; min-height: 2.6rem; max-height: 8rem; resize: vertical;
}
.message-form button { flex: 0 0 auto; }

/* ============================================================
   Fourth pass — per-product message indicator (red dot for unread)
   ============================================================ */
.msg-indicator { position: relative; }
.msg-dot {
  position: absolute; top: -4px; right: -4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-500); border: 2px solid var(--surface);
}

.needs-attention { position: relative; }

/* ============================================================
   Fifth pass — Explore Kelve expansion (fish market, eat, events,
   meet the villagers, hidden gems, community, travel, beach status)
   ============================================================ */

/* Explore hub tiles - reuses .card for hover/reveal, adds an icon */
.explore-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.explore-tile-icon { font-size: 2.4rem; display: block; margin-bottom: .3rem; }
.explore-tile .card-body { padding-top: 1.4rem; padding-bottom: 1.4rem; }

/* Meet the Villagers - round portrait photo instead of the 4:3 card image */
.villager-photo {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; margin: .2rem auto .6rem;
  border: 3px solid var(--surface); box-shadow: var(--shadow-md);
  display: block;
}
.villager-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; background: var(--surface-2); color: var(--ink-300);
}
.villager-card .card-title { margin-top: .2rem; }

.back-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: var(--fs-sm); color: var(--ink-500); text-decoration: none;
  margin-bottom: .9rem;
}
.back-link:hover { color: var(--primary); }

/* Settings page: each grouped section (id="sec-*") gets a visible card
   boundary, since bare .section-block is spacing-only and this page has
   too many distinct topics to tell apart without one. Scoped to the id
   prefix so it doesn't change .section-block's look anywhere else. */
.section-block[id^="sec-"] {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 1.25rem 1.4rem;
}
.section-block[id^="sec-"] h2 { margin-top: 0; }