/* ================================================================
   Pet Memorial Garden — Main Stylesheet
   ================================================================ */

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  --bg-primary:       #fdfcf8;
  --bg-secondary:     #f4efe5;
  --bg-card:          #ffffff;
  --bg-card-hover:    #faf8f3;
  --border:           #e4ddd0;
  --border-light:     #cfc8ba;

  --gold:             #8a5c1a;
  --gold-light:       #a87228;
  --gold-dark:        #6a4210;
  --gold-muted:       rgba(138,92,26,0.08);
  --gold-glow:        0 0 20px rgba(138,92,26,0.12);

  --text:             #1e1a16;
  --text-secondary:   #4a4438;
  --text-muted:       #88806e;

  --success:          #286e3a;
  --danger:           #aa2e2e;
  --warning:          #a85c18;

  --font-heading:     'Playfair Display', Georgia, serif;
  --font-body:        'Inter', system-ui, sans-serif;
  --font-stone:       'Cinzel', 'Palatino Linotype', Georgia, serif;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06), 0 2px 8px  rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.09), 0 2px 6px  rgba(0,0,0,0.05);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.07);

  --transition: 0.22s ease;
}

/* ── Reset / base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  color: var(--text);
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; }

.text-gold   { color: var(--gold) !important; }
.link-gold   { color: var(--gold); }
.link-gold:hover { color: var(--gold-light); }

.py-6 { padding-top: 4rem; padding-bottom: 4rem; }
.mt-6 { margin-top: 3rem; }

/* ── Navbar ────────────────────────────────────────────────────── */
.pmg-navbar {
  background: rgba(253,252,248,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.pmg-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.brand-icon { font-size: 1.4rem; }
.brand-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.01em;
}

/* Hamburger button */
.navbar-toggler {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  color: var(--text-secondary);
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.navbar-toggler:hover { background: var(--bg-secondary); border-color: var(--border-light); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(138,92,26,0.15); outline: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%234a4438' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 1.2rem;
  height: 1.2rem;
}

.pmg-navbar .nav-link {
  color: var(--text-secondary);
  transition: color var(--transition);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}
.pmg-navbar .nav-link:hover { color: var(--text); background: var(--bg-secondary); }

.nav-avatar {
  width: 32px; height: 32px;
  background: var(--gold-muted);
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.pmg-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 180px;
}
.pmg-dropdown .dropdown-item {
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.pmg-dropdown .dropdown-item:hover {
  background: var(--gold-muted);
  color: var(--text);
}
.pmg-dropdown .dropdown-divider { border-color: var(--border); }

/* ── Mobile nav collapse ───────────────────────────────────────── */
@media (max-width: 991px) {
  .pmg-navbar .navbar-collapse {
    border-top: 1px solid var(--border);
    margin: 0.5rem -0.75rem -0.25rem;
    padding: 0.5rem 0.75rem 0.75rem;
  }
  .pmg-navbar .navbar-collapse .nav-link {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
  }
  .pmg-navbar .navbar-collapse .navbar-nav + .navbar-nav {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
  }
  /* CTA button full-width on mobile */
  .pmg-navbar .navbar-collapse .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }
  /* Dropdown in mobile: flat inline list */
  .pmg-navbar .dropdown-menu {
    position: static !important;
    box-shadow: none !important;
    border: none;
    background: transparent;
    padding: 0.25rem 0 0.25rem 0.75rem;
    margin: 0;
    transform: none !important;
  }
  .pmg-navbar .dropdown-menu .dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  /* Avatar row on mobile */
  .pmg-navbar .nav-link.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
}

/* ── Buttons ───────────────────────────────────────────────────── */
.pmg-btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #ffffff;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.pmg-btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--gold-glow), var(--shadow-md);
}

.pmg-btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.pmg-btn-outline:hover {
  background: var(--gold-muted);
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.pmg-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.pmg-btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--border-light);
}

.btn-xs { padding: 0.2rem 0.6rem; font-size: 0.75rem; }

/* ── Form inputs ───────────────────────────────────────────────── */
.pmg-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.pmg-input:focus {
  background: var(--bg-secondary);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
  color: var(--text);
}
.pmg-input::placeholder { color: var(--text-muted); }
.pmg-input option { background: var(--bg-card); }

.form-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* ── Sections ──────────────────────────────────────────────────── */
.section-dark   { background: var(--bg-primary); }
.section-darker { background: var(--bg-secondary); }

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-title-sm {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
}
.section-title-xs {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 60%, rgba(140,190,120,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 78% 25%, rgba(210,170,100,0.08) 0%, transparent 50%),
    linear-gradient(165deg, #fdfcf8 0%, #f8f2e7 100%);
}
.hero-mist {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}
.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8%  12%, rgba(170,130,60,0.22) 0%, transparent 100%),
    radial-gradient(1px   1px   at 22% 32%, rgba(150,110,40,0.18) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 18%, rgba(170,130,60,0.16) 0%, transparent 100%),
    radial-gradient(1px   1px   at 62% 8%,  rgba(150,110,40,0.22) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 38%, rgba(170,130,60,0.18) 0%, transparent 100%),
    radial-gradient(1px   1px   at 88% 22%, rgba(150,110,40,0.14) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 92% 60%, rgba(170,130,60,0.12) 0%, transparent 100%),
    radial-gradient(1px   1px   at 14% 70%, rgba(150,110,40,0.18) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 80%, rgba(170,130,60,0.14) 0%, transparent 100%);
}
.hero-content { position: relative; z-index: 2; padding: 4rem 0; }
.hero-badge {
  display: inline-block;
  background: var(--gold-muted);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 1rem 0;
  color: var(--text);
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}
.hero-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
}
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
  font-size: 1.1rem;
  z-index: 2;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ── Home map ──────────────────────────────────────────────────── */
.map-container-home {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.home-map-el { height: 420px; }
.map-overlay-cta {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

/* ── Steps ─────────────────────────────────────────────────────── */
.col-lg-2dot4 { flex: 0 0 20%; max-width: 20%; }
@media (max-width: 991px) { .col-lg-2dot4 { flex: 0 0 50%; max-width: 50%; } }
@media (max-width: 575px) { .col-lg-2dot4 { flex: 0 0 100%; max-width: 100%; } }

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  transition: all var(--transition);
}
.step-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--gold-glow);
}
.step-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--border-light);
  line-height: 1;
}
.step-icon {
  font-size: 1.8rem;
  color: var(--gold);
  margin: 0.5rem 0;
}
.step-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.step-desc { color: var(--text-muted); font-size: 0.85rem; }

