/* assets/css/style.css */
:root {
    --apple-bg: #f3f3f3;
    --apple-card: #FFFFFF;
    --apple-accent: #e62875;
    --apple-accent-hover: #c91d63;
    --apple-success: #34C759;
    --apple-error: #FF3B30;
    --apple-warning: #fec455;
    --apple-text: #191919;
    --apple-text-secondary: #666666;
    --apple-border: rgba(25, 25, 25, 0.1);
    --apple-radius-large: 18px;
    --apple-radius-small: 12px;
    --apple-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --apple-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
    --bs-primary: #e62875;
    --bs-primary-rgb: 230, 40, 117;
    --bs-link-color: #e62875;
    --bs-link-hover-color: #c91d63;
}

/* Unify Bootstrap primary utilities with QueFachiamo Index Palette */
.text-primary { color: var(--apple-accent) !important; }
.bg-primary { background-color: var(--apple-accent) !important; }
.bg-primary-subtle { background-color: rgba(230, 40, 117, 0.12) !important; color: var(--apple-accent) !important; }
.btn-primary { background-color: var(--apple-accent) !important; border-color: var(--apple-accent) !important; }
.btn-outline-primary { color: var(--apple-accent) !important; border-color: var(--apple-accent) !important; }
.btn-outline-primary:hover, .btn-check:checked + .btn-outline-primary { background-color: var(--apple-accent) !important; border-color: var(--apple-accent) !important; color: #ffffff !important; }
.form-check-input:checked { background-color: var(--apple-accent) !important; border-color: var(--apple-accent) !important; }

body {
    background-color: var(--apple-bg);
    color: var(--apple-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Glassmorphism sidebar */
.apple-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--apple-border);
    padding: 24px;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.apple-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--apple-text);
    text-decoration: none;
    margin-bottom: 30px;
}

.apple-sidebar-logo i {
    color: var(--apple-accent);
}

.apple-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apple-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--apple-text);
    text-decoration: none;
    border-radius: var(--apple-radius-small);
    font-weight: 500;
    transition: all 0.2s ease;
}

.apple-sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--apple-accent);
}

.apple-sidebar-link.active {
    background: var(--apple-accent);
    color: #FFFFFF;
}

/* Main Content Area */
.apple-main-content {
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
    transition: margin 0.3s ease;
}

/* Mobile Top Nav */
.apple-mobile-top-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--apple-border);
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Bottom Navigation (iOS Style) */
.apple-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--apple-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.apple-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--apple-text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    width: 20%;
    height: 100%;
    transition: color 0.2s ease;
}

.apple-bottom-link:hover, .apple-bottom-link.active {
    color: var(--apple-accent);
}

.apple-bottom-link i {
    font-size: 1.4rem;
}

/* Adjust main content margins for mobile */
@media (max-width: 767.98px) {
    .apple-main-content {
        margin-left: 0;
        padding: 20px;
        padding-bottom: 90px; /* offset for bottom nav */
    }
}

/* Cards and UI Elements */
.apple-card {
    background: var(--apple-card);
    border-radius: var(--apple-radius-large);
    border: 1px solid var(--apple-border);
    box-shadow: var(--apple-shadow);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

.apple-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--apple-shadow-hover);
}

.apple-btn {
    border-radius: var(--apple-radius-large);
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.apple-btn-primary {
    background-color: var(--apple-accent);
    color: #FFFFFF;
}

.apple-btn-primary:hover {
    background-color: var(--apple-accent-hover);
    color: #FFFFFF;
}

.apple-btn-secondary {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--apple-text);
}

.apple-btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.apple-btn-danger {
    background-color: var(--apple-error);
    color: #FFFFFF;
}

.apple-btn-danger:hover {
    background-color: #D32F2F;
    color: #FFFFFF;
}

