/**
 * LifeKeeper — Memorial search, grave locator, map views
 * UI only — pairs with lk-home.css for commercial heroes
 */


/* ── Tool page hero (centered glass panel) ── */
.lk-tool-hero.home-hero {
  min-height: clamp(320px, 52vh, 480px);
  padding: 88px 0 48px;
  align-items: center;
}

.lk-tool-hero .home-hero-copy-panel--centered {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.lk-tool-hero .home-hero-intro {
  margin-left: auto;
  margin-right: auto;
}

.lk-tool-hero .home-hero-buttons {
  justify-content: center;
}

.lk-tool-hero .home-hero-benefits {
  text-align: left;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.lk-tool-hero .home-hero-eyebrow.justify-content-center {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.lk-search-section {
  padding: 48px 0 72px;
}

/* Explore / search page — no hero, clear fixed header */
.lk-search-page {
  padding-top: 100px;
}

.lk-label-primary {
  color: var(--lk-primary);
}

.lk-callout {
  border-left: 4px solid var(--lk-accent);
  background: var(--lk-bg);
  border-radius: 0 12px 12px 0;
  padding: 16px 18px;
  margin-bottom: 24px;
}

.lk-callout h4 {
  color: var(--lk-primary);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.lk-callout ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--lk-text-muted);
  font-size: 0.9rem;
}

.lk-memorial-result-card {
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lk-memorial-result-card .lk-result-card-photo {
  padding: 1.5rem 1.5rem 0.75rem;
  text-align: center;
  background: var(--lk-bg-alt);
}

.lk-memorial-result-card .lk-result-avatar {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(2, 66, 105, 0.2);
}

.lk-memorial-result-card .lk-result-avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(2, 66, 105, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(2, 66, 105, 0.15);
}

.lk-memorial-result-card .lk-result-avatar-placeholder i {
  font-size: 2.5rem;
  color: var(--lk-primary);
}

.lk-memorial-result-card .lk-result-card-nameband {
  background: linear-gradient(135deg, var(--lk-primary) 0%, #0369a1 100%);
  padding: 1rem 1.25rem 1.1rem;
  text-align: center;
}

.lk-memorial-result-card .lk-result-name {
  color: #fff !important;
  font-family: var(--lk-font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.lk-memorial-result-card .lk-result-dates {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin: 0;
}

.lk-memorial-result-card .lk-result-dates i {
  color: var(--lk-accent);
  margin-right: 0.2rem;
}

.lk-memorial-result-card .lk-result-meta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
}

.lk-memorial-result-card .lk-result-card-footer {
  margin-top: auto;
}

.lk-results-header i {
  color: var(--lk-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.lk-memorial-result-card .card-footer {
  background: transparent;
  border-top: 1px solid var(--lk-border);
  padding: 12px 16px;
}

.lk-grave-result-card {
  transition: transform var(--lk-transition), box-shadow var(--lk-transition);
}

.lk-grave-result-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--lk-shadow-hover) !important;
}

.lk-quick-example {
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--lk-border);
  background: var(--lk-surface);
  color: var(--lk-primary);
  transition: all var(--lk-transition);
}

.lk-quick-example:hover {
  border-color: var(--lk-accent);
  background: var(--lk-accent-soft);
  color: var(--lk-primary);
}

/* ── Map page top bar ── */
.lk-map-hero-bar {
  padding: 24px 0;
  background: linear-gradient(180deg, #fff 0%, var(--lk-bg) 100%);
  border-bottom: 1px solid var(--lk-border);
}

.lk-map-hero-bar h1 {
  color: var(--lk-primary);
  font-family: var(--lk-font-sans);
  font-weight: 700;
}

/* ── Map view (grave locator results) ── */
.lk-map-page {
  padding: 32px 0 72px;
}

body.lk-public .lk-map-shell {
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  overflow: hidden;
  box-shadow: var(--lk-shadow-lg);
  background: var(--lk-surface);
}

body.lk-public .lk-map-shell .lk-map-head {
  background: linear-gradient(135deg, var(--lk-primary), var(--lk-primary-light));
  color: #fff;
  padding: 16px 20px;
}

body.lk-public .lk-map-shell .lk-map-head h2,
body.lk-public .lk-map-shell .lk-map-head h3 {
  color: #fff;
  font-family: var(--lk-font-sans);
  font-size: 1rem;
  margin: 0;
}

body.lk-public .lk-map-detail-panel {
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  overflow: hidden;
  box-shadow: var(--lk-shadow);
  background: var(--lk-surface);
  height: 100%;
}

body.lk-public .lk-map-detail-panel .lk-map-head {
  padding: 16px 20px;
}

body.lk-public .lk-map-detail-item {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--lk-border);
}

body.lk-public .lk-map-detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body.lk-public .lk-map-detail-item h4 {
  color: var(--lk-primary);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

body.lk-public .lk-map-detail-item p {
  color: var(--lk-text-muted);
  font-size: 0.9rem;
  margin: 0 0 0 28px;
}

body.lk-public .lk-map-detail-item i {
  color: var(--lk-accent);
}

.lk-map-container {
  height: min(520px, 58vh);
  width: 100%;
  min-height: 320px;
}

.lk-map-overlay-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  background: var(--lk-accent-text);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--lk-shadow);
}

.lk-map-overlay-btn:hover {
  background: var(--lk-accent-text-hover);
  color: #fff;
}

body.lk-public .lk-map-controls .btn-light {
  font-size: 0.8rem;
  font-weight: 600;
}

.map-search-input {
  margin-top: 10px;
  width: min(280px, 90vw) !important;
  border: 1px solid var(--lk-border) !important;
  border-radius: 50px !important;
  padding: 8px 14px !important;
}

@media (max-width: 991.98px) {
  .lk-map-container {
    height: 380px;
  }
}

/* Search Loading Overlay */
.search-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    flex-direction: column;
    pointer-events: none;
}

/* Only visible while HTMX search is in flight */
.search-loading-overlay.htmx-request {
    display: flex;
    pointer-events: auto;
}

/* Legacy .active — hide unless paired with htmx-request (prevents stuck overlay) */
.search-loading-overlay.active:not(.htmx-request) {
    display: none;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 2px solid #024269;
}

.loading-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.loading-spinner div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fd7e14;
    animation: loading-spinner 1.2s linear infinite;
}

.loading-spinner div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.loading-spinner div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
}