/* ── Features ─────────────────────────────────────────────────── */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-card-icon {
  width: 44px; height: 44px;
  background: var(--gold-muted);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.feature-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.feature-card-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
  line-height: 1.5;
}
/* Homepage feature cards: horizontal layout on mobile */
.feature-card-home {
  display: flex;
  flex-direction: column;
}
@media (max-width: 575.98px) {
  .feature-card-home {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem;
  }
  .feature-card-home .feature-card-icon {
    margin-bottom: 0;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .feature-card-content { flex: 1; min-width: 0; }
  /* Reduce section vertical spacing on mobile */
  .py-6 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  /* Give homepage sections more horizontal breathing room */
  .page-home .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  /* Premium add-on cards: less padding on mobile */
  .premium-feature-card { padding: 1rem 0.875rem; }
  .pfc-icon { font-size: 1.3rem; }
  .pfc-title { font-size: 0.85rem; }
  .pfc-desc  { font-size: 0.75rem; }
  /* Item cards: compact on mobile */
  .item-emoji { font-size: 1.7rem; }
}

/* ── Gravestone showcase (homepage) ────────────────────────────── */
.gravestone-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}
.gs-items-preview {
  display: flex;
  gap: 1rem;
  font-size: 1.8rem;
}

/* ── Item cards ─────────────────────────────────────────────────── */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all var(--transition);
}
.item-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.item-emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.item-name  { font-weight: 600; font-size: 0.85rem; }
.item-price { color: var(--gold); font-weight: 700; font-size: 0.95rem; }

/* ── Pricing ───────────────────────────────────────────────────── */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
}
.pricing-card-featured {
  border-color: var(--gold);
  box-shadow: var(--gold-glow);
}
.pricing-badge {
  display: inline-block;
  background: var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.pricing-badge.gold {
  background: var(--gold-muted);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
}
.pricing-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.pricing-period { font-size: 1.2rem; color: var(--text-muted); }
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  text-align: left;
}
.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }

.upgrade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all var(--transition);
}
.upgrade-card:hover { border-color: var(--gold); }
.upgrade-name { font-weight: 600; font-size: 0.875rem; margin-top: 0.5rem; }
.upgrade-price { color: var(--gold); font-size: 0.875rem; margin-top: 0.25rem; }

/* ── CTA section ───────────────────────────────────────────────── */
.section-cta {
  background: linear-gradient(135deg, rgba(140,190,120,0.07), var(--bg-secondary));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
}
.cta-subtitle { color: var(--text-secondary); font-size: 1.1rem; }

/* ── Auth pages ────────────────────────────────────────────────── */
.page-auth { background: var(--bg-secondary); }
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.auth-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.auth-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.auth-header { margin-bottom: 2rem; }
.input-password-wrap { position: relative; }
.input-password-wrap .pmg-input { padding-right: 2.5rem; }
.btn-toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition);
}
.btn-toggle-pw:hover { color: var(--text); }