.apple-input {
    border-radius: var(--apple-radius-small);
    border: 1px solid var(--apple-border);
    padding: 10px 14px;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.apple-input:focus {
    background-color: var(--apple-card);
    border-color: var(--apple-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Apple-style floating toast notifications */
.apple-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.apple-toast {
    pointer-events: auto;
    width: 320px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--apple-radius-large);
    border-left: 5px solid var(--apple-accent);
    border-top: 1px solid rgba(255,255,255,0.3);
    border-right: 1px solid var(--apple-border);
    border-bottom: 1px solid var(--apple-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

.apple-toast.toast-error {
    border-left-color: var(--apple-error);
}

.apple-toast.toast-success {
    border-left-color: var(--apple-success);
}

.apple-toast.toast-warning {
    border-left-color: var(--apple-warning);
}

.apple-toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.apple-toast.toast-success .apple-toast-icon {
    color: var(--apple-success);
}

.apple-toast.toast-error .apple-toast-icon {
    color: var(--apple-error);
}

.apple-toast-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--apple-text);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Category Filter Pills */
.apple-filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 10px 0;
    margin-bottom: 24px;
    scrollbar-width: none; /* Firefox */
}

.apple-filter-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.apple-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 9999px;
    background-color: var(--apple-card);
    border: 1px solid var(--apple-border);
    color: var(--apple-text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.apple-filter-pill:hover {
    color: var(--apple-text);
    background-color: rgba(0, 0, 0, 0.03);
}

.apple-filter-pill:active {
    transform: scale(0.96);
}

.apple-filter-pill.active,
button.apple-filter-pill.active {
    background-color: var(--apple-text);
    color: #FFFFFF;
    border-color: var(--apple-text);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

button.apple-filter-pill {
    background-color: var(--apple-card);
    outline: none;
}

button.apple-filter-pill:focus,
button.apple-filter-pill:active {
    outline: none;
}

@media (max-width: 767.98px) {
    .apple-filter-container {
        margin-left: -20px;
        margin-right: -20px;
        padding: 2px 20px 8px 20px;
        margin-bottom: 16px;
        gap: 8px;
        scroll-snap-type: x proximity;
    }

    .apple-filter-pill {
        min-height: 44px;
        padding: 8px 14px;
        font-size: 0.85rem;
        scroll-snap-align: start;
    }

    .map-filters-wrapper .apple-filter-container {
        margin-bottom: 6px;
    }
}

/* Rating Stars */
.rating-stars {
    color: #FF9500;
    font-size: 0.95rem;
    display: inline-flex;
    gap: 2px;
}

/* Visited toggle switch styling */
.form-switch .form-check-input {
    border-radius: 2em;
    height: 1.5em;
    width: 2.7em;
    cursor: pointer;
}

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

/* Map page full screen */
.map-container {
    height: calc(100vh - 200px);
    border-radius: var(--apple-radius-large);
    overflow: hidden;
    border: 1px solid var(--apple-border);
    box-shadow: var(--apple-shadow);
}

@media (max-width: 767.98px) {
    .map-container {
        height: calc(100vh - 240px);
    }
}

/* Place Image Card cover */
.place-card-img-container {
    margin: 0 0 16px 0;
    height: 160px;
    overflow: hidden;
    border-bottom: 1px solid var(--apple-border);
    position: relative;
    background: #E5E5EA;
}

.place-card-img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.place-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--apple-text);
    border: 1px solid var(--apple-border);
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visited-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--apple-success);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pending-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--apple-warning);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dislike-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 59, 48, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rating-stars-personal {
    color: var(--apple-accent);
    font-size: 0.95rem;
    display: inline-flex;
    gap: 2px;
}

/* Floating Plus Button for Mobile */
.floating-add-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background-color: var(--apple-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
    z-index: 1020;
    border: none;
    transition: transform 0.2s;
    text-decoration: none;
}

.floating-add-btn:hover {
    transform: scale(1.05);
    color: white;
}

/* --- High-end Premium Split Auth Layout --- */
.auth-split-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 2000;
    background-color: #FFFFFF;
}

.auth-split-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #FFFFFF;
    height: 100%;
}

.auth-split-left-inner {
    width: 100%;
    max-width: 340px;
    animation: authLeftFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authLeftFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-split-right {
    flex: 1.25;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.auth-split-right-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0071E3 0%, #34C759 100%);
    z-index: 1;
}

.auth-split-right-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    z-index: 2;
}

.auth-split-right-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
}

/* Floating Glassmorphic Mock Map Card */
.floating-map-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: perspective(800px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.5s ease;
    animation: floatCard 6s ease-in-out infinite alternate;
}

.floating-map-card:hover {
    transform: perspective(800px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

@keyframes floatCard {
    0% {
        transform: perspective(800px) rotateY(-8deg) rotateX(4deg) translateY(0);
    }
    100% {
        transform: perspective(800px) rotateY(-4deg) rotateX(2deg) translateY(-15px);
    }
}

.map-icon-bullet {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.1rem;
}

.xs-text {
    font-size: 0.75rem;
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Mock Map Background */
.mock-map-bg {
    height: 140px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mock-map-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px, 40px 40px, 40px 40px;
    transform: rotate(15deg);
}

.mock-map-pin {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: #0071E3;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    top: 45%;
    left: 40%;
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.5);
}

.mock-map-pin.pulse-animation::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid #0071E3;
    animation: pinPulse 2s infinite ease-out;
}

@keyframes pinPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

.mock-map-pin-label {
    position: absolute;
    background: #FFFFFF;
    color: #1D1D1F;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 8px;
    top: 35%;
    left: 48%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    animation: labelFloat 4s ease-in-out infinite alternate;
}

@keyframes labelFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-5px);
    }
}

.floating-text-block {
    animation: textFadeIn 0.8s ease-out forwards;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo-circle {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.04);
}

.auth-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.auth-title {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--apple-text);
}

.auth-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--apple-text-secondary);
}

/* Custom modern inputs with icons */
.form-group-apple {
    position: relative;
}