.loading-spinner div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
}

.loading-spinner div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
}

.loading-spinner div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
}

.loading-spinner div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
}

.loading-spinner div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
}

.loading-spinner div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
}

.loading-spinner div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
}

@keyframes loading-spinner {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.5);
    }
}

.loading-text {
    font-size: 18px;
    color: #024269;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.loading-dots {
    display: inline-block;
    margin-left: 5px;
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fd7e14;
    margin: 0 2px;
    animation: dot-pulse 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-pulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced Word-Count Based Story Styles */
.enhanced-paragraph {
    margin-bottom: 2rem;
    position: relative;
}

.first-enhanced {
    margin-top: 1rem;
}

.paragraph-wrapper {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.enhanced-paragraph:hover .paragraph-wrapper {
    border-left-color: #fd7e14;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.paragraph-text {
    line-height: 1.8 !important;
    color: #444 !important;
    font-size: 1.05rem !important;
    text-align: justify !important;
    margin: 0 !important;
    hyphens: auto;
    word-wrap: break-word;
}

.first-enhanced .paragraph-text::first-letter {
    initial-letter: 2;
    font-weight: bold;
    color: #024269;
    margin-right: 0.5rem;
    line-height: 1;
    float: left;
}

/* Enhanced Separators */
.enhanced-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.separator-content {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.separator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fd7e14;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

.separator-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.separator-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Custom color scheme */
:root {
    --primary-color: #024269;
    --secondary-color: #fd7e14;
    --light-color: #ffffff;
}

.bg-orange {
    background-color: var(--lk-accent-text) !important;
}

/* Memorial Profile Card */
.memorial-profile-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
}

/* Memorial Cards */
.memorial-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.75rem;
}

.memorial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(2, 66, 105, 0.15) !important;
}