/* ── Dashboard ─────────────────────────────────────────────────── */
.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}
.page-header .back-link {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.page-header .back-link:hover { color: var(--gold); }

.empty-state .empty-icon { font-size: 4rem; }

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.dashboard-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dashboard-card-ribbon {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-active   { background: rgba(76,175,120,0.15); color: #4caf78; }
.status-pending  { background: rgba(240,167,66,0.15);  color: #f0a742; }
.status-expired  { background: rgba(232,92,92,0.15);   color: #e85c5c; }
.status-cancelled{ background: rgba(107,105,136,0.2);  color: #8b8fa8; }

.dashboard-stone-preview {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem 0.5rem;
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-card));
}
.dashboard-card-body { padding: 1rem 1.25rem 1.25rem; }
.memorial-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.privacy-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  white-space: nowrap;
}
.privacy-badge.public  { background: rgba(76,175,120,0.1);  color: #4caf78;  border: 1px solid rgba(76,175,120,0.3); }
.privacy-badge.private { background: rgba(107,105,136,0.15); color: #8b8fa8; border: 1px solid var(--border); }

.stats-row {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.stat-item i { color: var(--gold); }

/* ── Gravestone styles ─────────────────────────────────────────── */

/* ─ Mini size (dashboard cards, style picker) ─ */
.gs-mini {
  --size: 60px;
  width: var(--size);
  height: calc(var(--size) * 1.65);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.gs-mini-name {
  font-size: calc(var(--size) * 0.118);
  font-family: var(--font-stone);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  line-height: 1.2;
  padding: 0 calc(var(--size)*0.1);
}

/* ─── Classic ─── dark charcoal granite, traditional arch */
.gs-mini.gs-classic::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(175deg,
      #72768c 0%, #4e5268 20%,
      #3c3f58 50%, #2a2d44 80%, #1e2135 100%);
  border-radius: calc(var(--size)*0.5) calc(var(--size)*0.5) 5px 5px;
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,0.13),
    inset 0 -4px 8px rgba(0,0,0,0.5),
    inset 2px 0 4px rgba(255,255,255,0.06),
    inset -2px 0 4px rgba(255,255,255,0.04),
    0 8px 24px rgba(0,0,0,0.55),
    0 2px 6px rgba(0,0,0,0.3);
}
/* Engraved panel lines */
.gs-mini.gs-classic::after {
  content: '';
  position: absolute;
  left: 16%; right: 16%;
  top: 25%; bottom: 12%;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,0,0,0.2);
  z-index: 1;
  pointer-events: none;
}
.gs-mini.gs-classic .gs-mini-name {
  color: #cac6dc;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.06),
    0 -1px 0 rgba(0,0,0,0.7),
    0 2px 6px rgba(0,0,0,0.5);
}

/* ─── Marble ─── Carrara white, veined, elegant pointed arch */
.gs-mini.gs-marble::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(170deg,
      #f7f3ef 0%, #eee8e0 20%,
      #f3ede5 45%, #e5dfd7 70%,
      #ede7df 100%);
  border-radius: calc(var(--size)*0.5) calc(var(--size)*0.5) 5px 5px;
  box-shadow:
    inset 0 4px 10px rgba(255,255,255,0.95),
    inset 0 -4px 8px rgba(160,140,120,0.2),
    inset 2px 0 5px rgba(255,255,255,0.7),
    0 8px 24px rgba(0,0,0,0.22),
    0 2px 6px rgba(0,0,0,0.12);
}
/* Marble veining + ornate inset border */
.gs-mini.gs-marble::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: calc(var(--size)*0.5) calc(var(--size)*0.5) 5px 5px;
  background:
    repeating-linear-gradient(
      -28deg,
      transparent, transparent 9px,
      rgba(160,140,120,0.07) 9px, rgba(160,140,120,0.07) 10px
    ),
    repeating-linear-gradient(
      58deg,
      transparent, transparent 16px,
      rgba(130,110,90,0.05) 16px, rgba(130,110,90,0.05) 17px
    );
  z-index: 1;
  pointer-events: none;
}
.gs-mini.gs-marble .gs-mini-name {
  color: #3a2e26;
  font-style: italic;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.92),
    0 -1px 0 rgba(90,70,50,0.35),
    0 2px 5px rgba(80,60,40,0.12);
}

/* ─── Celtic ─── dark moss granite, ring cross topper */
.gs-mini.gs-celtic::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(172deg,
      #52624c 0%, #3e4e38 25%,
      #303e2a 55%, #202c1a 85%, #182010 100%);
  border-radius: calc(var(--size)*0.46) calc(var(--size)*0.46) 5px 5px;
  box-shadow:
    inset 0 3px 6px rgba(140,170,120,0.14),
    inset 0 -4px 8px rgba(0,0,0,0.55),
    inset 2px 0 5px rgba(140,170,120,0.06),
    0 8px 24px rgba(0,0,0,0.5),
    0 2px 6px rgba(0,0,0,0.25);
}
/* Celtic ring topper */
.gs-mini.gs-celtic::after {
  content: '';
  position: absolute;
  top: calc(var(--size) * -0.22);
  left: 50%;
  transform: translateX(-50%);
  width:  calc(var(--size) * 0.48);
  height: calc(var(--size) * 0.48);
  border: calc(var(--size) * 0.06) solid #7a9e70;
  border-radius: 50%;
  background: #2e3e28;
  box-shadow:
    inset 0 0 10px rgba(30,50,20,0.9),
    0 0 8px rgba(80,120,65,0.5),
    0 4px 10px rgba(0,0,0,0.55);
  z-index: 4;
}
.gs-mini.gs-celtic .gs-mini-name {
  color: #a8c89e;
  text-shadow:
    0 1px 0 rgba(180,220,160,0.06),
    0 -1px 0 rgba(0,0,0,0.8),
    0 2px 6px rgba(0,0,0,0.6);
}

/* ─── Angel ─── lilac/purple stone, golden trim, Gothic arch */
.gs-mini.gs-angel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(172deg,
      #cbbcdb 0%, #a894c4 22%,
      #8872aa 55%, #624888 80%, #452870 100%);
  border-radius: calc(var(--size)*0.44) calc(var(--size)*0.44) 5px 5px;
  box-shadow:
    inset 0 3px 8px rgba(220,200,255,0.28),
    inset 0 -4px 8px rgba(0,0,0,0.5),
    0 0 18px rgba(180,140,240,0.22),
    0 8px 24px rgba(0,0,0,0.5);
}
/* Gold inset border trim */
.gs-mini.gs-angel::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--size)*0.46) calc(var(--size)*0.46) 3px 3px;
  border: 1px solid rgba(212,175,55,0.5);
  box-shadow: inset 0 0 6px rgba(212,175,55,0.1);
  z-index: 3;
  pointer-events: none;
}
.gs-mini.gs-angel .gs-mini-name {
  color: #ede0ff;
  text-shadow:
    0 1px 0 rgba(212,175,55,0.12),
    0 -1px 0 rgba(0,0,0,0.7),
    0 2px 8px rgba(0,0,0,0.5),
    0 0 12px rgba(180,140,240,0.3);
}