.input-wrapper-apple {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-apple {
    position: absolute;
    left: 16px;
    color: var(--apple-text-secondary);
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 5;
}

.input-wrapper-apple .apple-input {
    padding-left: 48px !important;
    background-color: rgba(0,0,0,0.035);
    border: 1px solid rgba(0,0,0,0.06);
    height: 48px;
    font-size: 0.95rem;
}

.input-wrapper-apple .apple-input:focus ~ .input-icon-apple {
    color: var(--apple-accent);
}

.htmx-indicator {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
    display: flex !important;
    opacity: 1;
}

/* iOS Install Prompt Banner */
.ios-install-prompt {
    position: fixed;
    bottom: 86px; /* Adjusted to sit above mobile bottom nav */
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--apple-border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1080;
    animation: slideUpPrompt 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 768px) {
    .ios-install-prompt {
        bottom: 24px;
        right: 24px;
        left: auto;
        width: 320px;
    }
}

@keyframes slideUpPrompt {
    from {
        transform: translateY(120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ios-prompt-app-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ios-prompt-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-close-apple {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--apple-text-secondary);
    padding: 0;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-close-apple:hover {
    color: var(--apple-text);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile Responsive Form & Card Adaptations */
.apple-switch-card {
    background-color: rgba(0, 0, 0, 0.025);
    border: 1px solid var(--apple-border);
    transition: background-color 0.2s ease;
}

.apple-switch-card:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

@media (max-width: 767.98px) {
    .apple-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .apple-btn {
        padding: 10px 16px;
    }
}

/* Apple Segmented Control */
.apple-segmented-control {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.06);
    padding: 3px;
    border-radius: 12px;
    gap: 2px;
}

.apple-segment {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--apple-text-secondary, #86868B);
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.apple-segment.active {
    background: #FFFFFF;
    color: var(--apple-text, #1D1D1F);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767.98px) {
    .apple-segmented-control {
        display: flex;
        width: 100%;
        padding: 4px;
        border-radius: 14px;
    }

    .apple-segment {
        flex: 1;
        justify-content: center;
        text-align: center;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 10px;
    }
}

/* Ranking Position Badges */
.ranking-position-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ranking-position-badge.rank-1 {
    background: rgba(255, 204, 0, 0.22);
    color: #B27B00;
}

.ranking-position-badge.rank-2 {
    background: rgba(142, 142, 147, 0.2);
    color: #48484A;
}

.ranking-position-badge.rank-3 {
    background: rgba(205, 127, 50, 0.2);
    color: #8B4513;
}

.ranking-position-badge.rank-other {
    background: rgba(0, 0, 0, 0.05);
    color: #6E6E73;
}

.apple-toast.toast-warning .apple-toast-icon {
    color: #FF9F0A;
}

/* Mobile-Only "Descubrí" Floating Button & Roulette */
.mobile-discover-btn {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    background: linear-gradient(135deg, #0071E3, #5856D6);
    color: #FFFFFF;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    min-height: 44px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.discover-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.discover-modal-card {
    background: #FFFFFF;
    border-radius: 22px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.roulette-viewport {
    position: relative;
    overflow: hidden;
    background: #F5F5F7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    height: 76px;
    display: flex;
    align-items: center;
}

.roulette-pointer {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #0071E3;
    z-index: 5;
    transform: translateX(-50%);
}

.roulette-track {
    display: flex;
    align-items: center;
    will-change: transform;
}

.roulette-item {
    width: 170px;
    flex-shrink: 0;
    padding: 10px 12px;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

/* Public Disruptive Landing Page */
.public-landing-wrapper {
    background: #F5F5F7;
    min-height: 100vh;
}

.public-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.public-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 245, 247, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.public-nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1D1D1F;
    text-decoration: none;
}

.public-brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.public-nav-link {
    color: #515154;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
}

.public-nav-link:hover {
    color: #0071E3;
}

.public-hero {
    padding: 56px 0 40px;
}

.public-pill-badge {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1D1D1F;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.public-hero-title {
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #1D1D1F;
}

.text-gradient-apple {
    background: linear-gradient(135deg, #0071E3 0%, #5856D6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.public-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #515154;
}

.public-glass-showcase {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.public-showcase-card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 14px;
}

.public-showcase-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.public-section {
    padding: 48px 0;
}

.public-feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.public-footer {
    padding: 32px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFFFFF;
    margin-top: 32px;
}

/* AI Community Search */
.ai-avatar-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0071E3, #5AC8FA);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.25);
}

.ai-quick-banner {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 113, 227, 0.16);
}

.ai-summary-card {
    background: linear-gradient(180deg, rgba(0, 113, 227, 0.04) 0%, #FFFFFF 100%);
    border: 1px solid rgba(0, 113, 227, 0.15);
}

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: block;
}

/* =========================================================
   THEME TOGGLE & DARK MODE (Apple Human Interface Dark)
   ========================================================= */
.btn-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--apple-border);
    background: var(--apple-card);
    color: var(--apple-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-theme-toggle:hover {
    border-color: var(--apple-accent);
    color: var(--apple-accent);
}

[data-theme="dark"] {
    --apple-bg: #191919;
    --apple-card: #202024;
    --apple-text: #f3f3f3;
    --apple-text-secondary: #a1a1aa;
    --apple-border: rgba(255, 255, 255, 0.12);
    --apple-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    --apple-shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

[data-theme="dark"] body {
    background-color: var(--apple-bg);
    color: var(--apple-text);
}

[data-theme="dark"] .apple-sidebar {
    background: rgba(28, 28, 30, 0.88);
    border-right-color: var(--apple-border);
}

[data-theme="dark"] .apple-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .apple-mobile-top-nav,
[data-theme="dark"] .apple-bottom-nav {
    background: rgba(28, 28, 30, 0.9);
    border-color: var(--apple-border);
}

[data-theme="dark"] .apple-card,
[data-theme="dark"] .place-card,
[data-theme="dark"] .modal-content {
    background-color: var(--apple-card);
    border-color: var(--apple-border);
    color: var(--apple-text);
}

[data-theme="dark"] .apple-input,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #2C2C2E;
    border-color: rgba(255, 255, 255, 0.14);
    color: #F5F5F7;
}

[data-theme="dark"] .apple-input::placeholder,
[data-theme="dark"] .form-control::placeholder {
    color: #8E8E93;
}

[data-theme="dark"] .apple-btn-secondary {
    background-color: #2C2C2E;
    color: #F5F5F7;
    border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .apple-btn-secondary:hover {
    background-color: #3A3A3C;
    color: #FFFFFF;
}

[data-theme="dark"] .apple-filter-pill {
    background-color: #2C2C2E;
    color: #F5F5F7;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .apple-filter-pill.active,
[data-theme="dark"] button.apple-filter-pill.active {
    background-color: #FFFFFF;
    color: #1D1D1F;
    border-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .apple-segmented-control {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .apple-segment {
    color: #98989D;
}

[data-theme="dark"] .apple-segment.active {
    background: #3A3A3C;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .apple-switch-card {
    background-color: #2C2C2E !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .bg-light {
    background-color: #2C2C2E !important;
    color: #F5F5F7 !important;
}

[data-theme="dark"] .text-dark {
    color: #F5F5F7 !important;
}

[data-theme="dark"] .text-muted {
    color: #98989D !important;
}

[data-theme="dark"] .table {
    --bs-table-color: #F5F5F7;
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ai-quick-banner,
[data-theme="dark"] .ai-summary-card {
    background: rgba(28, 28, 30, 0.92);
    border-color: rgba(0, 113, 227, 0.35);
}

[data-theme="dark"] .apple-toast {
    background: rgba(44, 44, 46, 0.92);
    color: #F5F5F7;
    border-color: rgba(255, 255, 255, 0.14);
}

/* Story Multi-Photo Upload Preview Grid */
.story-upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
}

.story-upload-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--apple-border);
}

.story-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-upload-thumb span {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
}

/* Public Shareable Story Landing (/salida/{token}) */
.story-landing-wrapper {
    min-height: 100vh;
}

.story-hero {
    position: relative;
    overflow: hidden;
    min-height: 52vh;
    background-color: #191919;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-top: calc(96px + env(safe-area-inset-top));
    padding-bottom: 18px;
}

.story-hero-title {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.lj-story-panel {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(25, 25, 25, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    color: var(--lj-text, #191919);
}

[data-theme="dark"] .lj-story-panel {
    background: #1e1e22;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    color: #f3f3f3;
}

[data-theme="dark"] .lj-story-panel .text-muted {
    color: #a1a1aa !important;
}

.story-diary-body {
    white-space: normal;
    line-height: 1.85;
    font-size: 1rem;
}

.story-public-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.story-gallery-item {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0 #e62875;
}

.story-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-gallery-index {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(25, 25, 25, 0.78);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

/* =========================================================
   PUBLIC EDITORIAL INDEX (Inspired by lady-j.it colors, fonts & movements)
   ========================================================= */
.lj-landing {
    --lj-bg: #f3f3f3;
    --lj-dark: #191919;
    --lj-accent: #e62875;
    --lj-amber: #fec455;
    --lj-text: #191919;
    --lj-muted: #666666;
    font-family: 'Montserrat', sans-serif;
    background: var(--lj-bg);
    color: var(--lj-text);
    overflow-x: hidden;
}

[data-theme="dark"] .lj-landing {
    --lj-bg: #141416;
    --lj-text: #f3f3f3;
    --lj-muted: #a1a1aa;
}

.lj-landing ::selection {
    background: #191919;
    color: #f3f3f3;
}

.lj-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 1040;
    padding: calc(12px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 12px;
    background: rgba(25, 25, 25, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), top 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease, box-shadow 0.35s ease;
}

.lj-header.is-scrolled {
    top: calc(10px + env(safe-area-inset-top));
    width: calc(100% - 24px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 8px 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

@media (min-width: 768px) {
    .lj-header.is-scrolled {
        width: 66.6667%;
        min-width: min(760px, calc(100% - 24px));
        gap: 8px;
        padding: 8px 14px;
    }
}

.lj-header.is-scrolled .qf-logo-link {
    padding: 3px 8px 3px 4px;
    border-radius: 12px;
    flex-shrink: 0;
}

.lj-header.is-scrolled .qf-logo-img {
    height: 32px;
}

.lj-header.is-scrolled .lg-nav-links {
    gap: 6px !important;
    min-width: 0;
}

.lj-header.is-scrolled .qf-nav-link {
    font-size: 0.72rem;
    padding: 5px 9px;
}

.lj-header.is-scrolled .lj-header-actions {
    gap: 8px;
    flex-shrink: 0;
}

.lj-header.is-scrolled .lj-theme-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
}

.lj-header.is-scrolled .lj-header-cta {
    padding: 7px 14px;
    font-size: 0.72rem;
    min-height: 36px;
    border-radius: 999px;
}

.lj-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(25, 25, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 18px 8px 8px;
    border-radius: 999px;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: all 0.4s ease-out;
}

.lj-brand-pill:hover {
    color: #ffffff;
    border-color: var(--lj-accent);
}

.lj-brand-pill img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.lj-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lj-theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(25, 25, 25, 0.8);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lj-theme-btn:hover {
    border-color: var(--lj-accent);
    color: var(--lj-accent);
}

.lj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 11px 22px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s ease-out;
}

.lj-btn-lg {
    padding: 14px 28px;
    font-size: 0.84rem;
}

.lj-btn-solid {
    background: var(--lj-accent);
    color: #ffffff;
    border: 1px solid var(--lj-accent);
}

.lj-btn-solid:hover {
    background: transparent;
    color: var(--lj-accent);
}

.lj-btn-outline {
    background: rgba(25, 25, 25, 0.65);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.lj-btn-outline:hover {
    background: #ffffff;
    color: #191919;
}

.lj-btn-outline-accent {
    background: transparent;
    color: var(--lj-accent);
    border: 1px solid var(--lj-accent);
}

.lj-btn-outline-accent:hover {
    background: var(--lj-accent);
    color: #ffffff;
}

.lj-btn-dark {
    background: #191919;
    color: #ffffff;
    border: 1px solid #191919;
}

.lj-btn-dark:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.lj-btn-white-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.lj-btn-white-outline:hover {
    background: #ffffff;
    color: var(--lj-accent);
}

/* 2-line Minimal Hamburger */
.lj-hamburger {
    width: 48px;
    height: 44px;
    background: rgba(25, 25, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1060;
}

.lj-hamburger span {
    display: block;
    width: 26px;
    height: 1.5px;
    background: #ffffff;
    transition: all 0.4s ease-out;
}

.lj-hamburger:hover {
    gap: 12px;
}

.lj-hamburger.open span:first-child {
    transform: translateY(4.75px) rotate(45deg);
}

.lj-hamburger.open span:last-child {
    transform: translateY(-4.75px) rotate(-45deg);
}

/* Fullscreen Magenta Overlay Menu */
.lj-overlay-menu {
    position: fixed;
    inset: 0;
    background: rgba(230, 40, 117, 0.95);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.85s cubic-bezier(0.9, 0, 0.1, 1);
    pointer-events: none;
}

.lj-overlay-menu.open {
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
}

.lj-overlay-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.lj-overlay-nav a {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    line-height: 1.15;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lj-overlay-nav a:hover {
    transform: translateX(8px);
    opacity: 0.85;
}

.lj-overlay-cta {
    margin-top: 12px;
    padding: 10px 26px;
    background: #191919;
    border-radius: 999px;
    font-size: 1.1rem !important;
}

/* Hero Section */
.lj-hero {
    min-height: 100vh;
    background: #191919;
    color: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    padding: 110px 0 90px;
    overflow: hidden;
}

.lj-hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 25%, rgba(230, 40, 117, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 15% 80%, rgba(230, 40, 117, 0.12) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    pointer-events: none;
}

.lj-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--lj-accent);
    margin-bottom: 18px;
}

.lj-hero-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2.5rem, 6.2vw, 5.2rem);
    line-height: 0.96;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.lj-hero-title span {
    display: block;
}

.lj-light {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
}

.lj-strong {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
}

.lj-accent {
    color: var(--lj-accent);
}

.lj-hero-lead {
    max-width: 620px;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: #d4d4d8;
}

/* Rotating Circular Stamp */
.lj-scroll-stamp {
    position: absolute;
    right: clamp(20px, 6vw, 80px);
    bottom: 24px;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    z-index: 3;
}

.lj-scroll-stamp svg {
    animation: lj-sdc-rotation 10s infinite linear;
}

.lj-scroll-stamp text {
    fill: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.lj-stamp-arrow {
    position: absolute;
    font-size: 1.5rem;
    color: var(--lj-accent);
}

@keyframes lj-sdc-rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Scroll Reveal (clip-path revealTop) */
.lj-reveal-top {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(16px);
    transition: clip-path 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.lj-hero .lj-reveal-top,
.lj-reveal-top.is-visible {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
}

/* Scroll-triggered color sweep (light gray -> #e62875 at exact same size) */
.lj-hero .lj-strong.lj-accent {
    color: var(--lj-accent);
}

.lj-section .lj-strong.lj-accent {
    background-image: linear-gradient(90deg, #e62875 0%, #e62875 50%, rgba(156, 163, 175, 0.45) 50%, rgba(156, 163, 175, 0.45) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.lj-section-dark .lj-strong.lj-accent {
    background-image: linear-gradient(90deg, #e62875 0%, #e62875 50%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.28) 100%);
}

.lj-section .lj-strong.lj-accent.is-swept {
    background-position: 0% 0;
}

/* Sections */
.lj-section {
    padding: clamp(64px, 8vw, 110px) 0;
}

.lj-section-dark {
    background: #191919;
    color: #ffffff;
}

.lj-section-light {
    background: var(--lj-bg);
    color: var(--lj-text);
}

.lj-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lj-accent);
    margin-bottom: 8px;
}

.lj-section-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    text-transform: uppercase;
}

.lj-claim-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
    text-transform: uppercase;
}

.lj-marker {
    background: var(--lj-accent);
    color: #ffffff;
    padding: 0 12px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.lj-claim-sub {
    max-width: 680px;
    font-weight: 300;
    color: #b4b4bc;
    line-height: 1.7;
}

/* Weekly Carousel & Hard Offset Shadows */
.lj-carousel-track {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 12px 6px 24px;
    scrollbar-width: thin;
}

.lj-carousel-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--lj-accent);
    background: transparent;
    color: var(--lj-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lj-carousel-nav:hover {
    background: var(--lj-accent);
    color: #ffffff;
}

.lj-weekly-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    background: #ffffff;
    color: #191919;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease;
}

[data-theme="dark"] .lj-weekly-card {
    background: #202024;
    color: #f3f3f3;
}

.lj-weekly-card:hover {
    transform: translateY(-6px);
}

.lj-shadow-rot-0 { box-shadow: 6px 6px 0 #e62875; }
.lj-shadow-rot-1 { box-shadow: -6px 6px 0 #e62875; }
.lj-shadow-rot-2 { box-shadow: 6px -6px 0 #e62875; }
.lj-shadow-rot-3 { box-shadow: -6px -6px 0 #e62875; }

.lj-weekly-img-wrap {
    position: relative;
    height: 200px;
    background: #27272a;
}

.lj-weekly-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lj-weekly-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #71717a;
}

.lj-weekly-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(25, 25, 25, 0.85);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}

.lj-weekly-sponsor-badge,
.lj-weekly-visits-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #e62875;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.lj-weekly-visits-badge {
    background: #191919;
}

.lj-weekly-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lj-weekly-name {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: 1.35rem;
    line-height: 1.1;
    margin-bottom: 6px;
}

.lj-weekly-tagline {
    font-size: 0.82rem;
    color: var(--lj-muted);
    margin-bottom: 10px;
}

.lj-benefit-pill {
    display: inline-block;
    background: rgba(230, 40, 117, 0.12);
    color: #e62875;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
}

.lj-weekly-quote {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--lj-muted);
    margin-bottom: 10px;
}

.lj-rating-tag {
    font-weight: 700;
    font-size: 0.88rem;
}

/* Outlined Metric Numbers */
.lj-goal-num {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    line-height: 1;
    color: var(--lj-bg);
    text-shadow:
        -1px -1px 0 #e62875,
         1px -1px 0 #e62875,
        -1px  1px 0 #e62875,
         1px  1px 0 #e62875;
}

.lj-goal-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--lj-muted);
    margin-top: 8px;
}

/* Giant Kinetic Marquee */
.lj-marquee-wrap {
    background: var(--lj-bg);
    overflow: hidden;
    white-space: nowrap;
    padding: 20px 0;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.lj-marquee-track {
    display: inline-flex;
    animation: lj-marquee-scroll 22s linear infinite;
}

.lj-marquee-track span {
    font-family: 'Jost', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--lj-text);
    padding-right: 24px;
}

.lj-stroke {
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--lj-text);
}

@keyframes lj-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pillar Cards */
.lj-pillar-card {
    background: #232327;
    color: #ffffff;
    padding: 28px 24px;
    border-radius: 12px;
    height: 100%;
    transition: transform 0.35s ease;
}

.lj-pillar-card:hover {
    transform: translateY(-5px);
}

.lj-pillar-num {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: var(--lj-accent);
    margin-bottom: 12px;
}

.lj-pillar-card h4 {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    margin-bottom: 10px;
}

.lj-pillar-card p {
    font-size: 0.88rem;
    font-weight: 300;
    color: #d4d4d8;
    margin-bottom: 0;
}

/* Split How It Works */
.lj-steps-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lj-step-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.lj-step-nr {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--lj-accent);
    line-height: 1;
    margin-top: 2px;
}

.lj-step-item h5 {
    font-weight: 700;
    margin-bottom: 4px;
}

.lj-step-item p {
    font-size: 0.9rem;
    color: var(--lj-muted);
    margin-bottom: 0;
}

/* Magenta Press/CTA Banner (dashed outer border inspired by lady-j.it) */
.lj-press-banner {
    position: relative;
    background: #e62875;
    color: #ffffff;
    border-radius: 32px;
    padding: 44px 36px;
}

.lj-press-banner::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2.5px dashed var(--lj-text);
    border-radius: 38px;
    pointer-events: none;
}

.lj-press-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin-bottom: 10px;
    opacity: 0.85;
}

.lj-press-banner h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.05;
    margin-bottom: 12px;
}

.lj-press-banner p {
    font-weight: 400;
    opacity: 0.92;
    margin-bottom: 0;
}

/* Footer & Back to Top */
.lj-footer {
    background: #191919;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lj-footer-copy {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #a1a1aa;
}

.lj-footer-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f3f3f3;
    text-decoration: none;
    letter-spacing: 0.06em;
}

.lj-footer-link:hover {
    color: var(--lj-accent);
}

.lj-back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--lj-accent);
    color: var(--lj-accent);
    background: rgba(25, 25, 25, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    z-index: 1030;
    transition: all 0.3s ease;
}

.lj-back-to-top:hover {
    background: var(--lj-accent);
    color: #ffffff;
}

/* Mobile-First Refinements for Editorial Public Index */
.lj-hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.lj-hero-ctas .lj-btn {
    min-height: 48px;
    width: 100%;
}

.lj-header-cta {
    min-height: 44px;
    padding: 8px 14px;
}

.lj-theme-btn,
.lj-hamburger {
    min-width: 44px;
    min-height: 44px;
}

.lj-goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 575.98px) {
    .lj-header {
        padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    }

    .lj-brand-pill {
        padding: 6px 12px 6px 6px;
        font-size: 0.78rem;
    }

    .lj-brand-pill img {
        width: 28px;
        height: 28px;
    }

    .lj-hero {
        min-height: 100svh;
        padding: calc(88px + env(safe-area-inset-top)) 0 48px;
    }

    .lj-hero-title {
        font-size: clamp(1.9rem, 8.8vw, 2.7rem);
        line-height: 1.02;
    }

    .lj-hero-lead {
        font-size: 0.95rem;
    }

    .lj-scroll-stamp {
        display: none;
    }

    .lj-carousel-track {
        padding: 12px 16px 24px;
        gap: 18px;
        -webkit-overflow-scrolling: touch;
    }

    .lj-weekly-card {
        flex: 0 0 82vw;
        max-width: 310px;
    }

    .lj-goal-num {
        font-size: clamp(2.1rem, 10vw, 3rem);
    }

    .lj-goal-label {
        font-size: 0.65rem;
        letter-spacing: 0.08em;
    }

    .lj-press-banner {
        margin: 0 10px;
        padding: 30px 22px;
        border-radius: 24px;
    }

    .lj-press-banner::after {
        inset: -8px;
        border-radius: 30px;
    }

    .lj-footer {
        padding-bottom: calc(36px + env(safe-area-inset-bottom));
    }

    .lj-back-to-top {
        width: 44px;
        height: 44px;
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        font-size: 1rem;
    }
}

@media (min-width: 576px) {
    .lj-hero-ctas {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .lj-hero-ctas .lj-btn {
        width: auto;
    }

    .lj-carousel-track {
        max-width: 1320px;
        margin: 0 auto;
        padding: 12px 12px 24px;
    }
}

/* =========================================================
   QUEFACHIAMO 5-SECTION PUBLIC INDEX COMPONENTS
   ========================================================= */
/* Hero AI Search */
.qf-hero-search-box {
    max-width: 680px;
    margin: 0 auto;
}

.qf-search-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.qf-search-input-wrap:focus-within {
    border-color: #e62875;
    box-shadow: 0 0 0 4px rgba(230, 40, 117, 0.2);
}

.qf-search-icon {
    color: #e62875;
    font-size: 1.15rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.qf-search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    padding: 10px 8px 10px 0;
}

.qf-search-input::placeholder {
    color: #a1a1aa;
}

.qf-search-submit {
    border-radius: 999px !important;
    min-height: 44px;
    padding: 10px 20px !important;
    flex-shrink: 0;
}

.qf-prompt-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.qf-prompt-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e4e4e7;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    min-height: 38px;
    transition: all 0.2s ease;
}

.qf-prompt-chip:hover {
    background: #e62875;
    border-color: #e62875;
    color: #ffffff;
}

.qf-ai-results {
    background: rgba(25, 25, 25, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 20px;
}

.qf-ai-summary {
    color: #f4f4f5;
    font-size: 0.94rem;
    line-height: 1.55;
}

.qf-ai-place-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px;
    color: #ffffff;
    height: 100%;
}

/* Postal Cards (Recomendados de la Semana) */
.qf-postal-card {
    flex: 0 0 80vw;
    max-width: 295px;
    scroll-snap-align: start;
    background: #ffffff;
    color: #191919;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .qf-postal-card {
    background: #202024;
    color: #f3f3f3;
}

.qf-postal-card:hover {
    transform: translateY(-5px);
}

.qf-postal-img-wrap {
    position: relative;
    height: 220px;
    background: #27272a;
}

.qf-postal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Interactive Explorer (Map + Live Ranking) */
.qf-explorer-map {
    width: 100%;
    height: 340px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

@media (min-width: 992px) {
    .qf-explorer-map {
        height: 480px;
    }
}

.qf-explorer-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.qf-cat-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f4f4f5;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s ease;
}

.qf-cat-pill.active,
.qf-cat-pill:hover {
    background: #e62875;
    border-color: #e62875;
    color: #ffffff;
}

/* Monochromatic Leaflet Map Tiles (No API key required) */
#public-explorer-map .leaflet-tile-pane {
    filter: grayscale(100%) contrast(1.06);
}

[data-theme="dark"] #public-explorer-map .leaflet-tile-pane {
    filter: grayscale(100%) invert(92%) contrast(0.92) hue-rotate(180deg);
}

.qf-explorer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    width: 100%;
    padding-right: 4px;
}

.qf-explorer-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 0;
    max-width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.qf-explorer-item:hover {
    border-color: rgba(230, 40, 117, 0.6);
    background: rgba(255, 255, 255, 0.09);
}

.qf-explorer-item-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.qf-explorer-name {
    font-size: 0.96rem;
    line-height: 1.25;
    word-break: break-word;
}

.qf-explorer-item-row2 {
    font-size: 0.8rem;
    line-height: 1.4;
    padding-left: 40px;
    word-break: break-word;
}

.qf-explorer-rank {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #e62875;
    color: #ffffff;
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Magazine Feed (Últimas Historias de la Comunidad) */
.qf-story-card {
    background: #ffffff;
    color: #191919;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .qf-story-card {
    background: #202024;
    color: #f3f3f3;
}

.qf-story-card:hover {
    transform: translateY(-5px);
}

.qf-story-thumbs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    height: 190px;
    background: #191919;
}

.qf-story-thumb-item {
    overflow: hidden;
    height: 100%;
}

.qf-story-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qf-story-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(25, 25, 25, 0.85);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.qf-story-title {
    font-family: 'Jost', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    line-height: 1.15;
}

.qf-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: rgba(243, 243, 243, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 12px 4px 6px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.qf-logo-img {
    height: 40px;
    width: auto;
    border-radius: 0;
}

@media (max-width: 575.98px) {
    .qf-logo-img {
        height: 36px;
    }
}

.qf-nav-link {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.06);
    padding: 7px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.lj-header.is-scrolled .qf-nav-link {
    font-size: 0.74rem;
    padding: 6px 10px;
}

.lj-header-cta {
    white-space: nowrap;
}

.qf-nav-link:hover {
    color: #ffffff;
    background: rgba(230, 40, 117, 0.85);
}

.qf-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #e4e4e7;
}

.qf-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e62875;
    box-shadow: 0 0 0 4px rgba(230, 40, 117, 0.28);
}