/* Tab Styling */
.nav-tabs {
    border-bottom: 3px solid #e9ecef;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem 0.5rem 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(2, 66, 105, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: white;
    border-bottom: 3px solid var(--secondary-color);
}

/* Gallery Styling */
.gallery-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    border-radius: 0.75rem;
}

/* Keyboard-accessible thumbnail trigger (was a bare <img onclick>) */
.gallery-thumb-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 0.75rem;
}
.gallery-thumb-btn img {
    display: block;
    width: 100%;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(2, 66, 105, 0.8));
    color: white;
    padding: 1rem 0.5rem 0.5rem;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Card Enhancements */
.family-member-card,
.video-card {
    border: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.family-member-card:hover,
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Empty State Styling */
.empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
}

/* Candle Styles */
.candle-container {
    perspective: 1000px;
    display: inline-block;
}

.candle {
    position: relative;
    width: 60px;
    height: 120px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.candle-wick {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 10px;
    background: #8B4513;
    z-index: 3;
}

.candle-flame {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    background: linear-gradient(45deg, #FFD700, #FF4500, #FF6347);
    border-radius: 50% 50% 20% 20%;
    opacity: 0;
    filter: blur(1px);
    animation: flicker 2s infinite alternate;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.candle-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #FFF8DC, #F0E68C, #DAA520);
    border-radius: 10px 10px 5px 5px;
    box-shadow: inset 0 0 20px rgba(218, 165, 32, 0.3);
}

.candle-glaze {
    position: absolute;
    top: 10%;
    left: 20%;
    width: 60%;
    height: 30%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
    border-radius: 50%;
    animation: melt 10s infinite linear;
}

/* Small candles for display */
.candle-small {
    position: relative;
    width: 30px;
    height: 50px;
    margin: 0 auto 5px;
}

.candle-flame-small {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 10px;
    background: linear-gradient(45deg, #FFD700, #FF4500);
    border-radius: 50% 50% 20% 20%;
    filter: blur(0.5px);
    animation: smallFlicker 3s infinite alternate;
}

.candle-body-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #FFF8DC, #F0E68C);
    border-radius: 5px 5px 3px 3px;
    box-shadow: inset 0 0 10px rgba(218, 165, 32, 0.2);
}

/* Animations */
@keyframes flicker {
    0%, 100% {
        transform: translateX(-50%) scale(1) rotate(-2deg);
        opacity: 0.9;
    }
    25% {
        transform: translateX(-50%) scale(1.1) rotate(1deg);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scale(0.9) rotate(2deg);
        opacity: 0.8;
    }
    75% {
        transform: translateX(-50%) scale(1.05) rotate(-1deg);
        opacity: 0.95;
    }
}

@keyframes smallFlicker {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
}

@keyframes melt {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(10px) scale(1.1);
    }
    100% {
        transform: translateY(20px) scale(1.2);
        opacity: 0;
    }
}

/* Tribute Styles */
.tribute-item {
    transition: all 0.3s ease;
}

.tribute-item:hover {
    background-color: rgba(2, 66, 105, 0.02);
    margin-left: -5px;
    margin-right: -5px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 0.5rem;
}

.tribute-message {
    border-left: 4px solid #024269;
    transition: all 0.3s ease;
}

.tribute-message:hover {
    border-left-color: #fd7e14;
    background-color: rgba(253, 126, 20, 0.05);
}

.avatar-placeholder {
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .candle-container {
        transform: scale(0.8);
    }
    
    .tribute-item {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .paragraph-wrapper {
        padding: 1.25rem 1.5rem;
        margin: 0 0.5rem;
    }
    
    .enhanced-paragraph {
        margin-bottom: 1.5rem;
    }
    
    .paragraph-text {
        font-size: 1rem !important;
        text-align: left !important;
        line-height: 1.7 !important;
    }
    
    .loading-container {
        padding: 20px;
        margin: 20px;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loading-spinner div {
        width: 12px;
        height: 12px;
    }
}

/* Button animations */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Pagination Styles */
.tribute-pagination {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
}

.pagination {
    gap: 0.5rem;
}

.page-link {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #024269;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 2.5rem;
    text-align: center;
}

.page-link:hover {
    background-color: #024269;
    border-color: #024269;
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #024269, #0278ae);
    border-color: #024269;
    color: white;
    box-shadow: 0 2px 8px rgba(2, 66, 105, 0.3);
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    opacity: 0.6;
}

/* Tribute Statistics */
.tribute-stats {
    border: 1px solid rgba(2, 66, 105, 0.1);
    border-radius: 0.75rem;
}

.stat-number {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tribute Number Badge */
.tribute-number {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
}

/* Quick Jumper */
.quick-jumper {
    background: rgba(2, 66, 105, 0.03);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(2, 66, 105, 0.1);
}

.page-jumper {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.page-jumper:focus {
    border-color: #024269;
    box-shadow: 0 0 0 0.2rem rgba(2, 66, 105, 0.25);
}

/* Tribute Item Enhancements */
.tribute-item {
    transition: all 0.3s ease;
    position: relative;
}

.tribute-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, transparent, #fd7e14, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tribute-item:hover::before {
    opacity: 1;
}

.tribute-item:hover {
    background: linear-gradient(90deg, rgba(2, 66, 105, 0.02), transparent);
    margin-left: -5px;
    margin-right: -5px;
    padding-left: 15px;
    padding-right: 5px;
    border-radius: 0.5rem;
}

/* Loading State */
.tribute-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-link {
        padding: 0.375rem 0.5rem;
        min-width: 2rem;
        font-size: 0.875rem;
    }
    
    .tribute-stats .row > div {
        margin-bottom: 0.5rem;
    }
    
    .quick-jumper {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .tribute-pagination,
    .quick-jumper {
        display: none;
    }
    
    .tribute-item {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* ── Explore v2: loading, results, memorial sidebar ── */
.lk-explore-loading {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.lk-explore-loading.htmx-request,
.lk-explore-loading.active {
  display: flex;
  pointer-events: auto;
}

.lk-explore-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.75rem 2rem;
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
  border: 1px solid var(--lk-border);
  box-shadow: var(--lk-shadow-lg);
  min-width: 220px;
}

.lk-explore-loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lk-primary);
  margin: 0;
}

.lk-explore-inline-loading {
  display: none;
  margin-bottom: 1rem;
}

.lk-explore-inline-loading.htmx-request {
  display: block;
  animation: lk-explore-fade-in 0.25s ease;
}

.lk-explore-inline-loading-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(2, 66, 105, 0.06);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lk-primary);
}

.lk-explore-results.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@keyframes lk-explore-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.lk-explore-results-inner {
  animation: lk-explore-fade-in 0.35s ease;
}

.lk-explore-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lk-explore-results-title {
  font-family: var(--lk-font-sans);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--lk-primary);
  margin: 0.35rem 0 0;
}

.lk-explore-results-meta {
  color: var(--lk-text-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.lk-explore-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--lk-accent-soft);
  color: var(--lk-primary);
  font-size: 0.95em;
}

.lk-shop-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lk-accent);
  margin: 0;
}