/* ─ Micro size (tribute items list, inline badges) ─ */
.gs-micro {
  --size: 32px;
  width: var(--size);
  height: calc(var(--size) * 1.55);
  position: relative;
  border-radius: calc(var(--size)*0.5) calc(var(--size)*0.5) 3px 3px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.32), inset 0 2px 4px rgba(255,255,255,0.1);
}
.gs-micro.gs-classic { background: linear-gradient(172deg, #72768c, #1e2135); }
.gs-micro.gs-marble  { background: linear-gradient(168deg, #f7f3ef, #e0dbd3); }
.gs-micro.gs-celtic  { background: linear-gradient(172deg, #52624c, #182010); }
.gs-micro.gs-angel   { background: linear-gradient(172deg, #cbbcdb, #452870); }

/* ── Gravestone display (full memorial page) ────────────────────── */
.gravestone-display {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 260px;
}

.gsd-body {
  width: 220px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2.5rem 1.5rem 2rem;
  border-radius: 110px 110px 8px 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gsd-body:hover { transform: translateY(-4px); }

/* ─── Classic full display ─── */
.gs-display-classic .gsd-body {
  background:
    linear-gradient(176deg,
      #72768c 0%, #4e5268 18%,
      #3c3f58 42%, #2a2d44 68%, #1a1d30 100%);
  box-shadow:
    inset 0 5px 12px rgba(255,255,255,0.1),
    inset 0 -5px 12px rgba(0,0,0,0.55),
    inset 3px 0 8px rgba(255,255,255,0.05),
    inset -3px 0 8px rgba(255,255,255,0.03),
    0 16px 50px rgba(0,0,0,0.6),
    0 6px 16px rgba(0,0,0,0.4);
}
/* Carved stone panel */
.gs-display-classic .gsd-body::before {
  content: '';
  position: absolute;
  inset: 20% 12% 10%;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.45),
    inset 0 -1px 3px rgba(255,255,255,0.04),
    0 1px 0 rgba(255,255,255,0.05);
}
/* Polished stone highlight + surface grain */
.gs-display-classic .gsd-body::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 50%;
  border-radius: 110px 110px 0 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.03) 40%,
    transparent 100%);
  pointer-events: none;
}

/* ─── Marble full display ─── */
.gs-display-marble .gsd-body {
  background:
    linear-gradient(162deg,
      #f9f5f1 0%, #f0ebe3 18%,
      #f5f0e8 42%, #e8e2d8 68%, #ede7dd 100%);
  box-shadow:
    inset 0 5px 14px rgba(255,255,255,0.98),
    inset 0 -5px 10px rgba(160,140,115,0.22),
    inset 3px 0 8px rgba(255,255,255,0.75),
    0 16px 50px rgba(0,0,0,0.25),
    0 6px 16px rgba(0,0,0,0.14);
}
/* Marble veining */
.gs-display-marble .gsd-body::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 110px 110px 8px 8px;
  background:
    repeating-linear-gradient(
      -26deg,
      transparent, transparent 22px,
      rgba(150,130,110,0.055) 22px, rgba(150,130,110,0.055) 23px
    ),
    repeating-linear-gradient(
      62deg,
      transparent, transparent 38px,
      rgba(120,100,80,0.04) 38px, rgba(120,100,80,0.04) 39px
    ),
    repeating-linear-gradient(
      -55deg,
      transparent, transparent 55px,
      rgba(140,120,100,0.03) 55px, rgba(140,120,100,0.03) 56px
    );
  pointer-events: none;
}
/* Double inset ornate border */
.gs-display-marble .gsd-body::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(110,90,70,0.18);
  border-radius: 96px 96px 4px 4px;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.4);
  pointer-events: none;
}

/* ─── Celtic full display ─── */
.gs-display-celtic .gsd-body {
  background:
    linear-gradient(173deg,
      #52624c 0%, #3e4e38 20%,
      #303e2a 48%, #1e2c18 72%, #141e10 100%);
  box-shadow:
    inset 0 5px 12px rgba(120,160,100,0.1),
    inset 0 -5px 12px rgba(0,0,0,0.6),
    inset 3px 0 8px rgba(120,160,100,0.05),
    0 16px 50px rgba(0,0,0,0.58),
    0 6px 16px rgba(0,0,0,0.35);
}
/* Knotwork hint border */
.gs-display-celtic .gsd-body::before {
  content: '';
  position: absolute;
  inset: 18% 14% 10%;
  border: 1px solid rgba(130,165,110,0.14);
  border-radius: 3px;
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.5),
    0 1px 0 rgba(130,165,110,0.08);
}
.gs-display-celtic .gsd-body::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 42%;
  border-radius: 110px 110px 0 0;
  background: linear-gradient(180deg,
    rgba(130,165,110,0.07) 0%,
    transparent 100%);
  pointer-events: none;
}

/* ─── Angel full display ─── */
.gs-display-angel .gsd-body {
  background:
    linear-gradient(173deg,
      #d0c0e0 0%, #b09acc 20%,
      #9078b4 48%, #6850a0 72%, #482878 100%);
  box-shadow:
    inset 0 5px 14px rgba(220,200,255,0.28),
    inset 0 -5px 12px rgba(0,0,0,0.5),
    0 0 50px rgba(160,120,240,0.28),
    0 16px 50px rgba(0,0,0,0.5),
    0 6px 16px rgba(0,0,0,0.3);
}
/* Gold inset ornate frame */
.gs-display-angel .gsd-body::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(212,175,55,0.38);
  border-radius: 98px 98px 5px 5px;
  box-shadow:
    inset 0 0 16px rgba(212,175,55,0.07),
    0 0 10px rgba(212,175,55,0.12);
}
.gs-display-angel .gsd-body::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 52%;
  border-radius: 110px 110px 0 0;
  background: linear-gradient(180deg,
    rgba(220,200,255,0.14) 0%,
    transparent 100%);
  pointer-events: none;
}

/* ── Per-style ornamental accents on content ─── */
/* Classic: engraved cross above content */
.gs-display-classic .gsd-content::before {
  content: '✞';
  display: block;
  font-size: 1.1rem;
  color: rgba(200,195,230,0.55);
  margin-bottom: 0.2rem;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 -1px 0 rgba(0,0,0,0.6);
}
/* Marble: floral ornament above content */
.gs-display-marble .gsd-content::before {
  content: '❦';
  display: block;
  font-size: 1.2rem;
  color: rgba(80,60,40,0.4);
  margin-bottom: 0.15rem;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}
/* Angel: star trio */
.gs-display-angel .gsd-content::before {
  content: '✦  ✦  ✦';
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(212,175,55,0.7);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 8px rgba(212,175,55,0.5);
}
/* Celtic: decorative knot hint above content */
.gs-display-celtic .gsd-content::before {
  content: '✦';
  display: block;
  font-size: 0.9rem;
  color: rgba(140,180,120,0.45);
  margin-bottom: 0.2rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Thin engraved rule before inscription */
.gsd-inscription::before {
  content: '';
  display: block;
  height: 1px;
  width: 50%;
  margin: 0.45rem auto;
  background: currentColor;
  opacity: 0.18;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Emoji medallion per style ─── */
.gs-display-classic .gsd-emoji,
.gs-display-celtic  .gsd-emoji {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  padding: 0.4rem;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.06);
}
.gs-display-marble .gsd-emoji {
  background: rgba(150,130,110,0.1);
  border: 1px solid rgba(110,90,70,0.18);
  border-radius: 50%;
  padding: 0.4rem;
  box-shadow: inset 0 2px 4px rgba(80,60,40,0.08), 0 1px 2px rgba(255,255,255,0.7);
}
.gs-display-angel .gsd-emoji {
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 50%;
  padding: 0.4rem;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.25), 0 0 10px rgba(212,175,55,0.2);
}

/* ── Text styles ─── */
.gsd-content { text-align: center; position: relative; z-index: 2; }

.gsd-emoji { font-size: 2rem; margin-bottom: 0.5rem; display: inline-flex; align-items: center; justify-content: center; }

.gsd-name {
  font-family: var(--font-stone);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

.gsd-dates {
  font-family: var(--font-stone);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 0.45rem;
}
.gsd-dates::before { content: '— '; opacity: 0.7; }
.gsd-dates::after  { content: ' —'; opacity: 0.7; }

.gsd-inscription {
  font-family: var(--font-stone);
  font-style: italic;
  font-size: 0.78rem;
  opacity: 0.82;
  line-height: 1.45;
  max-width: 170px;
  letter-spacing: 0.03em;
}

/* Per-style engraving text-shadows on name */
.gs-display-classic .gsd-name {
  color: #cac6dc;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.06),
    0 -1px 1px rgba(0,0,0,0.75),
    1px 0 2px rgba(0,0,0,0.35),
    -1px 0 2px rgba(0,0,0,0.35),
    0 3px 12px rgba(0,0,0,0.45);
}
.gs-display-classic .gsd-dates,
.gs-display-classic .gsd-inscription { color: #bbb8ce; }

.gs-display-marble .gsd-name {
  color: #2e241a;
  font-style: italic;
  text-shadow:
    0 1px 3px rgba(255,255,255,0.95),
    0 -1px 1px rgba(90,70,50,0.4),
    0 2px 6px rgba(80,60,40,0.12);
}
.gs-display-marble .gsd-dates,
.gs-display-marble .gsd-inscription { color: #3e3028; }

.gs-display-celtic .gsd-name {
  color: #a8c89e;
  text-shadow:
    0 1px 0 rgba(160,200,140,0.08),
    0 -1px 1px rgba(0,0,0,0.8),
    1px 0 2px rgba(0,0,0,0.4),
    -1px 0 2px rgba(0,0,0,0.4),
    0 3px 12px rgba(0,0,0,0.5);
}
.gs-display-celtic .gsd-dates,
.gs-display-celtic .gsd-inscription { color: #90b088; }

.gs-display-angel .gsd-name {
  color: #ece0ff;
  text-shadow:
    0 1px 0 rgba(212,175,55,0.1),
    0 -1px 1px rgba(0,0,0,0.7),
    0 3px 14px rgba(0,0,0,0.5),
    0 0 18px rgba(180,140,240,0.28);
}
.gs-display-angel .gsd-dates,
.gs-display-angel .gsd-inscription { color: #d8c8f8; }

/* Celtic ring cross (full display) */
.gsd-celtic-ring {
  position: absolute;
  top: -44px;
  width: 78px; height: 78px;
  border: 8px solid #7a9e70;
  border-radius: 50%;
  background: #2a3a24;
  overflow: visible;
  box-shadow:
    inset 0 0 18px rgba(20,35,15,0.85),
    0 0 12px rgba(80,120,65,0.45),
    0 4px 10px rgba(0,0,0,0.6);
  z-index: 5;
}
/* Cross horizontal arm */
.gsd-celtic-ring::before {
  content: '';
  position: absolute;
  top: 50%; left: -16px; right: -16px;
  height: 9px;
  background: linear-gradient(90deg, #5a7a54 0%, #7a9e70 20%, #7a9e70 80%, #5a7a54 100%);
  transform: translateY(-50%);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5), inset 0 1px 0 rgba(180,220,160,0.15);
  z-index: 6;
}
/* Cross vertical arm */
.gsd-celtic-ring::after {
  content: '';
  position: absolute;
  left: 50%; top: -26px; bottom: -14px;
  width: 9px;
  background: linear-gradient(180deg, #5a7a54 0%, #7a9e70 12%, #7a9e70 88%, #5a7a54 100%);
  transform: translateX(-50%);
  border-radius: 3px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.5), inset 1px 0 0 rgba(180,220,160,0.15);
  z-index: 6;
}

/* Angel figure */
.gsd-angel-figure {
  position: absolute;
  top: -50px;
  font-size: 3rem;
  filter:
    drop-shadow(0 3px 8px rgba(0,0,0,0.45))
    drop-shadow(0 0 12px rgba(212,175,55,0.2));
}
.gsd-angel-figure::before { content: '👼'; }

/* Items around the stone */
/* Items around the stone */
.stone-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  max-width: 220px;
}
.stone-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  cursor: default;
  animation: floatItem 3s ease-in-out infinite;
  box-shadow: var(--shadow-sm);
}
.stone-item:nth-child(odd)  { animation-delay: 0.5s; }
.stone-item:nth-child(even) { animation-delay: 1s; }

@keyframes floatItem {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.visit-counter, .location-tag {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── Memorial page ─────────────────────────────────────────────── */
.page-memorial { background: var(--bg-primary); }

.memorial-hero {
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
  padding: 4rem 0;
}
.memorial-bg-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(170,130,60,0.18) 0%, transparent 100%),
    radial-gradient(1px   1px   at 50% 15%, rgba(150,110,40,0.14) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 80% 40%, rgba(170,130,60,0.18) 0%, transparent 100%),
    radial-gradient(1px   1px   at 35% 70%, rgba(150,110,40,0.12) 0%, transparent 100%),
    radial-gradient(1px   1px   at 65% 80%, rgba(170,130,60,0.14) 0%, transparent 100%);
}
.memorial-bg-mist {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 150px;
  background: linear-gradient(to top, var(--bg-secondary), transparent);
}
.memorial-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
  position: relative;
  z-index: 2;
}
@media (max-width: 767px) {
  .memorial-layout { grid-template-columns: 1fr; }
  .memorial-stone-col { display: flex; flex-direction: column; align-items: center; }
}
.memorial-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.memorial-name-row { margin-bottom: 1rem; }
.pet-type-badge {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
}
.memorial-dates { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.date-item { font-size: 0.95rem; color: var(--text-secondary); }
.memorial-description {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.owner-actions { display: flex; justify-content: center; gap: 0.5rem; }

/* Photo gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  position: relative;
  background: var(--bg-card);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
  color: #fff; font-size: 1.3rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Tributes */
.tributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.tribute-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.tribute-emoji { font-size: 1.8rem; flex-shrink: 0; }
.tribute-type  { font-weight: 600; font-size: 0.9rem; }
.tribute-from  { font-size: 0.85rem; color: var(--text-secondary); }
.tribute-message {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.tribute-expiry { margin-top: 0.25rem; }

/* Tribute form */
.tribute-login-wall {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}
.tlw-icon { color: var(--gold); }

/* Tribute panels (free message + paid gifts) */
.tribute-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
}
.tribute-panel-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.tribute-panel-body {
  padding: 1.25rem;
}

/* Tribute messages list */
.tribute-messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tribute-message-card {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.tmc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #c48d2a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.85rem;
}
.tmc-body { flex: 1; min-width: 0; }
.tmc-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.tmc-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.tmc-date { margin-top: 0.3rem; }

.item-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.item-catalogue-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition);
}
.item-catalogue-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.item-catalogue-card .item-emoji { font-size: 2rem; }
.item-catalogue-card .item-desc  { margin: 0.25rem 0; }

/* Compact item list (replaces grid on memorial page) */
.item-list { display: flex; flex-direction: column; gap: 0.4rem; }
.item-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.875rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.item-list-row:hover { border-color: var(--gold); background: rgba(212,175,55,0.04); }
.item-list-row.selected { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.item-select-check { font-size: 1rem; flex-shrink: 0; width: 1.1rem; color: var(--border); transition: color var(--transition); }
.item-list-row.selected .item-select-check { color: var(--gold); }
.item-list-emoji { font-size: 1.4rem; flex-shrink: 0; width: 2rem; text-align: center; }
.item-list-details { flex: 1; min-width: 0; }
.item-list-name { font-weight: 600; font-size: 0.85rem; display: block; }
.item-list-sub  { font-size: 0.78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-list-price { font-weight: 700; font-size: 0.85rem; flex-shrink: 0; white-space: nowrap; color: var(--text); }

/* Tribute delete button */
.tmc-delete {
  flex-shrink: 0;
  align-self: flex-start;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.4;
  transition: all var(--transition);
  margin-left: auto;
}
.tmc-delete:hover { border-color: #dc3545; color: #dc3545; }

/* Report button — same style as delete but flag icon */
.tmc-report {
  flex-shrink: 0;
  align-self: flex-start;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.4;
  transition: all var(--transition);
  margin-left: auto;
  opacity: 0;
}
.tribute-message-card:hover .tmc-report { opacity: 1; }
.tmc-report:hover { border-color: #e8a000; color: #e8a000; }

/* ── Gift History Log ──────────────────────────────────────────── */
.gift-history-list { display: flex; flex-direction: column; gap: 0.5rem; }
.gift-history-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.875rem;
}
.gift-history-row.gift-past { opacity: 0.6; }
.gift-history-emoji { font-size: 1.2rem; flex-shrink: 0; }
.gift-history-body { flex: 1; min-width: 0; }
.gift-history-name { font-weight: 600; }
.gift-history-from { color: var(--text-secondary); }
.gift-history-msg  { color: var(--text-secondary); font-style: italic; }
.gift-history-date { font-size: 0.8rem; }
.btn-report-gift {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.gift-history-row:hover .btn-report-gift { opacity: 1; }
.btn-report-gift:hover { color: #e8a000; background: rgba(232,160,0,0.08); }

/* Tributes login gate */
.tributes-login-gate {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* Memorial map */
.memorial-map-el { height: 300px; border-radius: var(--radius-lg); overflow: hidden; }

/* ── Explore page ──────────────────────────────────────────────── */
.page-explore .pmg-navbar { position: relative; }

/* Mobile view tabs */
.explore-mobile-tabs {
  display: none;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.explore-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.explore-tab:hover { color: var(--text); background: var(--bg-secondary); }
.explore-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(138,92,26,0.05);
}

.explore-layout {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}
.explore-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 1.1rem 1.1rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-controls {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.sidebar-memorials { flex: 1; overflow-y: auto; padding: 0.4rem; }

.sidebar-memorial-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.sidebar-memorial-item:hover { background: var(--bg-card-hover); color: var(--text); }
.sidebar-memorial-item.active { background: var(--gold-muted); border-color: rgba(201,168,76,0.3); }
.smi-info { flex: 1; min-width: 0; }
.smi-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smi-meta, .smi-date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.8rem; }
.smi-thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.smi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-pagination { padding: 0.75rem 0; }
.sidebar-pagination .pagination { gap: 0.25rem; }
.sidebar-pagination .page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.sidebar-pagination .page-link:hover { background: var(--gold-muted); color: var(--gold); }
.sidebar-pagination .page-item.active .page-link { background: var(--gold); border-color: var(--gold); color: #1a1200; }

.explore-map-wrap { flex: 1; position: relative; }
.explore-map-el { width: 100%; height: 100%; }

/* Mobile explore layout */
@media (max-width: 767px) {
  .explore-mobile-tabs { display: flex; }
  .explore-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .explore-sidebar {
    width: 100%;
    max-height: none;
    overflow-y: visible;
  }
  .explore-sidebar .sidebar-memorials {
    max-height: 45vh;
    overflow-y: auto;
  }
  .explore-map-wrap { min-height: 60vh; }

  /* Tab-driven show/hide */
  .explore-layout[data-view="map"] .explore-sidebar { display: none; }
  .explore-layout[data-view="list"] .explore-map-wrap { display: none; }
}

.map-controls-overlay {
  position: absolute;
  top: 1rem; left: 1rem; right: 1rem;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#findNearMeBtn {
  pointer-events: all;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.map-search-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  max-width: 400px;
  flex: 1;
  pointer-events: all;
  box-shadow: var(--shadow-md);
  color: var(--text-muted);
}
.map-search-input {
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}
.map-search-input::placeholder { color: var(--text-muted); }

.map-detail-panel {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}
.panel-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

/* Mobile map controls */
@media (max-width: 767px) {
  .map-controls-overlay {
    top: 0.65rem; left: 0.65rem; right: 0.65rem;
    gap: 0.4rem;
  }
  .map-search-box {
    max-width: none;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }
  .map-search-input { font-size: 0.85rem; }
  #findNearMeBtn { font-size: 0.8rem; padding: 0.4rem 0.6rem; }
  .map-detail-panel {
    width: calc(100% - 1.5rem);
    bottom: 0.75rem;
    left: 0.75rem;
    transform: none;
  }
}

/* ── Map markers ───────────────────────────────────────────────── */
.map-marker {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: transform 0.2s;
}
.map-marker:hover { transform: scale(1.2); }
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-md) !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; }
.popup-link { color: var(--gold); font-size: 0.875rem; }

/* ── Create/Edit memorial ──────────────────────────────────────── */
.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.form-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.form-section-num {
  width: 28px; height: 28px;
  background: var(--gold-muted);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.create-map-el {
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.style-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.style-option {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.style-option:hover { border-color: rgba(201,168,76,0.5); }
.style-option.selected { border-color: var(--gold); background: var(--gold-muted); }
.style-radio { display: none; }
.style-label { font-size: 0.8rem; font-weight: 600; margin-top: 0.4rem; }
.style-price { font-size: 0.75rem; color: var(--text-muted); }
.style-price .included { color: var(--success); }

.privacy-toggle-group { display: flex; flex-direction: column; gap: 0.75rem; }
.privacy-option {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.1rem;
  align-items: center;
  transition: all var(--transition);
}
.privacy-option i { grid-row: 1 / 3; font-size: 1.2rem; color: var(--gold); }
.privacy-option.selected { border-color: var(--gold); background: var(--gold-muted); }
.privacy-option strong { font-size: 0.9rem; }
.privacy-option span { font-size: 0.8rem; color: var(--text-muted); }
.privacy-radio { display: none; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}
.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-delete-btn {
  position: absolute;
  top: 3px; right: 3px;
  background: rgba(232,92,92,0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.photo-item:hover .photo-delete-btn { opacity: 1; }

.photo-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.photo-upload-zone:hover { border-color: var(--gold); }
.photo-file-input { display: none; }

.char-count { font-size: 0.75rem; }

.form-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

/* ── Checkout ──────────────────────────────────────────────────── */
.checkout-card { max-width: 520px; }
.order-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.order-summary-header {
  background: var(--bg-card);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.875rem 1rem;
}
.order-price { font-weight: 700; color: var(--gold); white-space: nowrap; }
.order-total {
  display: flex;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border);
  font-weight: 700;
}
.stripe-secure-notice {
  background: rgba(76,175,120,0.08);
  border: 1px solid rgba(76,175,120,0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}
.stripe-secure-notice i { color: #635bff; font-size: 1.3rem; }

/* ── Success page ──────────────────────────────────────────────── */
.success-animation { display: flex; justify-content: center; }
.success-circle {
  width: 72px; height: 72px;
  background: rgba(76,175,120,0.15);
  border: 2px solid #4caf78;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4caf78;
  font-size: 2rem;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Footer ────────────────────────────────────────────────────── */
.pmg-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-heading {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; }
.footer-links a:hover { color: var(--gold); }
.footer-divider { border-color: var(--border); }
.pmg-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
}

/* ── Toast notifications ───────────────────────────────────────── */
#pmgToastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pmg-toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 240px;
}
.pmg-toast.success { border-left: 3px solid var(--success); }
.pmg-toast.error   { border-left: 3px solid var(--danger);  }
.pmg-toast.info    { border-left: 3px solid var(--gold);    }
.toast-fade { animation: fadeOut 0.3s ease forwards; }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* ── Lightbox ──────────────────────────────────────────────────── */
.pmg-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lightbox-inner img {
  max-width: 80vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: -2rem; right: -0.5rem;
  background: none; border: none;
  color: #fff; font-size: 1.3rem; cursor: pointer;
}
.lightbox-prev, .lightbox-next {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 575px) {
  .auth-card { padding: 1.5rem; }
  .form-submit-bar { flex-direction: column; align-items: stretch; }
  .style-picker { grid-template-columns: 1fr; }
  .memorial-layout { gap: 2rem; }
}

/* ── Bootstrap dark theme overrides ───────────────────────────── */
/* ── Alert / flash message overrides (readable on warm cream background) ── */
.alert {
  border-radius: var(--radius-md);
  border-left-width: 4px;
  border-top-width: 1px;
  border-right-width: 1px;
  border-bottom-width: 1px;
  border-style: solid;
  padding: 14px 16px;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert .alert-icon {
  flex-shrink: 0;
  font-size: 1.05rem;
  margin-top: 1px;
}
.alert .alert-body { flex: 1; line-height: 1.55; }
.alert .alert-body strong { display: block; margin-bottom: 2px; font-weight: 600; }
.alert .btn-close { flex-shrink: 0; margin-top: 2px; }

.alert-success {
  background: #eef7f1;
  border-color: #286e3a;
  color: #1a4f2a;
}
.alert-success .alert-icon { color: #286e3a; }

.alert-danger {
  background: #fdf2f2;
  border-color: #aa2e2e;
  color: #7a1f1f;
}
.alert-danger .alert-icon { color: #aa2e2e; }

.alert-warning {
  background: #fdf7ee;
  border-color: #a85c18;
  color: #6b3a0f;
}
.alert-warning .alert-icon { color: #a85c18; }

.alert-info {
  background: #eff5fd;
  border-color: #2d6ea8;
  color: #1a3f63;
}
.alert-info .alert-icon { color: #2d6ea8; }

.alert a.alert-link,
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.alert a:hover { opacity: 0.8; }

.form-check-input:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Leaflet cluster icons ────────────────────────────────────────────────── */
.cluster-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.cluster-sm { background: var(--gold); width: 32px; height: 32px; font-size: 0.75rem; }
.cluster-md { background: #c68c1a; width: 40px; height: 40px; font-size: 0.85rem; }
.cluster-lg { background: #9e6a0e; width: 48px; height: 48px; font-size: 1rem; }

.map-popup-mini { min-width: 140px; }
.map-popup-mini a { display: block; margin-top: 4px; color: var(--gold); text-decoration: none; }

/* ── Feature purchase cards (edit-memorial) ─────────────────────────────── */
.feature-cards-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.feature-card {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.feature-card:hover { border-color: var(--gold); }
.feature-card-owned { opacity: 0.7; }
.feature-card-icon { font-size: 1.3rem; flex-shrink: 0; width: 1.8rem; text-align: center; margin-top: 0.1rem; }
.feature-card-body { flex: 1; min-width: 0; min-width: 10rem; }
.feature-card-name { font-weight: 600; font-size: 0.85rem; }
.feature-card-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.1rem; line-height: 1.4; }
.feature-card-expiry { font-size: 0.74rem; white-space: nowrap; }
.cancel-sub-confirm { width: 100%; flex-basis: 100%; }

/* ── Dashboard memorial card actions ──────────────────────────── */
.memorial-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.memorial-actions .btn { white-space: nowrap; }

/* Cancel subscription row */
.memorial-cancel-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.btn-cancel-trigger {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s;
}
.btn-cancel-trigger:hover { color: #e85c5c; }
.cancel-confirm-panel {
  margin-top: 0.6rem;
  background: rgba(220,38,38,0.06);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
}
.cancel-confirm-panel p {
  font-size: 0.82rem;
  color: #c0392b;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

/* Mobile: stack action buttons in 2 columns */
@media (max-width: 576px) {
  .memorial-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .memorial-actions .btn {
    justify-content: center;
  }
  /* Copy URL icon button stays narrow */
  .memorial-actions .copy-url-btn {
    grid-column: auto;
    width: 100%;
  }
  .dashboard-card-body {
    padding: 0.875rem 1rem 1rem;
  }
  .stats-row {
    gap: 0.6rem;
    flex-wrap: wrap;
  }
}
.feature-card-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  background: rgba(74,196,120,0.15);
  color: #4ac478;
  font-weight: 600;
  white-space: nowrap;
}
.feature-card-btn {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.feature-card-btn:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #ffffff; transform: scale(1.03); box-shadow: var(--gold-glow); }
.feature-billing { font-weight: 400; font-size: 0.7rem; opacity: 0.8; }

/* ── Premium feature cards (homepage) ────────────────────────────── */
.premium-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  transition: border-color var(--transition), transform var(--transition);
}
.premium-feature-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.pfc-icon { font-size: 1.6rem; color: var(--gold); margin-bottom: 0.5rem; }
.pfc-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; }
.pfc-price { font-weight: 700; font-size: 1rem; color: var(--gold); margin-bottom: 0.4rem; }
.pfc-billing { font-size: 0.72rem; font-weight: 400; opacity: 0.8; }
.pfc-desc { font-size: 0.78rem; color: var(--text-secondary); margin: 0; line-height: 1.4; }

/* ── Legal pages (terms, privacy) ────────────────────────────────── */
.legal-body { color: var(--text-primary); }
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; margin-bottom: 0.9rem; }
.legal-section h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin: 1rem 0 0.4rem; }
.legal-section p, .legal-section li { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.legal-section ul { padding-left: 1.25rem; }
.legal-section ul li { margin-bottom: 0.3rem; }
.legal-section a { color: var(--gold); }
.legal-section a:hover { color: var(--gold-light); }

/* ── Support page ────────────────────────────────────────────────── */
.support-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}
.support-topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 0.12s;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
  background: var(--bg-card);
}
.support-topic-card i {
  font-size: 1.35rem;
  color: var(--gold-light);
  transition: color var(--transition), transform 0.15s;
}
.support-topic-card:hover {
  border-color: var(--gold);
  background: var(--bg-secondary);
  color: var(--text);
  transform: translateY(-2px);
}
.support-topic-card:hover i { color: var(--gold); transform: scale(1.1); }
.support-topic-card.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(138,92,26,0.1), rgba(138,92,26,0.04));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(138,92,26,0.2);
}
.support-topic-card.selected i { color: var(--gold); }
@media (max-width: 480px) {
  .support-topic-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Gravestone mini ornaments (Celtic cross, Angel) ─────────────── */
/* Cross arms overlaid on the Celtic ring (positioned above stone) */
.gs-mini.gs-celtic .gs-mini-cross {
  position: absolute;
  top: calc(var(--size) * -0.165);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--size) * 0.48);
  height: calc(var(--size) * 0.48);
  z-index: 5;
  pointer-events: none;
}
/* Horizontal bar */
.gs-mini.gs-celtic .gs-mini-cross::before {
  content: '';
  position: absolute;
  top: 50%; left: -6%;
  width: 112%; height: calc(var(--size) * 0.1);
  background: linear-gradient(90deg, #4e6e48, #7a9e70, #7a9e70, #4e6e48);
  border-radius: 3px;
  transform: translateY(-50%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.5), inset 0 1px 0 rgba(160,210,140,0.15);
}
/* Vertical bar */
.gs-mini.gs-celtic .gs-mini-cross::after {
  content: '';
  position: absolute;
  left: 50%; top: -22%;
  width: calc(var(--size) * 0.1); height: 135%;
  background: linear-gradient(180deg, #4e6e48, #7a9e70 15%, #7a9e70 85%, #4e6e48);
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 2px 0 4px rgba(0,0,0,0.5), inset 1px 0 0 rgba(160,210,140,0.15);
}

/* Angel mini: small pair of wings / star above the stone */
.gs-mini.gs-angel .gs-mini-angel {
  position: absolute;
  top: calc(var(--size) * -0.11);
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(var(--size) * 0.26);
  color: rgba(212,175,55,0.85);
  z-index: 5;
  line-height: 1;
  text-shadow: 0 0 8px rgba(212,175,55,0.5), 0 1px 4px rgba(0,0,0,0.4);
  pointer-events: none;
  letter-spacing: 0.08em;
}

/* Photo thumbnail in mini stone */
.gs-mini .gs-mini-photo {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--size) * 0.55);
  height: calc(var(--size) * 0.55);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 3;
}
/* When photo is shown, push name down / hide it */
.gs-mini:has(.gs-mini-photo) .gs-mini-name {
  position: absolute;
  bottom: 10%;
  left: 0; right: 0;
  font-size: calc(var(--size) * 0.1);
  opacity: 0.85;
}

/* ── Gravestone photo embed (full display) ───────────────────────── */
.gsd-photo-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: 0.6rem;
}
.gsd-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* Per-style photo borders */
.gs-display-classic .gsd-photo {
  border: 3px solid rgba(200,195,230,0.55);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.35),
    inset 0 0 0 2px rgba(0,0,0,0.2),
    0 4px 18px rgba(0,0,0,0.55);
}
.gs-display-marble .gsd-photo {
  border: 3px solid rgba(100,80,60,0.3);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.6),
    inset 0 0 0 2px rgba(255,255,255,0.2),
    0 4px 18px rgba(0,0,0,0.22);
}
.gs-display-celtic .gsd-photo {
  border: 3px solid rgba(120,165,100,0.45);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.35),
    inset 0 0 0 2px rgba(0,0,0,0.2),
    0 4px 18px rgba(0,0,0,0.5);
}
.gs-display-angel .gsd-photo {
  border: 3px solid rgba(212,175,55,0.5);
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.2),
    0 0 16px rgba(212,175,55,0.25),
    0 4px 18px rgba(0,0,0,0.4);
}

/* ── Gravestone photo picker (edit-memorial) ─────────────────────── */
.gs-photo-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
}
.gs-photo-option { cursor: pointer; }
.gs-photo-option-inner {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gs-photo-option-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gs-photo-option-none {
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
}
.gs-photo-option-none i { font-size: 1.2rem; color: var(--text-muted); }
.gs-photo-option:hover .gs-photo-option-inner,
.gs-photo-option.selected .gs-photo-option-inner {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(138,92,26,0.25);
}
.gs-photo-option.selected .gs-photo-option-inner {
  box-shadow: 0 0 0 2px var(--gold), 0 0 8px rgba(138,92,26,0.2);
}

/* ── form-section-subtitle ───────────────────────────────────────── */
.form-section-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}