.qf-mode-switch {
    display: inline-flex;
    background: rgba(25, 25, 25, 0.08);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}

[data-theme="dark"] .qf-mode-switch {
    background: rgba(255, 255, 255, 0.08);
}

.qf-mode-btn {
    border: none;
    background: transparent;
    color: var(--lj-muted);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qf-mode-btn.active {
    background: #e62875;
    color: #ffffff;
}

.editorial-img-wrap img {
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.qf-postal-card:hover .editorial-img-wrap img,
.qf-story-card:hover .editorial-img-wrap img {
    transform: scale(1.05);
}

.qf-map-top-pill {
    position: absolute;
    top: 12px;
    left: 52px;
    z-index: 400;
    background: rgba(25, 25, 25, 0.88);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.qf-map-drawer {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 400;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    color: #191919;
    border-radius: 14px;
    padding: 12px 14px;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.qf-map-drawer-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.qf-map-drawer-row2 {
    font-size: 0.78rem;
    line-height: 1.35;
    width: 100%;
    word-break: break-word;
}

[data-theme="dark"] .qf-map-drawer {
    background: rgba(28, 28, 30, 0.96);
    color: #f5f5f7;
}

.qf-ranking-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 20px;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Custom Glassmorphism Confirmation Modal (Replaces native window.confirm) */
.qf-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: qfFadeIn 0.18s ease-out;
}

.qf-confirm-backdrop.is-closing {
    opacity: 0;
    transition: opacity 0.18s ease-out;
}

.qf-confirm-dialog {
    width: 100%;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    color: var(--apple-text);
}

[data-theme="dark"] .qf-confirm-dialog {
    background: rgba(32, 32, 36, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
    color: #f3f3f3;
}

.qf-confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.14);
    color: #FF3B30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.qf-confirm-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.qf-confirm-msg {
    font-size: 0.9rem;
    color: var(--apple-text-secondary);
    margin-bottom: 20px;
    line-height: 1.45;
}

.qf-confirm-actions {
    display: flex;
    gap: 10px;
}

@keyframes qfFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Visual Rating Pill Selector */
.qf-rating-selector {
    background: var(--apple-bg);
    border: 1px solid var(--apple-border);
    border-radius: 14px;
    padding: 12px 14px;
}

.qf-rating-display {
    font-size: 0.9rem;
    color: var(--apple-text);
}

.qf-rating-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qf-rating-pill {
    flex: 1 1 auto;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid var(--apple-border);
    background: var(--apple-card);
    color: var(--apple-text);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.qf-rating-pill:hover {
    border-color: var(--apple-accent);
    color: var(--apple-accent);
}

.qf-rating-pill.active {
    background: var(--apple-accent);
    border-color: var(--apple-accent);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(230, 40, 117, 0.28);
}

/* Photo Reporting & Moderation UI */
.qf-report-img-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 4;
    min-width: 36px;
    min-height: 36px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(25, 25, 25, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.qf-report-img-btn:hover {
    background: rgba(255, 59, 48, 0.92);
    color: #ffffff;
}

@media (max-width: 767.98px) {
    .qf-report-img-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

.qf-report-avatar-btn {
    border: none;
    background: transparent;
    color: var(--apple-text-secondary);
    padding: 4px 6px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.78rem;
    opacity: 0.65;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.qf-report-avatar-btn:hover {
    opacity: 1;
    color: var(--apple-error);
    background: rgba(255, 59, 48, 0.08);
}

.qf-mod-preview-box {
    position: relative;
    height: 220px;
    border-radius: 14px;
    overflow: hidden;
    background: #1c1c1e;
    cursor: pointer;
}

.qf-mod-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.25s ease;
}

.qf-mod-preview-box.is-blurred img {
    filter: blur(22px) scale(1.08);
}

.qf-mod-reveal-pill {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.qf-mod-preview-box:not(.is-blurred) .qf-mod-reveal-pill {
    opacity: 0;
    pointer-events: none;
}

.qf-story-pending-badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    right: 4px;
    background: rgba(255, 159, 10, 0.94);
    color: #191919;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    padding: 2px 4px;
    border-radius: 6px;
    line-height: 1.2;
}