.lk-explore-result-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--lk-transition), box-shadow var(--lk-transition), border-color var(--lk-transition);
}

.lk-explore-result-card:hover,
.lk-explore-result-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--lk-shadow-hover);
  border-color: rgba(2, 66, 105, 0.2);
  outline: none;
}

.lk-explore-result-media {
  aspect-ratio: 4 / 3;
  background: var(--lk-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lk-explore-result-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lk-explore-result-ph {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--lk-primary);
  background: rgba(2, 66, 105, 0.08);
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(2, 66, 105, 0.12);
}

.lk-explore-result-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.lk-explore-result-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lk-primary);
  margin: 0;
  line-height: 1.3;
}

.lk-explore-result-dates {
  font-size: 0.85rem;
  color: var(--lk-text-muted);
  margin: 0;
}

.lk-explore-result-dates i {
  color: var(--lk-accent);
  margin-right: 0.2rem;
}

.lk-explore-result-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lk-primary);
  background: var(--lk-bg);
  border: 1px solid var(--lk-border);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.lk-explore-result-cta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lk-accent);
}

.lk-explore-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-bg);
}

.lk-explore-empty i {
  font-size: 2rem;
  color: var(--lk-accent);
  margin-bottom: 0.75rem;
  display: block;
}

.lk-explore-empty h3 {
  color: var(--lk-primary);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.lk-explore-empty p {
  color: var(--lk-text-muted);
  max-width: 420px;
  margin: 0 auto;
  font-size: 0.92rem;
}

.lk-explore-memorial-wrap {
  padding-bottom: 2rem;
}

.lk-explore-memorial-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.lk-explore-toolbar {
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
}

.lk-explore-toolbar .form-control {
  border-radius: 50px 0 0 50px;
}

.lk-explore-toolbar .lk-btn-accent {
  border-radius: 0 50px 50px 0;
}

.lk-memorial-sidebar-col {
  border-right: 1px solid var(--lk-border);
}

.lk-memorial-sidebar {
  padding: 1.75rem 1.5rem;
  height: 100%;
  background: linear-gradient(180deg, var(--lk-bg) 0%, var(--lk-surface) 100%);
  text-align: center;
}

.lk-memorial-avatar {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(2, 66, 105, 0.15);
  margin-bottom: 1rem;
}

.lk-memorial-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lk-bg-alt);
  color: var(--lk-primary);
  font-size: 3.5rem;
}

.lk-memorial-sidebar h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--lk-primary);
  margin-bottom: 1rem;
}

.lk-memorial-sidebar-dates {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.lk-memorial-sidebar-dates strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lk-text-muted);
  margin-bottom: 0.15rem;
}

.lk-memorial-sidebar-dates span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lk-primary);
}

.lk-memorial-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lk-memorial-stats li {
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  background: var(--lk-surface);
  border: 1px solid var(--lk-border);
}

.lk-memorial-stats li i {
  display: block;
  font-size: 1.1rem;
  color: var(--lk-accent);
  margin-bottom: 0.15rem;
}

.lk-memorial-stats li strong {
  display: block;
  font-size: 1rem;
  color: var(--lk-primary);
}

.lk-memorial-stats li small {
  font-size: 0.72rem;
  color: var(--lk-text-muted);
}

@media (max-width: 991.98px) {
  .lk-memorial-sidebar-col {
    border-right: none;
    border-bottom: 1px solid var(--lk-border);
  }
}

/* ── Public grave locator (/searchdeceased/) ── */
.lk-grave-locator-page {
  padding-bottom: 64px;
}

.lk-grave-form-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 1.35rem 1.25rem;
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
  box-shadow: var(--lk-shadow);
}

.lk-grave-alert {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.lk-grave-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--lk-primary);
  margin-bottom: 0.45rem;
}

.lk-grave-input-group .form-control {
  border-radius: 50px 0 0 50px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  border-right: 0;
}

.lk-grave-input-group .lk-btn-accent {
  border-radius: 0 50px 50px 0;
  padding: 0.65rem 1.15rem;
  white-space: nowrap;
}

.lk-grave-error {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #b42318;
}

.lk-grave-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--lk-text-muted);
  line-height: 1.45;
}

.lk-grave-type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--lk-border);
}

.lk-grave-type-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lk-text-muted);
}

.lk-grave-type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lk-grave-type-pill {
  position: relative;
}

.lk-grave-type-pill input,
.lk-grave-type-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.lk-grave-type-pill label {
  display: inline-block;
  margin: 0;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--lk-border);
  background: var(--lk-bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lk-primary);
  cursor: pointer;
  transition: border-color var(--lk-transition), background var(--lk-transition), color var(--lk-transition);
}

.lk-grave-type-pill input:checked + label,
.lk-grave-type-pill input:focus-visible + label {
  border-color: var(--lk-accent);
  background: var(--lk-accent-soft);
  color: var(--lk-primary);
}

.lk-grave-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.lk-grave-quick-label {
  font-size: 0.78rem;
  color: var(--lk-text-muted);
  margin-right: 0.15rem;
}

.lk-grave-quick-chip {
  border: 1px solid var(--lk-border);
  background: var(--lk-surface);
  color: var(--lk-primary);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--lk-transition), background var(--lk-transition);
}

.lk-grave-quick-chip:hover {
  border-color: var(--lk-accent);
  background: var(--lk-accent-soft);
}

.lk-grave-form-foot {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--lk-border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--lk-text-muted);
}

.lk-grave-form-foot a {
  font-weight: 600;
  color: var(--lk-primary);
  text-decoration: none;
}

.lk-grave-form-foot a:hover {
  color: var(--lk-accent);
}

.lk-explore-story-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lk-primary);
  border-bottom: 2px solid var(--lk-accent);
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
}

.lk-explore-story-empty {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Public grave locator results (/searchdeceased/) ── */
.lk-grave-results-page {
  padding-bottom: 64px;
}

.lk-grave-results-hero {
  padding: 100px 0 1.5rem;
  background: linear-gradient(180deg, #fff 0%, var(--lk-bg) 100%);
  border-bottom: 1px solid var(--lk-border);
}

.lk-grave-results-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.lk-grave-results-hero h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--lk-primary);
  margin: 0.5rem 0 0.35rem;
}

.lk-grave-results-lead {
  margin: 0;
  color: var(--lk-text-muted);
  font-size: 0.95rem;
}

.lk-grave-results-section {
  padding: 1.5rem 0 0;
}

.lk-grave-results-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--lk-surface);
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius);
  font-weight: 600;
  color: var(--lk-primary);
}

.lk-grave-results-summary i {
  color: var(--lk-accent);
  font-size: 1.15rem;
}

.lk-grave-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
  overflow: hidden;
}

.lk-grave-result-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--lk-border);
}

.lk-grave-result-row:last-child {
  border-bottom: none;
}

.lk-grave-result-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--lk-border);
  grid-row: 1 / 3;
}

.lk-grave-result-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lk-bg-alt);
  color: var(--lk-primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.lk-grave-result-info h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--lk-primary);
  line-height: 1.3;
}

.lk-grave-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--lk-text-muted);
}

.lk-grave-result-meta i {
  color: var(--lk-accent);
}

.lk-grave-result-site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin: 0.45rem 0 0;
}

.lk-grave-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lk-grave-result-badge--ok {
  background: rgba(25, 135, 84, 0.1);
  color: #157347;
}

.lk-grave-result-badge--muted {
  background: var(--lk-bg);
  color: var(--lk-text-muted);
  border: 1px solid var(--lk-border);
}

.lk-grave-result-park {
  font-size: 0.8rem;
  color: var(--lk-text-muted);
}

.lk-grave-result-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.35rem;
}

.lk-grave-result-form {
  margin: 0;
}

.lk-grave-results-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

.lk-grave-results-empty i {
  display: block;
  font-size: 2rem;
  color: var(--lk-accent);
  margin-bottom: 0.75rem;
}

.lk-grave-results-empty h3 {
  color: var(--lk-primary);
  font-size: 1.1rem;
}

.lk-grave-results-empty p {
  color: var(--lk-text-muted);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .lk-grave-result-row {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .lk-grave-result-thumb {
    grid-row: 1;
  }

  .lk-grave-result-actions {
    grid-column: 3;
    grid-row: 1;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0;
    min-width: 148px;
  }

  .lk-grave-result-actions .lk-btn-sm {
    justify-content: center;
    white-space: nowrap;
  }
}

@media (min-width: 992px) {
  .lk-grave-result-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 320px;
    justify-content: flex-end;
  }
}

/* ── Memorial tributes & candles (explore pages) ── */
.lk-mem-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.1rem 0.45rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--lk-accent-soft);
  color: var(--lk-primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.memorial-tabs .nav-link.active .lk-mem-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lk-mem-tributes-card {
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
  overflow: hidden;
  box-shadow: var(--lk-shadow-sm);
}

.lk-mem-tributes-card-head {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--lk-primary), var(--lk-primary-light));
  color: #fff;
}

.lk-mem-tributes-card-head--accent {
  background: linear-gradient(135deg, var(--lk-primary-light), var(--lk-primary));
}

.lk-mem-tributes-card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lk-mem-tributes-card-body {
  padding: 1rem;
}

.lk-mem-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lk-primary);
}

.lk-mem-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #b42318;
}

.lk-mem-candle-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lk-accent-soft);
  color: var(--lk-accent);
  font-size: 1.5rem;
}

.lk-mem-candle-submit:hover {
  border-color: var(--lk-accent);
  background: var(--lk-accent-soft);
}

.lk-mem-signin-icon {
  font-size: 2rem;
  color: var(--lk-accent);
}

.lk-mem-signin-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--lk-primary);
  margin: 0.75rem 0 0.35rem;
}

.lk-mem-signin-text {
  font-size: 0.85rem;
  color: var(--lk-text-muted);
  margin-bottom: 1rem;
}

.lk-mem-tributes-panel {
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-surface);
  overflow: hidden;
}

.lk-mem-tributes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--lk-border);
  background: var(--lk-bg);
}

.lk-mem-tributes-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lk-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lk-mem-tributes-panel-head h3 i {
  color: var(--lk-accent);
}

.lk-mem-count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--lk-accent-soft);
  color: var(--lk-primary);
}

.lk-mem-feed {
  list-style: none;
  margin: 0;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.lk-mem-feed--candles {
  max-height: min(240px, 38vh);
}

.lk-mem-feed-item {
  padding: 0.75rem 0.85rem;
  background: var(--lk-bg-alt);
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius);
  font-size: 0.88rem;
  line-height: 1.55;
}

.lk-mem-feed-item p {
  margin: 0.35rem 0 0;
  color: var(--lk-text-muted);
}

.lk-mem-feed-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--lk-text-muted);
}

.lk-mem-feed-meta strong {
  color: var(--lk-primary);
  font-weight: 600;
}

.lk-mem-feed-item--candle {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.lk-mem-candle-icon {
  color: var(--lk-accent);
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.lk-mem-feed-item--tribute {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.lk-mem-tribute-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lk-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.lk-mem-tribute-body {
  flex: 1;
  min-width: 0;
}

.lk-mem-tribute-author {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.lk-mem-tribute-message {
  margin-top: 0.4rem;
  color: var(--lk-text-muted);
  white-space: pre-line;
  word-break: break-word;
}

.lk-mem-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--lk-bg);
  border: 1px solid var(--lk-border);
  color: var(--lk-text-muted);
}

.lk-mem-pill--ok {
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.25);
  color: #157347;
}

.lk-mem-muted {
  color: var(--lk-text-muted);
  font-style: italic;
}

.lk-mem-feed-hint {
  margin: 0;
  padding: 0.5rem 1rem 0.65rem;
  font-size: 0.75rem;
  color: var(--lk-text-muted);
  border-top: 1px solid var(--lk-border);
  background: var(--lk-bg);
}

.lk-mem-feed-hint i {
  color: var(--lk-accent);
  margin-right: 0.2rem;
}

.lk-mem-empty {
  text-align: center;
  padding: 2rem 1rem;
}

.lk-mem-empty i {
  font-size: 2rem;
  color: var(--lk-accent);
  display: block;
  margin-bottom: 0.5rem;
}

.lk-mem-empty h4 {
  color: var(--lk-primary);
  font-size: 1rem;
}

.lk-mem-empty p {
  color: var(--lk-text-muted);
  font-size: 0.88rem;
  margin: 0;
}

.lk-mem-feed::-webkit-scrollbar {
  width: 6px;
}

.lk-mem-feed::-webkit-scrollbar-thumb {
  background: rgba(2, 66, 105, 0.22);
  border-radius: 999px;
}

.lk-mem-pagination {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--lk-border);
  background: var(--lk-bg);
}

.lk-mem-pagination-meta {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  color: var(--lk-text-muted);
  text-align: center;
}

.lk-mem-pagination-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lk-mem-page-btn,
.lk-mem-page-num {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--lk-border);
  background: var(--lk-surface);
  color: var(--lk-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.lk-mem-page-btn:hover,
.lk-mem-page-num:hover {
  border-color: var(--lk-accent);
  background: var(--lk-accent-soft);
  color: var(--lk-primary);
}

.lk-mem-page-num--current {
  background: var(--lk-primary);
  border-color: var(--lk-primary);
  color: #fff;
}

.lk-mem-page-btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.lk-mem-page-ellipsis {
  padding: 0 0.25rem;
  color: var(--lk-text-muted);
}

.lk-mem-page-jumper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--lk-text-muted);
}

.lk-mem-page-jumper select {
  width: auto;
  min-width: 4rem;
}

.memorial-tabs .nav-tabs .nav-link.active {
  color: var(--lk-primary);
  border-bottom-color: var(--lk-accent);
}

@media (max-width: 575.98px) {
  .lk-grave-form-card {
    padding: 1.15rem 1rem;
  }

  .lk-grave-input-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .lk-grave-input-group .form-control,
  .lk-grave-input-group .lk-btn-accent {
    border-radius: 50px;
    width: 100%;
    border-right: 1px solid var(--lk-border);
  }

  .lk-grave-input-group .lk-btn-accent {
    justify-content: center;
  }
}

/* ── Memorial detail — mobile polish (explore /searchdeceased/) ── */
.gallery-image-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

@media (max-width: 767.98px) {
  .memorial-profile-card {
    border-radius: var(--lk-radius-lg);
    overflow: hidden;
  }

  .memorial-profile-card .card-body {
    padding: 0;
  }

  .lk-memorial-sidebar {
    padding: 1.25rem 1rem;
  }

  .lk-memorial-avatar {
    width: 120px;
    height: 120px;
  }

  .lk-memorial-sidebar-dates {
    flex-direction: column;
    gap: 0.65rem;
  }

  .lk-memorial-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .lk-memorial-stats li {
    padding: 0.5rem 0.35rem;
  }

  .lk-memorial-stats li strong {
    font-size: 0.9rem;
  }

  .lk-memorial-stats li small {
    font-size: 0.68rem;
  }

  .memorial-tabs .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--lk-border);
    gap: 0;
    padding-bottom: 2px;
  }

  .memorial-tabs .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .memorial-tabs .nav-tabs .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
  }

  .lk-mem-tab-count {
    margin-left: 0.25rem;
    min-width: 1.15rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.65rem;
  }

  .gallery-caption {
    opacity: 1;
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .gallery-item:hover {
    transform: none;
  }

  #gallery-container .col-6 {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

@media (max-width: 575.98px) {
  .lk-explore-memorial-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  .lk-memorial-stats li i {
    font-size: 0.95rem;
  }

  .memorial-tabs .nav-tabs .nav-link {
    font-size: 0.78rem;
    padding: 0.5rem 0.6rem;
  }

  .memorial-tabs .nav-tabs .nav-link i {
    display: none;
  }
}

/* ── QR scan page ── */
.lk-scan-page {
  padding-bottom: 3rem;
}

.lk-scan-card {
  padding: 1.5rem;
}

.lk-scan-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.5rem 1rem;
  margin-bottom: 0.75rem;
  border: 2px dashed var(--lk-border);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-bg-alt);
  text-align: center;
  cursor: pointer;
}

.lk-scan-upload-label i {
  font-size: 2rem;
  color: var(--lk-accent);
}

.lk-scan-upload-label span {
  font-weight: 700;
  color: var(--lk-primary);
}

.lk-scan-upload-label small {
  color: var(--lk-text-muted);
  font-size: 0.8rem;
}

.lk-scan-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--lk-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lk-scan-divider::before,
.lk-scan-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--lk-border);
}

@media (max-width: 575.98px) {
  .lk-scan-card {
    padding: 1.15rem;
  }

  .lk-scan-upload-label {
    padding: 1.25rem 0.75rem;
  }
}
